summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-08-14 23:12:27 -0300
committerCaolán McNamara <caolanm@redhat.com>2013-08-15 09:33:36 +0000
commit9b7aa16a138ef4740deceac7d2e5bc6c8709b0c5 (patch)
treedf224d7154e450427e0627d7140ea34f80d2ac0d /starmath
parent28293f6f28e704ef9aea34c755051b1df005a5d8 (diff)
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>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/Library_sm.mk1
-rw-r--r--starmath/inc/types.hxx2
-rw-r--r--starmath/source/mathmlexport.cxx31
-rw-r--r--starmath/source/types.cxx42
4 files changed, 10 insertions, 66 deletions
diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk
index a56e4391b3e6..c24dd27860dc 100644
--- a/starmath/Library_sm.mk
+++ b/starmath/Library_sm.mk
@@ -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 \
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index 7ef060e547fe..712f05a85c0b 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -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 );
/////////////////////////////////////////////////////////////////
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 6c9aab2763ab..659f5a9e0a89 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -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: */
diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx
deleted file mode 100644
index 45c24c7c77b4..000000000000
--- a/starmath/source/types.cxx
+++ /dev/null
@@ -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: */