diff options
34 files changed, 27 insertions, 813 deletions
diff --git a/filter/AllLangResTarget_xsltdlg.mk b/filter/AllLangResTarget_xsltdlg.mk index e9c0cf40835b..e348909de7f3 100644 --- a/filter/AllLangResTarget_xsltdlg.mk +++ b/filter/AllLangResTarget_xsltdlg.mk @@ -37,7 +37,6 @@ $(eval $(call gb_SrsTarget_add_files,filter/xsltdlg,\ filter/source/xsltdialog/xmlfiltertabdialog.src \ filter/source/xsltdialog/xmlfiltertabpagebasic.src \ filter/source/xsltdialog/xmlfiltertabpagexslt.src \ - filter/source/xsltdialog/xmlfileview.src \ filter/source/xsltdialog/xmlfilterdialogstrings.src \ )) diff --git a/filter/Jar_XSLTValidate.mk b/filter/Jar_XSLTValidate.mk deleted file mode 100644 index 2c2024325015..000000000000 --- a/filter/Jar_XSLTValidate.mk +++ /dev/null @@ -1,43 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -$(eval $(call gb_Jar_Jar,XSLTValidate)) - -$(eval $(call gb_Jar_use_jars,XSLTValidate,\ - ridl \ - unoil \ - jurt \ - juh \ -)) - -#$(eval $(call gb_Jar_use_externals,XSLTValidate,\ - xml-apis \ - xalan \ -)) - -$(eval $(call gb_Jar_set_componentfile,XSLTValidate,filter/source/xsltvalidate/XSLTValidate,OOO)) - -$(eval $(call gb_Jar_set_manifest,XSLTValidate,$(SRCDIR)/filter/source/xsltvalidate/Manifest)) - -$(eval $(call gb_Jar_set_packageroot,XSLTValidate,XSLTValidate.class)) - -$(eval $(call gb_Jar_add_sourcefiles,XSLTValidate,\ - filter/source/xsltvalidate/XSLTValidate \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/filter/Library_xsltdlg.mk b/filter/Library_xsltdlg.mk index 24c05a162470..8e9a5d7e067d 100644 --- a/filter/Library_xsltdlg.mk +++ b/filter/Library_xsltdlg.mk @@ -47,7 +47,6 @@ $(eval $(call gb_Library_use_libraries,xsltdlg,\ $(eval $(call gb_Library_add_exception_objects,xsltdlg,\ filter/source/xsltdialog/typedetectionexport \ filter/source/xsltdialog/typedetectionimport \ - filter/source/xsltdialog/xmlfileview \ filter/source/xsltdialog/xmlfilterdialogcomponent \ filter/source/xsltdialog/xmlfilterjar \ filter/source/xsltdialog/xmlfiltersettingsdialog \ diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk index ef3f5ec9ab63..bd495cc3787b 100644 --- a/filter/Module_filter.mk +++ b/filter/Module_filter.mk @@ -76,7 +76,6 @@ endif ifneq ($(SOLAR_JAVA),) $(eval $(call gb_Module_add_targets,filter,\ - Jar_XSLTValidate \ )) endif diff --git a/filter/source/xsltdialog/hidother.src b/filter/source/xsltdialog/hidother.src index 6bf0c4d9ff72..adcbf47c149b 100644 --- a/filter/source/xsltdialog/hidother.src +++ b/filter/source/xsltdialog/hidother.src @@ -30,8 +30,6 @@ hidspecial HID_XML_FILTER_INTERFACE_NAME { HelpId = HID_XML_FILTE hidspecial HID_XML_FILTER_EXTENSION { HelpId = HID_XML_FILTER_EXTENSION; }; hidspecial HID_XML_FILTER_DESCRIPTION { HelpId = HID_XML_FILTER_DESCRIPTION; }; hidspecial HID_XML_FILTER_DOCTYPE { HelpId = HID_XML_FILTER_DOCTYPE; }; -hidspecial HID_XML_FILTER_DTD { HelpId = HID_XML_FILTER_DTD; }; -hidspecial HID_XML_FILTER_DTD_BROWSE { HelpId = HID_XML_FILTER_DTD_BROWSE; }; hidspecial HID_XML_FILTER_EXPORT_XSLT { HelpId = HID_XML_FILTER_EXPORT_XSLT; }; hidspecial HID_XML_FILTER_EXPORT_XSLT_BROWSE { HelpId = HID_XML_FILTER_EXPORT_XSLT_BROWSE; }; hidspecial HID_XML_FILTER_IMPORT_XSLT { HelpId = HID_XML_FILTER_IMPORT_XSLT; }; diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx index f48a62c4fb69..bcc547575a61 100644 --- a/filter/source/xsltdialog/typedetectionexport.cxx +++ b/filter/source/xsltdialog/typedetectionexport.cxx @@ -196,7 +196,7 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML sValue += sDelim; sValue += createRelativeURL( pFilter->maFilterName, pFilter->maExportXSLT ); sValue += sDelim; - sValue += createRelativeURL( pFilter->maFilterName, pFilter->maDTD ); + // entry DTD obsolete and removed, but delimiter kept sValue += sDelim; sValue += pFilter->maComment; sValue += sComma; diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx index 1740b6d6964f..bb6be3eb0deb 100644 --- a/filter/source/xsltdialog/typedetectionimport.cxx +++ b/filter/source/xsltdialog/typedetectionimport.cxx @@ -175,7 +175,6 @@ filter_info_impl* TypeDetectionImporter::createFilterForNode( Node * pNode ) pFilter->maExportService = getSubdata( 3, aDelim, aFilterUserData ); pFilter->maImportXSLT = getSubdata( 4, aDelim, aFilterUserData ); pFilter->maExportXSLT = getSubdata( 5, aDelim, aFilterUserData ); - pFilter->maDTD = getSubdata( 6, aDelim, aFilterUserData ); pFilter->maComment = getSubdata( 7, aDelim, aFilterUserData ); diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx deleted file mode 100644 index 9cf3522902bf..000000000000 --- a/filter/source/xsltdialog/xmlfileview.cxx +++ /dev/null @@ -1,135 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#include <com/sun/star/xml/sax/XErrorHandler.hpp> -#include <com/sun/star/xml/sax/SAXParseException.hpp> -#include <com/sun/star/xml/XImportFilter.hpp> -#include <com/sun/star/io/XActiveDataSource.hpp> -#include <comphelper/oslfile2streamwrap.hxx> - -#include <rtl/tencinfo.h> -#include <vcl/svapp.hxx> -#include <osl/mutex.hxx> -#include <vcl/textview.hxx> -#include <vcl/scrbar.hxx> -#include <tools/stream.hxx> -#include <tools/time.hxx> -#include <osl/file.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/colorcfg.hxx> -#include <svtools/htmltokn.h> -#include <vcl/txtattr.hxx> - -#include "xmlfilterdialogstrings.hrc" -#include "xmlfiltersettingsdialog.hxx" -#include "xmlfileview.hxx" -#include "xmlfileview.hrc" -#include "xmlfilterhelpids.hrc" - -#include <deque> - -using namespace osl; -using namespace com::sun::star::lang; -using namespace com::sun::star::beans; -using namespace com::sun::star::uno; -using namespace com::sun::star::io; -using namespace com::sun::star::xml; -using namespace com::sun::star::xml::sax; - -using ::rtl::OUString; - -struct SwTextPortion -{ - sal_uInt16 nLine; - sal_uInt16 nStart, nEnd; - svtools::ColorConfigEntry eType; -}; - -typedef std::deque<SwTextPortion> SwTextPortions; - -void TextViewOutWin::DataChanged( const DataChangedEvent& rDCEvt ) -{ - Window::DataChanged( rDCEvt ); - - switch( rDCEvt.GetType() ) - { - case DATACHANGED_SETTINGS: - // den Settings abgefragt werden. - if( rDCEvt.GetFlags() & SETTINGS_STYLE ) - { - const Color &rCol = GetSettings().GetStyleSettings().GetWindowColor(); - SetBackground( rCol ); - Font aFont( pTextView->GetTextEngine()->GetFont() ); - aFont.SetFillColor( rCol ); - pTextView->GetTextEngine()->SetFont( aFont ); - } - break; - } -} - -void TextViewOutWin::MouseMove( const MouseEvent &rEvt ) -{ - if ( pTextView ) - pTextView->MouseMove( rEvt ); -} - -void TextViewOutWin::MouseButtonUp( const MouseEvent &rEvt ) -{ - if ( pTextView ) - pTextView->MouseButtonUp( rEvt ); -} - -void TextViewOutWin::MouseButtonDown( const MouseEvent &rEvt ) -{ - GrabFocus(); - if ( pTextView ) - pTextView->MouseButtonDown( rEvt ); -} - -void TextViewOutWin::Command( const CommandEvent& rCEvt ) -{ - switch(rCEvt.GetCommand()) - { - case COMMAND_CONTEXTMENU: - case COMMAND_WHEEL: - case COMMAND_STARTAUTOSCROLL: - case COMMAND_AUTOSCROLL: - break; - - default: - if ( pTextView ) - pTextView->Command( rCEvt ); - else - Window::Command(rCEvt); - } -} - -void TextViewOutWin::KeyInput( const KeyEvent& rKEvt ) -{ - if(!TextEngine::DoesKeyChangeText( rKEvt )) - pTextView->KeyInput( rKEvt ); -} - -void TextViewOutWin::Paint( const Rectangle& rRect ) -{ - pTextView->Paint( rRect ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/xsltdialog/xmlfileview.hrc b/filter/source/xsltdialog/xmlfileview.hrc deleted file mode 100644 index 47e19c2845e2..000000000000 --- a/filter/source/xsltdialog/xmlfileview.hrc +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _XMLFILEVIEWDIALOG_HRC_ -#define _XMLFILEVIEWDIALOG_HRC_ - -#include "xmlfiltercommon.hrc" - -#define PB_VALIDATE 2 - -#endif diff --git a/filter/source/xsltdialog/xmlfileview.hxx b/filter/source/xsltdialog/xmlfileview.hxx deleted file mode 100644 index afbf35e9d51c..000000000000 --- a/filter/source/xsltdialog/xmlfileview.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef _XMLFILEVIEW_HXX -#define _XMLFILEVIEW_HXX - -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <svl/lstner.hxx> -#include <vcl/timer.hxx> - -#include <vcl/xtextedt.hxx> -#include <vcl/wrkwin.hxx> -#include <vcl/ctrl.hxx> -#include <vcl/button.hxx> -#include <vcl/lstbox.hxx> - -class TextView; -class DataChangedEvent; - -class TextViewOutWin : public Window -{ - TextView* pTextView; - -protected: - virtual void Paint( const Rectangle& ); - virtual void KeyInput( const KeyEvent& rKeyEvt ); - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseButtonUp( const MouseEvent& rMEvt ); - virtual void Command( const CommandEvent& rCEvt ); - virtual void DataChanged( const DataChangedEvent& ); - -public: - TextViewOutWin(Window* pParent, WinBits nBits) : - Window(pParent, nBits), pTextView(0){} - - void SetTextView( TextView* pView ) {pTextView = pView;} - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/xsltdialog/xmlfileview.src b/filter/source/xsltdialog/xmlfileview.src deleted file mode 100644 index b7911321f3c8..000000000000 --- a/filter/source/xsltdialog/xmlfileview.src +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "xmlfileview.hrc" -#include "xmlfilterhelpids.hrc" - -#define DIALOG_WIDTH 500 -#define DIALOG_HEIGHT 400 - -WorkWindow DLG_XML_SOURCE_FILE_DIALOG -{ - Size = MAP_APPFONT( DIALOG_WIDTH, DIALOG_HEIGHT ); - HelpId = HID_XML_SOURCE_FILE_DIALOG; - OutputSize = TRUE ; - SVLook = TRUE ; - Sizeable = TRUE ; - Minable = TRUE ; - Maxable = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Text [ en-US ] = "XML Filter output" ; - - PushButton PB_VALIDATE - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - TabStop = TRUE ; - HelpId = HID_XML_SOURCE_FILE_VALIDATE; - Text [ en-US ] = "~Validate"; - }; -}; diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx index 40d0bf7d16ba..3ea05b0a4f6e 100644 --- a/filter/source/xsltdialog/xmlfiltercommon.hxx +++ b/filter/source/xsltdialog/xmlfiltercommon.hxx @@ -54,7 +54,6 @@ public: rtl::OUString maInterfaceName; rtl::OUString maComment; rtl::OUString maExtension; - rtl::OUString maDTD; rtl::OUString maExportXSLT; rtl::OUString maImportXSLT; rtl::OUString maImportTemplate; diff --git a/filter/source/xsltdialog/xmlfilterdialogstrings.hrc b/filter/source/xsltdialog/xmlfilterdialogstrings.hrc index 2e34787cc7af..2dd57418f439 100644 --- a/filter/source/xsltdialog/xmlfilterdialogstrings.hrc +++ b/filter/source/xsltdialog/xmlfilterdialogstrings.hrc @@ -37,7 +37,6 @@ #define STR_ERROR_FILTER_NAME_EXISTS (RID_XSLT_DIALOG_START + 15) #define STR_ERROR_TYPE_NAME_EXISTS (RID_XSLT_DIALOG_START + 16) -#define STR_ERROR_DTD_NOT_FOUND (RID_XSLT_DIALOG_START + 17) #define STR_ERROR_EXPORT_XSLT_NOT_FOUND (RID_XSLT_DIALOG_START + 18) #define STR_ERROR_IMPORT_XSLT_NOT_FOUND (RID_XSLT_DIALOG_START + 19) #define STR_ERROR_IMPORT_TEMPLATE_NOT_FOUND (RID_XSLT_DIALOG_START + 20) diff --git a/filter/source/xsltdialog/xmlfilterdialogstrings.src b/filter/source/xsltdialog/xmlfilterdialogstrings.src index ec0d9b65d936..0ee2632076b1 100644 --- a/filter/source/xsltdialog/xmlfilterdialogstrings.src +++ b/filter/source/xsltdialog/xmlfilterdialogstrings.src @@ -104,11 +104,6 @@ String STR_ERROR_TYPE_NAME_EXISTS Text [ en-US ] = "The name for the user interface '%s1' is already used by the XML filter '%s2'. Please enter a different name."; }; -String STR_ERROR_DTD_NOT_FOUND -{ - Text [ en-US ] = "The DTD could not be found. Please enter a valid path."; -}; - String STR_ERROR_EXPORT_XSLT_NOT_FOUND { Text [ en-US ] = "The XSLT for export cannot be found. Please enter a valid path."; diff --git a/filter/source/xsltdialog/xmlfilterhelpids.hrc b/filter/source/xsltdialog/xmlfilterhelpids.hrc index cc1830084993..3a1618b1b192 100644 --- a/filter/source/xsltdialog/xmlfilterhelpids.hrc +++ b/filter/source/xsltdialog/xmlfilterhelpids.hrc @@ -19,7 +19,6 @@ #define _XMLFILTERHELPIDS_HRC_ #define HID_XML_SOURCE_FILE_DIALOG "FILTER_HID_XML_SOURCE_FILE_DIALOG" -#define HID_XML_SOURCE_FILE_VALIDATE "FILTER_HID_XML_SOURCE_FILE_VALIDATE" #define HID_XML_FILTER_TABDIALOG "FILTER_HID_XML_FILTER_TABDIALOG" #define HID_XML_FILTER_TABPAGE_BASIC "FILTER_HID_XML_FILTER_TABPAGE_BASIC" @@ -30,8 +29,6 @@ #define HID_XML_FILTER_EXTENSION "FILTER_HID_XML_FILTER_EXTENSION" #define HID_XML_FILTER_DESCRIPTION "FILTER_HID_XML_FILTER_DESCRIPTION" #define HID_XML_FILTER_DOCTYPE "FILTER_HID_XML_FILTER_DOCTYPE" -#define HID_XML_FILTER_DTD "FILTER_HID_XML_FILTER_DTD" -#define HID_XML_FILTER_DTD_BROWSE "FILTER_HID_XML_FILTER_DTD_BROWSE" #define HID_XML_FILTER_NEEDS_XSLT2 "FILTER_HID_XML_FILTER_NEEDS_XSLT2" #define HID_XML_FILTER_EXPORT_XSLT "FILTER_HID_XML_FILTER_EXPORT_XSLT" #define HID_XML_FILTER_EXPORT_XSLT_BROWSE "FILTER_HID_XML_FILTER_EXPORT_XSLT_BROWSE" diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index 3867924e080f..1defb2ed1354 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -65,7 +65,6 @@ XMLFilterJarHelper::XMLFilterJarHelper( Reference< XMultiServiceFactory >& xMSF : mxMSF( xMSF ), sVndSunStarPackage( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) ), sXSLTPath( RTL_CONSTASCII_USTRINGPARAM( "$(user)/xslt/" ) ), - sDTDPath( RTL_CONSTASCII_USTRINGPARAM( "$(user)/dtd/" ) ), sTemplatePath( RTL_CONSTASCII_USTRINGPARAM( "$(user)/template/") ), sSpecialConfigManager( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" ) ), sPump( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pump" ) ), @@ -78,7 +77,6 @@ XMLFilterJarHelper::XMLFilterJarHelper( Reference< XMultiServiceFactory >& xMSF { sProgPath = xCfgMgr->substituteVariables( sProgPath ); sXSLTPath = xCfgMgr->substituteVariables( sXSLTPath ); - sDTDPath = xCfgMgr->substituteVariables( sDTDPath ); sTemplatePath = xCfgMgr->substituteVariables( sTemplatePath ); } } @@ -192,9 +190,6 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt if( xFilterRoot.is() ) { - if( !pFilter->maDTD.isEmpty() ) - addFile( xFilterRoot, xFactory, pFilter->maDTD ); - if( !pFilter->maExportXSLT.isEmpty() ) addFile( xFilterRoot, xFactory, pFilter->maExportXSLT ); try @@ -326,10 +321,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect bool XMLFilterJarHelper::copyFiles( Reference< XHierarchicalNameAccess > xIfc, filter_info_impl* pFilter ) { - bool bOk = copyFile( xIfc, pFilter->maDTD, sDTDPath ); - - if( bOk ) - bOk = copyFile( xIfc, pFilter->maExportXSLT, sXSLTPath ); + bool bOk = copyFile( xIfc, pFilter->maExportXSLT, sXSLTPath ); if( bOk ) bOk = copyFile( xIfc, pFilter->maImportXSLT, sXSLTPath ); diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx index 3fc5806468ac..5c4005d0b2b0 100644 --- a/filter/source/xsltdialog/xmlfilterjar.hxx +++ b/filter/source/xsltdialog/xmlfilterjar.hxx @@ -47,7 +47,6 @@ private: ::rtl::OUString sVndSunStarPackage; ::rtl::OUString sXSLTPath; - ::rtl::OUString sDTDPath; ::rtl::OUString sTemplatePath; ::rtl::OUString sSpecialConfigManager; ::rtl::OUString sPump; diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 2fc72b454516..edf23e190800 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1144,8 +1144,6 @@ void XMLFilterSettingsDialog::initFilterList() pTempFilter->maExportService = aUserData[3]; pTempFilter->maImportXSLT = aUserData[4]; pTempFilter->maExportXSLT = aUserData[5]; - if( aUserData.getLength() >= 7 ) - pTempFilter->maDTD = aUserData[6]; if( aUserData.getLength() >= 8 ) pTempFilter->maComment = aUserData[7]; @@ -1578,7 +1576,6 @@ filter_info_impl::filter_info_impl( const filter_info_impl& rInfo ) : maInterfaceName( rInfo.maInterfaceName ), maComment( rInfo.maComment ), maExtension( rInfo.maExtension ), - maDTD( rInfo.maDTD ), maExportXSLT( rInfo.maExportXSLT ), maImportXSLT( rInfo.maImportXSLT ), maImportTemplate( rInfo.maImportTemplate ), @@ -1605,7 +1602,6 @@ int filter_info_impl::operator==( const filter_info_impl& r ) const maComment != r.maComment || maExtension != r.maExtension || maDocType != r.maDocType || - maDTD != r.maDTD || maExportXSLT != r.maExportXSLT || maImportXSLT != r.maImportXSLT || maExportService != r.maExportService || @@ -1632,7 +1628,6 @@ Sequence< OUString > filter_info_impl::getFilterUserData() const aUserData[3] = maExportService; aUserData[4] = maImportXSLT; aUserData[5] = maExportXSLT; - aUserData[6] = maDTD; aUserData[7] = maComment; return aUserData; diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx index a9152ddfd076..9182fad1a92f 100644 --- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx @@ -213,22 +213,6 @@ bool XMLFilterTabDialog::onOk() } } - // 3. see if the dtd is valid - if( 0 == nErrorId ) - { - if( (mpNewInfo->maDTD != mpOldInfo->maDTD) && isFileURL( mpNewInfo->maDTD ) ) - { - osl::File aFile( mpNewInfo->maDTD ); - osl::File::RC aRC = aFile.open( osl_File_OpenFlag_Read ); - if( aRC != osl::File::E_None ) - { - nErrorId = STR_ERROR_DTD_NOT_FOUND; - nErrorPage = RID_XML_FILTER_TABPAGE_XSLT; - pFocusWindow = &(mpXSLTPage->maEDDTDSchema); - } - } - } - if( 0 == nErrorId ) { // 4. see if the export xslt is valid @@ -261,7 +245,7 @@ bool XMLFilterTabDialog::onOk() } } - // see if we have at least an import or an export dtd + // see if we have at least an import or an export xslt if((mpNewInfo->maImportXSLT.isEmpty()) && (mpNewInfo->maExportXSLT.isEmpty()) ) { nErrorId = STR_ERROR_EXPORT_XSLT_NOT_FOUND; diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.src b/filter/source/xsltdialog/xmlfiltertabpagebasic.src index d82664dc8ff0..f3a4864f3702 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagebasic.src +++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.src @@ -20,7 +20,7 @@ #include "xmlfilterhelpids.hrc" #define TAB_PAGE_WIDTH 260 -#define TAB_PAGE_HEIGHT 185 +#define TAB_PAGE_HEIGHT 120 #define SPACING 3 diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index 31dce8848a20..9be12e01aca4 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -43,10 +43,6 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co maFTDocType( this, ResId( FT_XML_DOCTYPE, rResMgr ) ), maEDDocType( this, ResId( ED_XML_DOCTYPE, rResMgr ) ), - maFTDTDSchema( this, ResId( FT_XML_DTD_SCHEMA, rResMgr ) ), - maEDDTDSchema( this, ResId( ED_XML_DTD_SCHEMA, rResMgr ), INET_PROT_FILE ), - maPBDTDSchemaBrowse( this, ResId( ED_XML_DTD_SCHEMA_BROWSE, rResMgr ) ), - maFTExportXSLT( this, ResId( FT_XML_EXPORT_XSLT, rResMgr ) ), maEDExportXSLT( this, ResId( ED_XML_EXPORT_XSLT, rResMgr ), INET_PROT_FILE ), maPBExprotXSLT( this, ResId( PB_XML_EXPORT_XSLT_BROWSE, rResMgr ) ), @@ -81,12 +77,10 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co OSL_FAIL( "XMLFilterTabPageXSLT::XMLFilterTabPageXSLT exception catched!" ); } - maPBDTDSchemaBrowse.SetClickHdl( LINK ( this, XMLFilterTabPageXSLT, ClickBrowseHdl_Impl ) ); maPBExprotXSLT.SetClickHdl( LINK ( this, XMLFilterTabPageXSLT, ClickBrowseHdl_Impl ) ); maPBImportXSLT.SetClickHdl( LINK ( this, XMLFilterTabPageXSLT, ClickBrowseHdl_Impl ) ); maPBImportTemplate.SetClickHdl( LINK ( this, XMLFilterTabPageXSLT, ClickBrowseHdl_Impl ) ); - maEDDTDSchema.SetHelpId( HID_XML_FILTER_DTD ); maEDExportXSLT.SetHelpId( HID_XML_FILTER_EXPORT_XSLT ); maEDImportXSLT.SetHelpId( HID_XML_FILTER_IMPORT_XSLT ); maEDImportTemplate.SetHelpId( HID_XML_FILTER_IMPORT_TEMPLATE ); @@ -102,7 +96,6 @@ bool XMLFilterTabPageXSLT::FillInfo( filter_info_impl* pInfo ) if( pInfo ) { pInfo->maDocType = maEDDocType.GetText(); - pInfo->maDTD = GetURL( maEDDTDSchema ); pInfo->maExportXSLT = GetURL( maEDExportXSLT ); pInfo->maImportXSLT = GetURL( maEDImportXSLT ); pInfo->maImportTemplate = GetURL( maEDImportTemplate ); @@ -118,7 +111,6 @@ void XMLFilterTabPageXSLT::SetInfo(const filter_info_impl* pInfo) { maEDDocType.SetText( pInfo->maDocType ); - SetURL( maEDDTDSchema, pInfo->maDTD ); SetURL( maEDExportXSLT, pInfo->maExportXSLT ); SetURL( maEDImportXSLT, pInfo->maImportXSLT ); SetURL( maEDImportTemplate, pInfo->maImportTemplate ); @@ -184,11 +176,7 @@ IMPL_LINK ( XMLFilterTabPageXSLT, ClickBrowseHdl_Impl, PushButton *, pButton ) { SvtURLBox* pURLBox; - if( pButton == &maPBDTDSchemaBrowse ) - { - pURLBox = &maEDDTDSchema; - } - else if( pButton == &maPBExprotXSLT ) + if( pButton == &maPBExprotXSLT ) { pURLBox = &maEDExportXSLT; } diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc b/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc index 93c6ed15adf0..10bb73a59cd9 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc @@ -23,9 +23,6 @@ #define FT_XML_DOCTYPE 1 #define ED_XML_DOCTYPE 2 -#define FT_XML_DTD_SCHEMA 3 -#define ED_XML_DTD_SCHEMA 4 -#define ED_XML_DTD_SCHEMA_BROWSE 5 #define FT_XML_EXPORT_XSLT 6 #define ED_XML_EXPORT_XSLT 7 #define PB_XML_EXPORT_XSLT_BROWSE 8 diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx index cccd97e95e0e..980647ed9caa 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx @@ -44,10 +44,6 @@ public: FixedText maFTDocType; Edit maEDDocType; - FixedText maFTDTDSchema; - SvtURLBox maEDDTDSchema; - PushButton maPBDTDSchemaBrowse; - FixedText maFTExportXSLT; SvtURLBox maEDExportXSLT; PushButton maPBExprotXSLT; diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.src b/filter/source/xsltdialog/xmlfiltertabpagexslt.src index f8feb42265b6..dbff60ea5e37 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.src +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.src @@ -63,44 +63,18 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT Border = TRUE; }; - // DTD/Schema ----------------------------------------------------- - - FixedText FT_XML_DTD_SCHEMA - { - Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 1 * ROW_HEIGHT + 1 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; - Size = MAP_APPFONT ( FIRST_ROW_WIDTH , 8 ) ; - Text [ en-US ] = "DTD"; - }; - - ComboBox ED_XML_DTD_SCHEMA - { - Pos = MAP_APPFONT ( SECOND_ROW_X , SECOND_ROW_Y + 1 * ROW_HEIGHT + 1 * SPACING + EDIT_OFFSET ) ; - Size = MAP_APPFONT ( SECOND_ROW_WIDTH - SPACING - BROWSE_WIDTH, 12 ) ; - HelpId = HID_XML_FILTER_DTD; - Border = TRUE; - DropDown = FALSE ; - }; - - PushButton ED_XML_DTD_SCHEMA_BROWSE - { - Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 1 * ROW_HEIGHT + 1 * SPACING ) ; - Size = MAP_APPFONT ( BROWSE_WIDTH , 14 ) ; - HelpId = HID_XML_FILTER_DTD_BROWSE; - Text [ en-US ] = "Browse..."; - }; - // Export XSLT ---------------------------------------------------- FixedText FT_XML_EXPORT_XSLT { - Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 2 * ROW_HEIGHT + 2 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 1 * ROW_HEIGHT + 1 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; Size = MAP_APPFONT ( FIRST_ROW_WIDTH, 8 ) ; Text [ en-US ] = "XSLT for export"; }; ComboBox ED_XML_EXPORT_XSLT { - Pos = MAP_APPFONT ( SECOND_ROW_X , FIRST_ROW_Y + 2 * ROW_HEIGHT + 2 * SPACING + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( SECOND_ROW_X , FIRST_ROW_Y + 1 * ROW_HEIGHT + 1 * SPACING + EDIT_OFFSET ) ; Size = MAP_APPFONT ( SECOND_ROW_WIDTH - SPACING - BROWSE_WIDTH , 12 ) ; HelpId = HID_XML_FILTER_EXPORT_XSLT; Border = TRUE; @@ -108,7 +82,7 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT PushButton PB_XML_EXPORT_XSLT_BROWSE { - Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 2 * ROW_HEIGHT + 2 * SPACING ) ; + Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 1 * ROW_HEIGHT + 1 * SPACING ) ; Size = MAP_APPFONT ( BROWSE_WIDTH , 14 ) ; HelpId = HID_XML_FILTER_EXPORT_XSLT_BROWSE; Text [ en-US ] = "Browse..."; @@ -118,14 +92,14 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT FixedText FT_XML_IMPORT_XSLT { - Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 3 * ROW_HEIGHT + 3 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 2 * ROW_HEIGHT + 2 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; Size = MAP_APPFONT ( FIRST_ROW_WIDTH , 8 ) ; Text [ en-US ] = "XSLT for import"; }; ComboBox ED_XML_IMPORT_XSLT { - Pos = MAP_APPFONT ( SECOND_ROW_X , FIRST_ROW_Y + 3 * ROW_HEIGHT + 3 * SPACING + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( SECOND_ROW_X , FIRST_ROW_Y + 2 * ROW_HEIGHT + 2 * SPACING + EDIT_OFFSET ) ; Size = MAP_APPFONT ( SECOND_ROW_WIDTH - SPACING - BROWSE_WIDTH , 12 ) ; HelpId = HID_XML_FILTER_IMPORT_XSLT; Border = TRUE; @@ -133,7 +107,7 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT PushButton PB_XML_IMPORT_XSLT_BROWSE { - Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 3 * ROW_HEIGHT + 3 * SPACING ) ; + Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 2 * ROW_HEIGHT + 2 * SPACING ) ; Size = MAP_APPFONT ( BROWSE_WIDTH , 14 ) ; HelpId = HID_XML_FILTER_IMPORT_XSLT_BROWSE; Text [ en-US ] = "Browse..."; @@ -143,14 +117,14 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT FixedText FT_XML_IMPORT_TEMPLATE { - Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 4 * ROW_HEIGHT + 4 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 3 * ROW_HEIGHT + 3 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; Size = MAP_APPFONT ( FIRST_ROW_WIDTH , 8 ) ; Text [ en-US ] = "Template for import"; }; ComboBox ED_XML_IMPORT_TEMPLATE { - Pos = MAP_APPFONT ( SECOND_ROW_X , FIRST_ROW_Y + 4 * ROW_HEIGHT + 4 * SPACING + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( SECOND_ROW_X , FIRST_ROW_Y + 3 * ROW_HEIGHT + 3 * SPACING + EDIT_OFFSET ) ; Size = MAP_APPFONT ( SECOND_ROW_WIDTH - SPACING - BROWSE_WIDTH , 12 ) ; HelpId = HID_XML_FILTER_IMPORT_TEMPLATE; Border = TRUE; @@ -158,7 +132,7 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT PushButton PB_XML_IMPORT_TEMPLATE_BROWSE { - Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 4 * ROW_HEIGHT + 4 * SPACING ) ; + Pos = MAP_APPFONT ( SECOND_ROW_X + SECOND_ROW_WIDTH - BROWSE_WIDTH , FIRST_ROW_Y + 3 * ROW_HEIGHT + 3 * SPACING ) ; Size = MAP_APPFONT ( BROWSE_WIDTH , 14 ) ; HelpId = HID_XML_FILTER_IMPORT_TEMPLATE_BROWSE; Text [ en-US ] = "Browse..."; @@ -169,13 +143,13 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT CheckBox CB_XML_NEEDS_XSLT2 { HelpID = HID_XML_FILTER_NEEDS_XSLT2; - Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 5 * ROW_HEIGHT + 5 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 4 * ROW_HEIGHT + 4 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; Size = MAP_APPFONT ( 12, 12 ) ; }; FixedText FT_XML_NEEDS_XSLT2 { - Pos = MAP_APPFONT ( FIRST_ROW_X + 3 * SPACING , SECOND_ROW_Y + 5 * ROW_HEIGHT + 5 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; + Pos = MAP_APPFONT ( FIRST_ROW_X + 4 * SPACING , SECOND_ROW_Y + 4 * ROW_HEIGHT + 4 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ; Size = MAP_APPFONT ( 2 * FIRST_ROW_WIDTH , 8 ) ; // guess width Text [ en-US ] = "The filter needs XSLT 2.0 processor"; }; diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 8141f0241f40..64932a96aaff 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -140,7 +140,6 @@ XMLFilterTestDialog::XMLFilterTestDialog(Window* pParent, : ModalDialog(pParent, "TestXMLFilterDialog", "filter/ui/testxmlfilter.ui") , mxMSF(rxMSF) , m_pFilterInfo(NULL) - , m_sDTDPath("$(inst)/share/dtd/officedocument/1_0/office.dtd") { get(m_pExport, "export"); get(m_pFTExportXSLTFile, "exportxsltfile"); @@ -181,10 +180,6 @@ XMLFilterTestDialog::XMLFilterTestDialog(Window* pParent, try { - Reference< XConfigManager > xCfgMgr( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" ))), UNO_QUERY ); - if( xCfgMgr.is() ) - m_sDTDPath = xCfgMgr->substituteVariables( m_sDTDPath ); - mxGlobalBroadcaster = Reference < XEventBroadcaster >( GlobalEventBroadcaster::create(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW ); mxGlobalEventListener = new GlobalEventListenerImpl( this ); mxGlobalBroadcaster->addEventListener( mxGlobalEventListener ); @@ -469,29 +464,22 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) // create xslt exporter Reference< XOutputStream > xIS( new comphelper::OSLOutputStreamWrapper( aOutputFile ) ); - - int bUseDTD = m_pFilterInfo->maDTD.isEmpty() ? 0 : 1 ; int bUseDocType = m_pFilterInfo->maDocType.isEmpty() ? 0 : 1; - Sequence< PropertyValue > aSourceData( 2 + bUseDTD + bUseDocType ); + Sequence< PropertyValue > aSourceData( 2 + bUseDocType ); int i = 0; - + + aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "OutputStream" ) ); aSourceData[i++].Value <<= xIS; - + aSourceData[i].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Indent" ) ); aSourceData[i++].Value <<= (sal_Bool)sal_True; - - if( bUseDTD ) - { - aSourceData[i ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("DocType_System")); - aSourceData[i++].Value <<= m_pFilterInfo->maDTD; - } - + if( bUseDocType ) - { - aSourceData[i ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("DocType_Public")); - aSourceData[i++].Value <<= m_pFilterInfo->maDocType; - } + { + aSourceData[i ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("DocType_Public")); + aSourceData[i++].Value <<= m_pFilterInfo->maDocType; + } Reference< XExportFilter > xExporter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.documentconversion.XSLTFilter" )) ), UNO_QUERY ); Reference< XDocumentHandler > xHandler( xExporter, UNO_QUERY ); @@ -645,7 +633,7 @@ void XMLFilterTestDialog::import( const OUString& rURL ) Reference< XInputStream > xIS( new comphelper::OSLInputStreamWrapper( aInputFile ) ); - Sequence< PropertyValue > aSourceData( 5 ); + Sequence< PropertyValue > aSourceData( 3 ); int i = 0; aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); @@ -657,12 +645,6 @@ void XMLFilterTestDialog::import( const OUString& rURL ) aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Indent" )); aSourceData[i++].Value <<= (sal_Bool)sal_True; - aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DocType_Public" )); - aSourceData[i++].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" )); - - aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DocType_System" )); - aSourceData[i++].Value <<= m_sDTDPath; - Reference< XWriter > xWriter = Writer::create( comphelper::getComponentContext(mxMSF) ); File aOutputFile( aTempFileURL ); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx index 7121e0428f75..589971aaee7e 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx @@ -85,7 +85,6 @@ private: OUString m_sDialogTitle; - OUString m_sDTDPath; }; #endif diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index 5c5b0e0c4296..56aaffc3a4f6 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -93,7 +93,6 @@ namespace XSLT const char* const LibXSLTTransformer::PARAM_TARGET_URL = "targetURL"; const char* const LibXSLTTransformer::PARAM_TARGET_BASE_URL = "targetBaseURL"; - const char* const LibXSLTTransformer::PARAM_DOCTYPE_SYSTEM = "sytemType"; const char* const LibXSLTTransformer::PARAM_DOCTYPE_PUBLIC = "publicType"; const sal_Int32 Reader::OUTPUT_BUFFER_SIZE = _OUTPUT_BUFFER_SIZE; @@ -543,11 +542,6 @@ namespace XSLT m_parameters.insert(pair<const char*, OString> ( PARAM_TARGET_BASE_URL, valueUTF8)); } - else if (nameUTF8.equals("DoctypeSystem")) - { - m_parameters.insert(pair<const char*, OString> ( - PARAM_DOCTYPE_SYSTEM, valueUTF8)); - } else if (nameUTF8.equals("DoctypePublic")) { m_parameters.insert(pair<const char*, OString> ( diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx index a7c71a611fd5..3e7bf2816726 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.hxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx @@ -94,7 +94,6 @@ namespace XSLT static const char* const PARAM_SOURCE_BASE_URL; static const char* const PARAM_TARGET_URL; static const char* const PARAM_TARGET_BASE_URL; - static const char* const PARAM_DOCTYPE_SYSTEM; static const char* const PARAM_DOCTYPE_PUBLIC; // the UNO ServiceFactory diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index 2ce6aba88f36..94c2253dd47e 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -444,7 +444,6 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False) OUString aName, sURL; sal_Bool bIndent = sal_False; OUString aDoctypePublic; - OUString aDoctypeSystem; // css::uno::Reference<XOutputStream> rOutputStream; sal_Int32 nLength = aSourceData.getLength(); for (sal_Int32 i = 0; i < nLength; i++) @@ -454,8 +453,6 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False) aSourceData[i].Value >>= bIndent; if ( aName == "DocType_Public" ) aSourceData[i].Value >>= aDoctypePublic; - if ( aName == "DocType_System" ) - aSourceData[i].Value >>= aDoctypeSystem; if ( aName == "OutputStream" ) aSourceData[i].Value >>= m_rOutputStream; else if ( aName == "URL" ) @@ -479,12 +476,9 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False) nv.Name = OUString( "TargetURL" ); nv.Value <<= sURL; args[1] <<= nv; - nv.Name = OUString( "DoctypeSystem" ); - nv.Value <<= aDoctypeSystem; - args[2] <<= nv; nv.Name = OUString( "DoctypePublic" ); nv.Value <<= aDoctypePublic; - args[3] <<= nv; + args[2] <<= nv; nv.Name = OUString( "TargetBaseURL" ); INetURLObject ineturl(sURL); ineturl.removeSegment(); diff --git a/filter/source/xsltvalidate/Manifest b/filter/source/xsltvalidate/Manifest deleted file mode 100644 index 84787aa6e402..000000000000 --- a/filter/source/xsltvalidate/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -RegistrationClassName: XSLTValidate -UNO-Type-Path: diff --git a/filter/source/xsltvalidate/XSLTValidate.component b/filter/source/xsltvalidate/XSLTValidate.component deleted file mode 100644 index 8f7f70592442..000000000000 --- a/filter/source/xsltvalidate/XSLTValidate.component +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> - -<component loader="com.sun.star.loader.Java2" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="XSLTValidate$_XSLTValidate"> - <service name="com.sun.star.documentconversion.XSLTValidate"/> - </implementation> -</component> diff --git a/filter/source/xsltvalidate/XSLTValidate.java b/filter/source/xsltvalidate/XSLTValidate.java deleted file mode 100644 index 17aeb6a4364b..000000000000 --- a/filter/source/xsltvalidate/XSLTValidate.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -import com.sun.star.comp.loader.FactoryHelper; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XServiceInfo; -import com.sun.star.lang.XServiceName; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.lang.XTypeProvider; -import com.sun.star.registry.XRegistryKey; -import com.sun.star.uno.Type; -import java.util.Iterator; -import java.util.ArrayList; -import com.sun.star.xml.XImportFilter; -import com.sun.star.xml.XExportFilter; - -// Imported TraX classes -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -import com.sun.star.uno.AnyConverter; - -//Uno to java Adaptor -import com.sun.star.lib.uno.adapter.*; - -/** This outer class provides an inner class to implement the service - * description and a method to instantiate the - * component on demand (__getServiceFactory()). - */ -public class XSLTValidate { - - private static XMultiServiceFactory xMSF; - private static ArrayList<String> parseErrors = new ArrayList<String>(); - - /** This inner class provides the component as a concrete implementation - * of the service description. It implements the needed interfaces. - * @implements XTypeProvider - */ - static public class _XSLTValidate implements - XImportFilter, - XServiceName, - XServiceInfo, - ErrorHandler, - XTypeProvider { - - private com.sun.star.xml.sax.XErrorHandler xErrorHandler; - - /** The component will be registered under this name. - */ - static private final String __serviceName = "com.sun.star.documentconversion.XSLTValidate"; - - public _XSLTValidate() { - xErrorHandler = null; - } - - public com.sun.star.uno.Type[] getTypes() { - Type[] typeReturn = {}; - - try { - typeReturn = new Type[] { - new Type( XTypeProvider.class ), - new Type( XExportFilter.class ), - new Type( XImportFilter.class ), - new Type( XServiceName.class ), - new Type( XServiceInfo.class ) }; - } - catch( Exception exception ) { - - } - - return( typeReturn ); - } - - - public boolean importer(com.sun.star.beans.PropertyValue[] aSourceData, - com.sun.star.xml.sax.XDocumentHandler xDocHandler, - java.lang.String[] msUserData) throws com.sun.star.uno.RuntimeException,com.sun.star.lang.IllegalArgumentException { - - com.sun.star.io.XInputStream xis=null; - com.sun.star.beans.PropertyValue[] pValue = aSourceData; - for (int i = 0 ; i < pValue.length; i++) - { - try{ - //System.out.println("\n"+pValue[i].Name+" "+pValue[i].Value); - if (pValue[i].Name.compareTo("InputStream")==0){ - xis=(com.sun.star.io.XInputStream)AnyConverter.toObject(new Type(com.sun.star.io.XInputStream.class), pValue[i].Value); - } - else if (pValue[i].Name.compareTo("ErrorHandler")==0){ - xErrorHandler=(com.sun.star.xml.sax.XErrorHandler)AnyConverter.toObject(new Type(com.sun.star.xml.sax.XErrorHandler.class), pValue[i].Value); - } - } - catch(com.sun.star.lang.IllegalArgumentException AnyExec){ - System.out.println("\nIllegalArgumentException "+AnyExec); - } - } - try{ - convert (xis); - } - catch (Exception AnyExec){ - throw new com.sun.star.uno.RuntimeException(AnyExec.getMessage()); - } - return true; - } - - public void convert (com.sun.star.io.XInputStream xml) throws com.sun.star.uno.RuntimeException { - XInputStreamToInputStreamAdapter xis =new XInputStreamToInputStreamAdapter(xml); - parseErrors = new ArrayList<String>(); - //String defaultTimeOut = System.getProperty("sun.net.client.defaultConnectTimeout"); - System.getProperties().setProperty("sun.net.client.defaultConnectTimeout", "10000"); - try{ - DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance(); - dFactory.setNamespaceAware(true); - dFactory.setValidating(true); - DocumentBuilder dBuilder = dFactory.newDocumentBuilder(); - dBuilder.setErrorHandler(this); - dBuilder.parse(xis); - if (parseErrors.size()>0){ - String errString =""; - for (Iterator<String> e = parseErrors.iterator() ; e.hasNext() ;) { - errString += e.next(); - //System.out.println(e.nextElement()); - } - throw new com.sun.star.uno.RuntimeException(errString); - } - } - catch (Exception e){ - //System.out.println("\nException "+ e); - throw new com.sun.star.uno.RuntimeException(e.getLocalizedMessage()); - } - } - - public com.sun.star.uno.Any JavaSAXParseEceptionToUno( SAXParseException e ) - { - com.sun.star.uno.XInterface xContext = null; - - String aMessage = e.getMessage(); - if( aMessage == null ) - aMessage = new String(); - - String aPublicId = e.getPublicId(); - if( aPublicId == null ) - aPublicId = new String(); - - String aSystemId = e.getSystemId(); - if( aSystemId == null ) - aSystemId = new String(); - - return new com.sun.star.uno.Any( new Type(com.sun.star.xml.sax.SAXParseException.class), - new com.sun.star.xml.sax.SAXParseException( aMessage, - xContext, - com.sun.star.uno.Any.VOID, - aPublicId, - aSystemId, - e.getLineNumber(), - e.getColumnNumber() ) ); - - } - - // Warning Event Handler - public void warning (SAXParseException e) - throws SAXException - { -// System.out.println("\n_XSLTValidate::warning " + e.toString() ); - - if( xErrorHandler != null ) - { - try - { - xErrorHandler.warning( JavaSAXParseEceptionToUno( e ) ); - } - catch( com.sun.star.xml.sax.SAXException ex ) - { - throw e; - } - } - else - { - - //System.err.println ("Warning: "+e); - try{ - //parseErrors.write (("\n"+e.getMessage()).getBytes()); - } - catch(Exception genEx){ - //System.out.print("\n Error while writing ParseErrors"+genEx); - } - } - } - - // Error Event Handler - public void error (SAXParseException e) - throws SAXException - { -// System.out.println("\n_XSLTValidate::error " + e.toString() ); - - if( xErrorHandler != null ) - { - try - { - xErrorHandler.error( JavaSAXParseEceptionToUno( e ) ); - } - catch( com.sun.star.xml.sax.SAXException ex ) - { - throw e; - } - } - else - { - //System.err.println ("Error: "+e); - try{ - parseErrors.add (e.getLocalizedMessage()+" "+e.getLineNumber()+" "); - } - catch(Exception genEx){ - //System.out.print("\n Error while writing ParseErrors"+genEx); - } - } - } - - // Fatal Error Event Handler - public void fatalError (SAXParseException e) - throws SAXException { -// System.out.println("\n_XSLTValidate::fatalError " + e.toString() ); - - if( xErrorHandler != null ) - { - try - { - xErrorHandler.fatalError( JavaSAXParseEceptionToUno( e ) ); - } - catch( com.sun.star.xml.sax.SAXException ex ) - { - throw e; - } - } - else - { - //System.err.println ("Fatal Error: "+e); - try{ - parseErrors.add (e.getLocalizedMessage()+" "+e.getLineNumber()+" "); - } - catch(Exception genEx){ - //System.out.print("\n Error while writing ParseErrors"+genEx); - } - } - } - - // Implement methods from interface XTypeProvider - public byte[] getImplementationId() { - byte[] byteReturn = {}; - - byteReturn = new String( "" + this.hashCode() ).getBytes(); - - return( byteReturn ); - } - - // Implement method from interface XServiceName - public String getServiceName() { - return( __serviceName ); - } - - // Implement methods from interface XServiceInfo - public boolean supportsService(String stringServiceName) { - return( stringServiceName.equals( __serviceName ) ); - } - - public String getImplementationName() { - return( _XSLTValidate.class.getName() ); - } - - public String[] getSupportedServiceNames() { - String[] stringSupportedServiceNames = { __serviceName }; - return( stringSupportedServiceNames ); - } - } - - /** - * Returns a factory for creating the service. - * This method is called by the <code>JavaLoader</code> - * - * @return returns a <code>XSingleServiceFactory</code> for creating the - * component - * - * @param implName the name of the implementation for which a - * service is desired - * @param multiFactory the service manager to be used if needed - * @param regKey the registryKey - * - * @see com.sun.star.comp.loader.JavaLoader - */ - public static XSingleServiceFactory __getServiceFactory(String implName, - XMultiServiceFactory multiFactory, - XRegistryKey regKey) { - XSingleServiceFactory xSingleServiceFactory = null; - xMSF= multiFactory; - if (implName.equals(_XSLTValidate.class.getName()) ) { - xSingleServiceFactory = FactoryHelper.getServiceFactory(_XSLTValidate.class, - _XSLTValidate.__serviceName, - multiFactory, - regKey); - } - - return xSingleServiceFactory; - } -} diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index a32af40d46f0..d3e2f09c0b74 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -286,7 +286,6 @@ my_components += component/slideshow/source/engine/OGLTrans/ogltrans .IF "$(SOLAR_JAVA)" == "TRUE" my_components += \ component/xmerge/source/bridge/XMergeBridge \ - component/filter/source/xsltvalidate/XSLTValidate \ component/scripting/java/ScriptFramework \ component/scripting/java/ScriptProviderForJava \ component/wizards/com/sun/star/wizards/agenda/agenda \ diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 826ed661cc51..090abbc5b18e 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -1399,10 +1399,6 @@ STD_LIB_FILE( gid_File_Lib_Xmlfd, xmlfd ) STD_LIB_FILE( gid_File_Lib_Textfd, textfd ) STD_LIB_FILE( gid_File_Lib_Odfflatxml, odfflatxml ) -#ifdef SOLAR_JAVA -STD_JAR_FILE( gid_File_Jar_Xsltvalidate, XSLTValidate ) -#endif - #ifndef SYSTEM_LIBXSLT File gid_File_Lib_Xslt LIB_FILE_BODY; |