summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/mathmlexport.cxx1
-rw-r--r--starmath/source/mathmlimport.cxx6
-rw-r--r--starmath/source/node.cxx11
-rw-r--r--starmath/source/register.cxx67
-rw-r--r--starmath/source/register.hxx92
-rw-r--r--starmath/source/unodoc.cxx1
-rw-r--r--starmath/source/visitors.cxx10
7 files changed, 100 insertions, 88 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index eabb6607bc07..9fe179a485dc 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -65,6 +65,7 @@
#include <memory>
#include "mathmlexport.hxx"
+#include "register.hxx"
#include <starmath.hrc>
#include <unomodel.hxx>
#include <document.hxx>
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 5bbd122f309b..dcc29f2e70f0 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -63,6 +63,7 @@ one go*/
#include <memory>
#include "mathmlimport.hxx"
+#include "register.hxx"
#include <starmath.hrc>
#include <unomodel.hxx>
#include <document.hxx>
@@ -563,11 +564,6 @@ public:
const OUString& rLName)
: SvXMLImportContext(rImport, nPrfx, rLName) {}
- const SmXMLImport& GetSmImport() const
- {
- return (const SmXMLImport&)GetImport();
- }
-
SmXMLImport& GetSmImport()
{
return (SmXMLImport&)GetImport();
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 5b5baab9f462..24319df243f6 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -27,6 +27,7 @@
#include "mathtype.hxx"
#include "visitors.hxx"
+#include <boost/noncopyable.hpp>
#include <comphelper/string.hxx>
#include <tools/gen.hxx>
#include <tools/fract.hxx>
@@ -51,14 +52,10 @@
// Usually a MapMode of 1/100th mm will be used.
-class SmTmpDevice
+class SmTmpDevice: private boost::noncopyable
{
OutputDevice &rOutDev;
- // disallow use of copy-constructor and assignment-operator
- SmTmpDevice(const SmTmpDevice &rTmpDev);
- SmTmpDevice & operator = (const SmTmpDevice &rTmpDev);
-
Color Impl_GetColor( const Color& rColor );
public:
@@ -67,10 +64,6 @@ public:
void SetFont(const Font &rNewFont);
- void SetLineColor( const Color& rColor ) { rOutDev.SetLineColor( Impl_GetColor(rColor) ); }
- void SetFillColor( const Color& rColor ) { rOutDev.SetFillColor( Impl_GetColor(rColor) ); }
- void SetTextColor( const Color& rColor ) { rOutDev.SetTextColor( Impl_GetColor(rColor) ); }
-
operator OutputDevice & () { return rOutDev; }
};
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index efde8e66df39..063872a23c0a 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -24,6 +24,7 @@
#include <sfx2/sfxmodelfactory.hxx>
+#include "register.hxx"
#include "smdll.hxx"
#include "document.hxx"
#include "unomodel.hxx"
@@ -32,72 +33,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-//Math document
-extern Sequence< OUString > SAL_CALL
- SmDocument_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmDocument_getImplementationName() throw();
-extern Reference< XInterface >SAL_CALL
- SmDocument_createInstance(const Reference< XMultiServiceFactory > & rSMgr, const sal_uInt64 _nCreationFlags) throw( Exception );
-
-//MathML import
-extern Sequence< OUString > SAL_CALL
- SmXMLImport_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLImport_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLImport_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLImportMeta_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLImportMeta_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLImportMeta_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLImportSettings_getSupportedServiceNames() throw();
-extern OUString SAL_CALL SmXMLImportSettings_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLImportSettings_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-
-//MathML export
-extern Sequence< OUString > SAL_CALL
- SmXMLExport_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLExport_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLExport_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLExportMetaOOO_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLExportMetaOOO_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLExportMetaOOO_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLExportMeta_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLExportMeta_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLExportMeta_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLExportSettingsOOO_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLExportSettingsOOO_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLExportSettingsOOO_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLExportSettings_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLExportSettings_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLExportSettings_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-extern Sequence< OUString > SAL_CALL
- SmXMLExportContent_getSupportedServiceNames() throw();
-extern OUString SAL_CALL
- SmXMLExportContent_getImplementationName() throw();
-extern Reference< XInterface > SAL_CALL
- SmXMLExportContent_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception );
-
-
extern "C" {
SAL_DLLPUBLIC_EXPORT void* SAL_CALL sm_component_getFactory( const sal_Char* pImplementationName,
diff --git a/starmath/source/register.hxx b/starmath/source/register.hxx
new file mode 100644
index 000000000000..5aac343b9a42
--- /dev/null
+++ b/starmath/source/register.hxx
@@ -0,0 +1,92 @@
+/* -*- 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 INCLUDED_STARMATH_SOURCE_REGISTER_HXX
+#define INCLUDED_STARMATH_SOURCE_REGISTER_HXX
+
+#include <sal/config.h>
+
+//Math document
+css::uno::Sequence< OUString > SAL_CALL
+ SmDocument_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmDocument_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface >SAL_CALL
+ SmDocument_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, const sal_uInt64 _nCreationFlags) throw( css::uno::Exception );
+
+//MathML import
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLImport_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLImport_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLImport_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLImportMeta_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLImportMeta_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLImportMeta_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLImportSettings_getSupportedServiceNames() throw();
+OUString SAL_CALL SmXMLImportSettings_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLImportSettings_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+
+//MathML export
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLExport_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLExport_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLExport_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLExportMetaOOO_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLExportMetaOOO_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLExportMetaOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLExportMeta_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLExportMeta_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLExportMeta_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLExportSettingsOOO_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLExportSettingsOOO_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLExportSettingsOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLExportSettings_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLExportSettings_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLExportSettings_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+css::uno::Sequence< OUString > SAL_CALL
+ SmXMLExportContent_getSupportedServiceNames() throw();
+OUString SAL_CALL
+ SmXMLExportContent_getImplementationName() throw();
+css::uno::Reference< css::uno::XInterface > SAL_CALL
+ SmXMLExportContent_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx
index 8a38ea19016b..225fa29269c5 100644
--- a/starmath/source/unodoc.cxx
+++ b/starmath/source/unodoc.cxx
@@ -21,6 +21,7 @@
#include <sfx2/sfxmodelfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include "register.hxx"
#include "smdll.hxx"
#include "document.hxx"
#include <osl/mutex.hxx>
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 4c515df44af0..bb8588906ab2 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -458,6 +458,7 @@ void SmCaretPos2LineVisitor::DefaultVisit( SmNode* pNode )
// Nasty temporary device!!!
+#include <boost/noncopyable.hpp>
#include <tools/gen.hxx>
#include <tools/fract.hxx>
#include <rtl/math.hxx>
@@ -469,14 +470,10 @@ void SmCaretPos2LineVisitor::DefaultVisit( SmNode* pNode )
#include "symbol.hxx"
#include "smmod.hxx"
-class SmTmpDevice2
+class SmTmpDevice2: private boost::noncopyable
{
OutputDevice &rOutDev;
- // disallow use of copy-constructor and assignment-operator
- SmTmpDevice2( const SmTmpDevice2 &rTmpDev );
- SmTmpDevice2 & operator = ( const SmTmpDevice2 &rTmpDev );
-
Color Impl_GetColor( const Color& rColor );
public:
@@ -487,9 +484,6 @@ public:
void SetLineColor( const Color& rColor ) { rOutDev.SetLineColor( Impl_GetColor( rColor ) ); }
void SetFillColor( const Color& rColor ) { rOutDev.SetFillColor( Impl_GetColor( rColor ) ); }
- void SetTextColor( const Color& rColor ) { rOutDev.SetTextColor( Impl_GetColor( rColor ) ); }
-
- operator OutputDevice & ( ) const { return rOutDev; }
};
SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm ) :