Kaydet (Commit) 512863f0 authored tarafından Hongyun An's avatar Hongyun An

clean the redundant comments about UOF v2.0

Review by Hongyun An from CS2C
üst 30441cd6
......@@ -55,10 +55,10 @@
#include <unotools/ucbhelper.hxx>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
// This is added by wangyumin from 2012-02-24 for UOF2 deep type detection
//UOF v2 deep type detection
#include "../xsltfilter/uof2storage.cxx"
#include <rtl/string.hxx>
/// end added
using rtl::OUString;
using com::sun::star::uno::Sequence;
......@@ -103,7 +103,7 @@ Reference< com::sun::star::frame::XModel > xModel;
Sequence<PropertyValue > lProps ;
com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xInStream;
com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xIn;//added by wangyumin on 2012-02-27
com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xIn;
::rtl::OUString temp;
//OSL_ENSURE( sal_False, " starting Detect" );
const PropertyValue * pValue = aArguments.getConstArray();
......@@ -132,7 +132,7 @@ Reference< com::sun::star::frame::XModel > xModel;
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
{
pValue[i].Value >>= xInStream ;
pValue[i].Value >>= xIn ;//added by wangyumin on 2012-02-27
pValue[i].Value >>= xIn ;
}
}
......@@ -191,7 +191,7 @@ Reference< com::sun::star::frame::XModel > xModel;
if(sTypeName.equalsAscii(""))
{
//sTypeName=::rtl::OUString::createFromAscii("writer_Flat_XML_File");
/// begin added by wangyumin for uof2 deep type detection on 2012-02-27
//UOF v2.0 deep type detection
if(sUrl.indexOf( ::rtl::OUString::createFromAscii(".uot") ) != -1 ||
sUrl.indexOf( ::rtl::OUString::createFromAscii(".uos") ) != -1 ||
sUrl.indexOf( ::rtl::OUString::createFromAscii(".uop") ) != -1)
......@@ -226,7 +226,6 @@ Reference< com::sun::star::frame::XModel > xModel;
}
}
}
/// end added
}
else
{
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#include "precompiled_filter.hxx"
#include "XMLBase64Codec.hxx"
#include <rtl/ustrbuf.hxx>
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#ifndef _FILTER_SOURCE_XSLTFILTER_XMLBASE64_CODEC_HXX
#define _FILTER_SOURCE_XSLTFILTER_XMLBASE64_CODEC_HXX
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#include "precompiled_filter.hxx"
#include <stdio.h>
......@@ -65,22 +65,17 @@
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
// for test added by wangyao
#include <unotools/streamwrap.hxx>
#include <comphelper/processfactory.hxx>
#include <tools/stream.hxx>
// end for test added
// added by wangyao
#include "uof2splitter.hxx"
// end added
#include <xmloff/attrlist.hxx>
//Begin added by wangyumin for uof2 doc import on 2012-02-13
#include "uof2storage.hxx"
#include "uof2merge.hxx"
#include <tools/stream.hxx>
#include <string>
//End added
using namespace ::rtl;
using namespace ::cppu;
......@@ -113,7 +108,8 @@ private:
Reference< XActiveDataControl > m_tcontrol;
oslCondition m_cTransformed;
Reference< XActiveDataControl > m_splitControl;// added by wangyao for uof2 doc export
//UOF v2.0 export
Reference< XActiveDataControl > m_splitControl;
sal_Bool m_bTerminated;
sal_Bool m_bError;
......@@ -167,11 +163,11 @@ public:
throw (com::sun::star::xml::sax::SAXException,RuntimeException);
virtual void SAL_CALL setDocumentLocator(const Reference<XLocator>& doclocator)
throw (SAXException,RuntimeException);
// begin added by wangyao for uof2 doc export
// UOF v2.0 export
private:
Reference< XStream > m_rStream;
UOF2Splitter * pSplitter;
// end added
};
XSLTFilter::XSLTFilter( const Reference< XMultiServiceFactory > &r )
......@@ -313,32 +309,15 @@ sal_Bool XSLTFilter::importer(
// connect input to transformer
Reference< XActiveDataSink > tsink(m_tcontrol, UNO_QUERY);
//Begin Added by wangyumin for uof2 doc import on 2012-02-13
//UOF v2 import
UOF2Storage aUOF2Storage(m_rServiceFactory, xInputStream);
if(aUOF2Storage.isValidUOF2Doc())
{
UOF2Merge aUOF2Merge(aUOF2Storage, m_rServiceFactory);
aUOF2Merge.merge();
/*Reference< XInputStream > aTestInStrm = aUOF2Merge.getMergedInStream();
SvFileStream aFileStream( String::CreateFromAscii("file:///f:/test.xml"), STREAM_STD_READWRITE | STREAM_TRUNC);
while(true)
{
Sequence< sal_Int8 > aSeq;
if( aTestInStrm->readBytes(aSeq, 512) )
{
sal_Int32 nLen = aSeq.getLength();
for(sal_Int32 i = 0; i < nLen; ++i)
{
aFileStream << static_cast< signed char >(aSeq[i]);
}
}
else
break;
}*/
tsink->setInputStream(aUOF2Merge.getMergedInStream());
}
else
//End Added
tsink->setInputStream(xInputStream);
// create pipe
......@@ -423,10 +402,9 @@ sal_Bool XSLTFilter::exporter(
aSourceData[i].Value >>= m_rOutputStream;
else if ( aName.equalsAscii("URL" ))
aSourceData[i].Value >>= sURL;
// add by wangyao for uof2 doc export, get Stream for constructing UOF2Storage
//UOF v2.0 export, get Stream for constructing UOF2Storage
if ( aName.equalsAscii("StreamForOutput"))
aSourceData[i].Value >>= m_rStream;
// end adding.
}
if (!m_rDocumentHandler.is()) {
......@@ -479,13 +457,8 @@ sal_Bool XSLTFilter::exporter(
Reference< XActiveDataSink > tsink(m_tcontrol, UNO_QUERY);
tsink->setInputStream(pipein);
// Begin comment by wangyao for changing transformer to connect to a new pipe
//// connect transformer to output
//Reference< XActiveDataSource > tsource(m_tcontrol, UNO_QUERY);
//tsource->setOutputStream(m_rOutputStream);
// End comment
// Added by wangyao for creating pipe2
//creating pipe2
Reference< XOutputStream > x_Pipeout( m_rServiceFactory->createInstance(
OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY );
Reference< XInputStream > x_Pipein( x_Pipeout, UNO_QUERY );
......@@ -504,7 +477,6 @@ sal_Bool XSLTFilter::exporter(
Reference< XActiveDataStreamer > splitout( m_splitControl, UNO_QUERY );
splitout->setStream( m_rStream );
m_rOutputStream = m_rStream->getOutputStream();
// End added
// we will start receiving events after returning 'true'.
// we will start the transformation as soon as we receive the startDocument
......@@ -530,9 +502,8 @@ void XSLTFilter::endDocument() throw (SAXException, RuntimeException){
OSL_ASSERT(m_rDocumentHandler.is());
m_rDocumentHandler->endDocument();
// add by wangyao, when the inputStream(outputStream of filter) was closed, start to parse it.
//when the inputStream(outputStream of filter) was closed, start to parse it.
m_splitControl->start();
// end adding.
// wait for the transformer to finish
osl_waitCondition(m_cTransformed, 0);
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#ifndef FILTER_SOURCE_XSLTFILTER_CONTAINERHELPER_HXX
#define FILTER_SOURCE_XSLTFILTER_CONTAINERHELPER_HXX
......
......@@ -20,9 +20,10 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format
#include "precompiled_filter.hxx"
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
#include "uof2merge.hxx"
#include <cppuhelper/implbase1.hxx>
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#ifndef FILTER_SOURCE_XSLTFILTER_UOF2MERGE_HXX
#define FILTER_SOURCE_XSLTFILTER_UOF2MERGE_HXX
......
......@@ -22,7 +22,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_filter.hxx"
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#ifndef _UOF2_SPLIT_HELPER_HXX_
#define _UOF2_SPLIT_HELPER_HXX_
......
......@@ -20,9 +20,10 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format
#include "precompiled_filter.hxx"
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
#include <cppuhelper/implbase4.hxx>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
......
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format
#ifndef _UOF2_SPLITER_HXX_
#define _UOF2_SPLITER_HXX_
......
......@@ -20,9 +20,10 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format
#include "precompiled_filter.hxx"
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
#include "uof2storage.hxx"
#include <com/sun/star/io/XInputStream.hpp>
......
......@@ -20,7 +20,7 @@
**************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
//This file is about the conversion of the UOF v2.0 and ODF document format from CS2C 20120610.
//This file is about the conversion of the UOF v2.0 and ODF document format
#ifndef FILTER_SOURCE_XSLTFILTER_UOF2STORAGE_HXX
#define FILTER_SOURCE_XSLTFILTER_UOF2STORAGE_HXX
......
......@@ -420,7 +420,7 @@ Directory gid_Dir_Share_Xslt_Import_uof
ParentID = gid_Dir_Share_Xslt_Import;
DosName = "uof";
End
///Begin Added by wangyumin for uof2-filter from cs2c yumin.wang@cs2c.com.cn on 2012-2-22 14:32:18
/// Begin for uof2-filter
Directory gid_Dir_Share_Xslt_Export_uof2
ParentID = gid_Dir_Share_Xslt_Export;
DosName = "uof2";
......@@ -429,7 +429,7 @@ Directory gid_Dir_Share_Xslt_Import_uof2
ParentID = gid_Dir_Share_Xslt_Import;
DosName = "uof2";
End
/// End Added by wangyumin on 2012-2-22 14:32:18
/// End
Directory gid_Dir_Share_Xslt_Export_Wordml
ParentID = gid_Dir_Share_Xslt_Export;
DosName = "wordml";
......
......@@ -1445,7 +1445,7 @@ File gid_File_Xsl_Import_uof_uof2odf_presentation
Dir = gid_Dir_Share_Xslt_Import_uof;
Name = "/xslt/import/uof/uof2odf_presentation.xsl";
End
/// This is added by wangyumin for uof2-filter from cs2c yumin.wang@cs2c.com.cn on 2012-5-22 14:23:39
///Begin for uof2-filter
File gid_File_Xsl_Export_uof2_odf2uof
TXT_FILE_BODY;
Styles = (PACKED);
......@@ -1459,7 +1459,7 @@ File gid_File_Xsl_Import_uof2_uof2odf
Dir = gid_Dir_Share_Xslt_Import_uof2;
Name = "/xslt/import/uof2/uof2odf.xsl";
End
/// End added by wangyumin on 2012-5-22 14:23:39
/// End
File gid_File_Xsl_Export_Wordml_Ooo2wordml_Border
TXT_FILE_BODY;
Styles = (PACKED);
......
......@@ -186,7 +186,7 @@ Module gid_Module_Root_Files_4
gid_File_Lib_Lng,
gid_File_Lib_Offacc,
gid_File_Lib_Oox,
gid_File_Lib_Uof,/** This is added by wangyumin from on 2012-05-20. */
gid_File_Lib_Uof,
gid_File_Lib_Pcr,
gid_File_Lib_Pdffilter,
gid_File_Lib_Pk,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment