Math: Remove not needed file

We don't need because this file just have one called function and just in one place.
So, integrate this into mathmlexport and kill this file.

Also remove some useless comments.

Change-Id: Ia5749418d74c89be3d70dd5997fb90e1accf7f9e
Reviewed-on: https://gerrit.libreoffice.org/5431
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Marcos Paulo de Souza
2013-08-14 23:12:27 -03:00
committed by Caolán McNamara
parent 28293f6f28
commit 9b7aa16a13
4 changed files with 10 additions and 66 deletions

View File

@@ -79,7 +79,6 @@ $(eval $(call gb_Library_add_exception_objects,sm,\
starmath/source/symbol \
starmath/source/toolbox \
starmath/source/typemap \
starmath/source/types \
starmath/source/unodoc \
starmath/source/unomodel \
starmath/source/utility \

View File

@@ -34,8 +34,6 @@ inline sal_Bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar
// Greek char range as seen in svx/.../charmap.cxx RID_SUBSETSTR_BASIC_GREEK
inline sal_Bool IsGreekChar( sal_Unicode cChar ) { return 0x0370 <= cChar && cChar <= 0x03FF; }
sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar );
sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
/////////////////////////////////////////////////////////////////

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/*
Warning: The SvXMLElementExport helper class creates the beginning and
closing tags of xml elements in its constructor and destructor, so theres
@@ -25,7 +24,6 @@
may be significant
*/
#include <com/sun/star/xml/sax/XErrorHandler.hpp>
#include <com/sun/star/xml/sax/XEntityResolver.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
@@ -81,13 +79,20 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
#define EXPORT_SVC_NAME "com.sun.star.xml.XMLExportFilter"
#undef WANTEXCEPT
////////////////////////////////////////////////////////////
sal_Unicode ConvertMathToMathML( sal_Unicode cChar )
{
sal_Unicode cRes = cChar;
if (IsInPrivateUseArea( cChar ))
{
SAL_WARN("starmath", "Error: private use area characters should no longer be in use!" );
cRes = (sal_Unicode) '@'; // just some character that should easily be notice as odd in the context
}
return cRes;
}
sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
{
@@ -356,8 +361,6 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
return bRet;
}
////////////////////////////////////////////////////////////
SmXMLExport::SmXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
sal_uInt16 nExportFlags)
@@ -413,8 +416,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance(
return (cppu::OWeakObject*)new SmXMLExport( comphelper::getComponentContext(rSMgr), EXPORT_OASIS|EXPORT_ALL );
}
////////////////////////////////////////////////////////////
OUString SAL_CALL SmXMLExportMetaOOO_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLMetaExporter" );
@@ -435,8 +436,6 @@ throw( uno::Exception )
return (cppu::OWeakObject*)new SmXMLExport( comphelper::getComponentContext(rSMgr), EXPORT_META );
}
////////////////////////////////////////////////////////////
OUString SAL_CALL SmXMLExportMeta_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLOasisMetaExporter" );
@@ -457,8 +456,6 @@ throw( uno::Exception )
return (cppu::OWeakObject*)new SmXMLExport( comphelper::getComponentContext(rSMgr), EXPORT_OASIS|EXPORT_META );
}
////////////////////////////////////////////////////////////
OUString SAL_CALL SmXMLExportSettingsOOO_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLSettingsExporter" );
@@ -479,8 +476,6 @@ throw( uno::Exception )
return (cppu::OWeakObject*)new SmXMLExport( comphelper::getComponentContext(rSMgr), EXPORT_SETTINGS );
}
////////////////////////////////////////////////////////////
OUString SAL_CALL SmXMLExportSettings_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLOasisSettingsExporter" );
@@ -501,8 +496,6 @@ throw( uno::Exception )
return (cppu::OWeakObject*)new SmXMLExport( comphelper::getComponentContext(rSMgr), EXPORT_OASIS|EXPORT_SETTINGS );
}
////////////////////////////////////////////////////////////
OUString SAL_CALL SmXMLExportContent_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLContentExporter" );
@@ -525,8 +518,6 @@ throw( uno::Exception )
return (cppu::OWeakObject*)new SmXMLExport( comphelper::getComponentContext(rSMgr), EXPORT_OASIS|EXPORT_CONTENT );
}
////////////////////////////////////////////////////////////
// XServiceInfo
// override empty method from parent class
OUString SAL_CALL SmXMLExport::getImplementationName()
@@ -1662,6 +1653,4 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
}
}
////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -1,42 +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 <types.hxx>
#include <osl/diagnose.h>
sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar )
{
sal_Unicode cRes = cChar;
if (IsInPrivateUseArea( cChar ))
{
OSL_FAIL( "Error: private use area characters should no longer be in use!" );
cRes = (sal_Unicode) '@'; // just some character that should easily be notice as odd in the context
}
return cRes;
}
sal_Unicode ConvertMathToMathML( sal_Unicode cChar )
{
sal_Unicode cRes = ConvertMathPrivateUseAreaToUnicode( cChar );
return cRes;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */