This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new cf7480b Fixed typos
cf7480b is described below
commit cf7480b269c9fded960e54d1d5635d842e92c0d7
Author: mseidel <[email protected]>
AuthorDate: Tue Mar 9 10:00:31 2021 +0100
Fixed typos
---
main/filter/source/xsltfilter/XSLTFilter.cxx | 28 +++----
.../FlatXmlFilter_cpp/FlatXml.cxx | 90 +++++++++++-----------
2 files changed, 60 insertions(+), 58 deletions(-)
diff --git a/main/filter/source/xsltfilter/XSLTFilter.cxx
b/main/filter/source/xsltfilter/XSLTFilter.cxx
index 435d086..7f6ffd7 100644
--- a/main/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/main/filter/source/xsltfilter/XSLTFilter.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* 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
@@ -7,19 +7,21 @@
* 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
+
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_filter.hxx"
#include <stdio.h>
@@ -254,7 +256,7 @@ sal_Bool XSLTFilter::importer(
const OUString udStyleSheet = rel2abs( msUserData[4] );
// get information from media descriptor
- // the imput stream that represents the imported file
+ // the input stream that represents the imported file
// is most important here since we need to supply it to
// the sax parser that drives the supplied document handler
const sal_Int32 nLength = aSourceData.getLength();
@@ -310,7 +312,7 @@ sal_Bool XSLTFilter::importer(
// connect input to transformer
Reference< XActiveDataSink > tsink(m_tcontrol, UNO_QUERY);
- //UOF v2 import
+ // UOF v2 import
UOF2Storage aUOF2Storage( m_rServiceFactory, xInputStream );
if ( aUOF2Storage.isValidUOF2Doc() )
{
@@ -396,7 +398,7 @@ sal_Bool XSLTFilter::exporter(
// read source data
// we are especially interested in the output stream
// since that is where our xml-writer will push the data
- // from it's data-source interface
+ // from its data-source interface
OUString sURL;
sal_Bool bIndent = sal_False;
OUString aDoctypePublic;
@@ -416,7 +418,7 @@ sal_Bool XSLTFilter::exporter(
aSourceData[i].Value >>= m_rOutputStream;
else if ( aName.equalsAscii( "URL" ) )
aSourceData[i].Value >>= sURL;
- //UOF v2.0 export, get Stream for constructing UOF2Storage
+ // UOF v2.0 export, get Stream for constructing UOF2Storage
if ( aName.equalsAscii( "StreamForOutput" ) )
aSourceData[i].Value >>= m_rStream;
}
@@ -484,7 +486,7 @@ sal_Bool XSLTFilter::exporter(
return sal_False;
}
- //creating pipe2
+ // creating pipe2
Reference< XOutputStream > x_Pipeout(
m_rServiceFactory->createInstance(
OUString::createFromAscii( "com.sun.star.io.Pipe" ) ),
UNO_QUERY );
@@ -536,7 +538,7 @@ void XSLTFilter::endDocument() throw (SAXException,
RuntimeException){
// m_splitControl only set for UOF 2
if ( m_splitControl.is() )
{
- //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();
}
@@ -545,7 +547,7 @@ void XSLTFilter::endDocument() throw (SAXException,
RuntimeException){
if (!m_bError && !m_bTerminated)
{
return;
- } else {
+ } else {
throw RuntimeException();
}
diff --git
a/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
b/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
index 00c95ff..69483f0 100644
---
a/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++
b/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* 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
@@ -7,16 +7,16 @@
* 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.
- *
+ *
*************************************************************/
@@ -76,61 +76,61 @@ private:
public:
// ctor...
- XFlatXml( const Reference< XMultiServiceFactory > &r )
+ XFlatXml( const Reference< XMultiServiceFactory > &r )
: m_rServiceFactory(r)
, m_bPrettyPrint(sal_True)
{}
// XImportFilter
virtual sal_Bool SAL_CALL importer(
- const Sequence<PropertyValue>& aSourceData,
- const Reference<XDocumentHandler>& xHandler,
- const Sequence<OUString>& msUserData)
+ const Sequence<PropertyValue>& aSourceData,
+ const Reference<XDocumentHandler>& xHandler,
+ const Sequence<OUString>& msUserData)
throw(RuntimeException);
// XExportFilter
virtual sal_Bool SAL_CALL exporter(
- const Sequence<PropertyValue>& aSourceData,
- const Sequence<OUString>& msUserData)
+ const Sequence<PropertyValue>& aSourceData,
+ const Sequence<OUString>& msUserData)
throw(RuntimeException);
// XDocumentHandler
- virtual void SAL_CALL startDocument()
+ virtual void SAL_CALL startDocument()
throw (SAXException,RuntimeException);
- virtual void SAL_CALL endDocument()
+ virtual void SAL_CALL endDocument()
throw (SAXException, RuntimeException);
- virtual void SAL_CALL startElement(const OUString& str, const
Reference<XAttributeList>& attriblist)
+ virtual void SAL_CALL startElement(const OUString& str, const
Reference<XAttributeList>& attriblist)
throw (SAXException,RuntimeException);
- virtual void SAL_CALL endElement(const OUString& str)
+ virtual void SAL_CALL endElement(const OUString& str)
throw (SAXException, RuntimeException);
- virtual void SAL_CALL characters(const OUString& str)
+ virtual void SAL_CALL characters(const OUString& str)
throw (SAXException, RuntimeException);
- virtual void SAL_CALL ignorableWhitespace(const OUString& str)
+ virtual void SAL_CALL ignorableWhitespace(const OUString& str)
throw (SAXException, RuntimeException);
- virtual void SAL_CALL processingInstruction(const OUString& str, const
OUString& str2)
+ virtual void SAL_CALL processingInstruction(const OUString& str, const
OUString& str2)
throw (com::sun::star::xml::sax::SAXException,RuntimeException);
- virtual void SAL_CALL setDocumentLocator(const Reference<XLocator>&
doclocator)
- throw (SAXException,RuntimeException);
+ virtual void SAL_CALL setDocumentLocator(const Reference<XLocator>&
doclocator)
+ throw (SAXException,RuntimeException);
};
sal_Bool XFlatXml::importer(
- const Sequence<PropertyValue>& aSourceData,
- const Reference<XDocumentHandler>& xHandler,
- const Sequence<OUString>& msUserData)
+ const Sequence<PropertyValue>& aSourceData,
+ const Reference<XDocumentHandler>& xHandler,
+ const Sequence<OUString>& msUserData)
throw (RuntimeException)
{
// get information from media descriptor
- // the imput stream that represents the imported file
+ // the input stream that represents the imported file
// is most important here since we need to supply it to
// the sax parser that drives the supplied document handler
sal_Int32 nLength = aSourceData.getLength();
OUString aName, aFileName, aURL;
- Reference< XInputStream > xInputStream;
+ Reference< XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
aName = aSourceData[i].Name;
if (aName.equalsAscii("InputStream"))
- aSourceData[i].Value >>= xInputStream;
+ aSourceData[i].Value >>= xInputStream;
else if ( aName.equalsAscii("FileName"))
aSourceData[i].Value >>= aFileName;
else if ( aName.equalsAscii("URL"))
@@ -146,17 +146,17 @@ sal_Bool XFlatXml::importer(
if (xSeek.is())
xSeek->seek(0);
-
+
// create SAX parser that will read the document file
// and provide events to xHandler passed to this call
- Reference < XParser > xSaxParser( m_rServiceFactory->createInstance(
+ Reference < XParser > xSaxParser( m_rServiceFactory->createInstance(
OUString::createFromAscii("com.sun.star.xml.sax.Parser")), UNO_QUERY );
OSL_ASSERT(xSaxParser.is());
if(!xSaxParser.is())return sal_False;
// let the parser try to send the sax event to the document handler
try
- {
+ {
InputSource aInput;
aInput.sSystemId = aURL;
aInput.sPublicId = aURL;
@@ -176,20 +176,20 @@ sal_Bool XFlatXml::importer(
}
sal_Bool XFlatXml::exporter(
- const Sequence<PropertyValue>& aSourceData,
- const Sequence<OUString>& msUserData)
+ const Sequence<PropertyValue>& aSourceData,
+ const Sequence<OUString>& msUserData)
throw (RuntimeException)
{
// read source data
// we are especially interested in the output stream
// since that is where our xml-writer will push the data
- // from it's data-source interface
+ // from its data-source interface
OUString aName, sURL;
Reference<XOutputStream> rOutputStream;
- sal_Int32 nLength = aSourceData.getLength();
+ sal_Int32 nLength = aSourceData.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
+ {
aName = aSourceData[i].Name;
if ( aName.equalsAscii("OutputStream"))
aSourceData[i].Value >>= rOutputStream;
@@ -231,44 +231,44 @@ void XFlatXml::endDocument() throw
(SAXException,RuntimeException){
m_rDocumentHandler->endDocument();
}
-void XFlatXml::startElement(const OUString& str, const
Reference<XAttributeList>& attriblist)
+void XFlatXml::startElement(const OUString& str, const
Reference<XAttributeList>& attriblist)
throw (SAXException, RuntimeException)
{
OSL_ASSERT(m_rDocumentHandler.is());
m_rDocumentHandler->startElement(str, attriblist);
}
-void XFlatXml::endElement(const OUString& str)
- throw (SAXException, RuntimeException)
+void XFlatXml::endElement(const OUString& str)
+ throw (SAXException, RuntimeException)
{
OSL_ASSERT(m_rDocumentHandler.is());
m_rDocumentHandler->endElement(str);
}
-void XFlatXml::characters(const OUString& str)
- throw (SAXException, RuntimeException)
+void XFlatXml::characters(const OUString& str)
+ throw (SAXException, RuntimeException)
{
OSL_ASSERT(m_rDocumentHandler.is());
m_rDocumentHandler->characters(str);
}
-void XFlatXml::ignorableWhitespace(const OUString& str)
+void XFlatXml::ignorableWhitespace(const OUString& str)
throw (SAXException, RuntimeException)
-{
+{
OSL_ASSERT(m_rDocumentHandler.is());
if (!m_bPrettyPrint) return;
m_rDocumentHandler->ignorableWhitespace(str);
}
-
-void XFlatXml::processingInstruction(const OUString& str, const OUString&
str2)
- throw (SAXException, RuntimeException)
+
+void XFlatXml::processingInstruction(const OUString& str, const OUString&
str2)
+ throw (SAXException, RuntimeException)
{
OSL_ASSERT(m_rDocumentHandler.is());
m_rDocumentHandler->processingInstruction(str, str2);
}
-void XFlatXml::setDocumentLocator(const Reference<XLocator>& doclocator)
- throw (SAXException, RuntimeException)
+void XFlatXml::setDocumentLocator(const Reference<XLocator>& doclocator)
+ throw (SAXException, RuntimeException)
{
OSL_ASSERT(m_rDocumentHandler.is());
m_rDocumentHandler->setDocumentLocator(doclocator);