diff options
author | Peter Jentsch <pjotr@guineapics.de> | 2012-10-04 22:29:43 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-27 21:37:55 +0000 |
commit | 143f0b895fb2c0a1449af4f6f307487900921cbe (patch) | |
tree | e8b04fc748189d7a3fae81d0998775069f928493 /filter/source/xsltdialog | |
parent | c8209ae6ae2a2e33c63fda48efc7c3381cd095b2 (diff) |
removed obsolete xml validation service and xml source view.
Change-Id: I637531c09b391ef458ae6395518129d981662ff2
Reviewed-on: https://gerrit.libreoffice.org/1166
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter/source/xsltdialog')
22 files changed, 26 insertions, 398 deletions
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 |