summaryrefslogtreecommitdiff
path: root/xmloff/source/transform
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-09 12:04:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-09 12:04:12 +0200
commit9c51f5b80640034097457de9603f4ffa021e42ff (patch)
tree42c7e043617e03029bd2b8eb85238f9dd782728a /xmloff/source/transform
parente1bc666cda47eff1305253923ab16b9fd4eb3d42 (diff)
Clean up function declarations and some unused functions
Change-Id: I2ca50a15209503020047975ac848df98b74089af
Diffstat (limited to 'xmloff/source/transform')
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx48
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx1
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx1
-rw-r--r--xmloff/source/transform/PersMixedContentTContext.cxx1
-rw-r--r--xmloff/source/transform/XMLFilterRegistration.cxx39
-rw-r--r--xmloff/source/transform/XMLFilterRegistration.hxx64
6 files changed, 68 insertions, 86 deletions
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index 9c2007f7bb93..d83e02e91db8 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -127,54 +127,6 @@ OUString XMLEventOASISTransformerContext::GetEventName(
return (*aIter).second;
}
-bool ParseURLAsString(
- const OUString& rAttrValue,
- OUString* pName, OUString* pLocation )
-{
- OUString SCHEME( "vnd.sun.star.script:" );
-
- sal_Int32 params = rAttrValue.indexOf( '?' );
- if ( rAttrValue.indexOf( SCHEME ) != 0 || params < 0 )
- {
- return false;
- }
-
- sal_Int32 start = SCHEME.getLength();
- *pName = rAttrValue.copy( start, params - start );
-
- OUString aToken;
- OUString aLanguage;
- params++;
- do
- {
- aToken = rAttrValue.getToken( 0, '&', params );
- sal_Int32 dummy = 0;
-
- if ( aToken.match( GetXMLToken( XML_LANGUAGE ) ) )
- {
- aLanguage = aToken.getToken( 1, '=', dummy );
- }
- else if ( aToken.match( GetXMLToken( XML_LOCATION ) ) )
- {
- OUString tmp = aToken.getToken( 1, '=', dummy );
- if ( tmp.equalsIgnoreAsciiCase( GetXMLToken( XML_DOCUMENT ) ) )
- {
- *pLocation = GetXMLToken( XML_DOCUMENT );
- }
- else
- {
- *pLocation = GetXMLToken( XML_APPLICATION );
- }
- }
- } while ( params >= 0 );
-
- if ( aLanguage.equalsIgnoreAsciiCase("basic") )
- {
- return true;
- }
- return false;
-}
-
bool ParseURL(
const OUString& rAttrValue,
OUString* pName, OUString* pLocation )
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index d3c3fbbf7c94..dc97349a8518 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -38,6 +38,7 @@
#include "PropertyActionsOOo.hxx"
#include "TransformerActions.hxx"
#include "OOo2Oasis.hxx"
+#include "XMLFilterRegistration.hxx"
#include <cppuhelper/supportsservice.hxx>
using namespace ::xmloff::token;
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index fe85a0025d5b..c340b19ed853 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -40,6 +40,7 @@
#include "AttrTransformerAction.hxx"
#include "TransformerActions.hxx"
#include "FamilyType.hxx"
+#include "facreg.hxx"
#include <comphelper/servicehelper.hxx>
#include "Oasis2OOo.hxx"
#include <cppuhelper/supportsservice.hxx>
diff --git a/xmloff/source/transform/PersMixedContentTContext.cxx b/xmloff/source/transform/PersMixedContentTContext.cxx
index 18cb12994ca5..160161678205 100644
--- a/xmloff/source/transform/PersMixedContentTContext.cxx
+++ b/xmloff/source/transform/PersMixedContentTContext.cxx
@@ -44,7 +44,6 @@ public:
virtual sal_Bool IsPersistent() const SAL_OVERRIDE;
virtual void Export() SAL_OVERRIDE;
- const OUString& GetText() const { return m_aCharacters; }
};
TYPEINIT1( XMLPersTextTContext_Impl, XMLTransformerContext );
diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx
index 062545948cae..5d3c7a80b4be 100644
--- a/xmloff/source/transform/XMLFilterRegistration.cxx
+++ b/xmloff/source/transform/XMLFilterRegistration.cxx
@@ -21,48 +21,13 @@
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <cppuhelper/factory.hxx>
-using namespace ::com::sun::star;
+#include <XMLFilterRegistration.hxx>
-#define DECLARE_SERVICE( classname ) \
- extern OUString SAL_CALL classname##_getImplementationName() throw(); \
- extern uno::Sequence< OUString > SAL_CALL classname##_getSupportedServiceNames() throw(); \
- extern uno::Reference< uno::XInterface > SAL_CALL classname##_createInstance( \
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception );
+using namespace ::com::sun::star;
#define ENUMERATE_SERVICE( classname ) \
{ classname##_getImplementationName, classname##_getSupportedServiceNames, classname##_createInstance }
-DECLARE_SERVICE( OOo2OasisTransformer )
-DECLARE_SERVICE( Oasis2OOoTransformer )
-
-DECLARE_SERVICE( XMLAutoTextEventImportOOO )
-DECLARE_SERVICE( XMLMetaImportOOO )
-DECLARE_SERVICE( XMLMathSettingsImportOOO )
-DECLARE_SERVICE( XMLMathMetaImportOOO )
-DECLARE_SERVICE( XMLCalcSettingsImportOOO )
-DECLARE_SERVICE( XMLCalcMetaImportOOO )
-DECLARE_SERVICE( XMLCalcContentImportOOO )
-DECLARE_SERVICE( XMLCalcStylesImportOOO )
-DECLARE_SERVICE( XMLCalcImportOOO )
-DECLARE_SERVICE( XMLWriterSettingsImportOOO )
-DECLARE_SERVICE( XMLWriterMetaImportOOO )
-DECLARE_SERVICE( XMLWriterContentImportOOO )
-DECLARE_SERVICE( XMLWriterStylesImportOOO )
-DECLARE_SERVICE( XMLWriterImportOOO )
-DECLARE_SERVICE( XMLChartContentImportOOO )
-DECLARE_SERVICE( XMLChartStylesImportOOO )
-DECLARE_SERVICE( XMLChartImportOOO )
-DECLARE_SERVICE( XMLDrawSettingsImportOOO )
-DECLARE_SERVICE( XMLDrawMetaImportOOO )
-DECLARE_SERVICE( XMLDrawContentImportOOO )
-DECLARE_SERVICE( XMLDrawStylesImportOOO )
-DECLARE_SERVICE( XMLDrawImportOOO )
-DECLARE_SERVICE( XMLImpressSettingsImportOOO )
-DECLARE_SERVICE( XMLImpressMetaImportOOO )
-DECLARE_SERVICE( XMLImpressContentImportOOO )
-DECLARE_SERVICE( XMLImpressStylesImportOOO )
-DECLARE_SERVICE( XMLImpressImportOOO )
-
namespace
{
typedef OUString (SAL_CALL * GetImplementationName)();
diff --git a/xmloff/source/transform/XMLFilterRegistration.hxx b/xmloff/source/transform/XMLFilterRegistration.hxx
new file mode 100644
index 000000000000..cb583ecf200a
--- /dev/null
+++ b/xmloff/source/transform/XMLFilterRegistration.hxx
@@ -0,0 +1,64 @@
+/* -*- 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_XMLOFF_SOURCE_TRANSFORM_XMLFILTERREGISTRATION_HXX
+#define INCLUDED_XMLOFF_SOURCE_TRANSFORM_XMLFILTERREGISTRATION_HXX
+
+#include <sal/config.h>
+
+#define DECLARE_SERVICE( classname ) \
+ OUString SAL_CALL classname##_getImplementationName() throw(); \
+ css::uno::Sequence< OUString > SAL_CALL classname##_getSupportedServiceNames() throw(); \
+ css::uno::Reference< css::uno::XInterface > SAL_CALL classname##_createInstance( \
+ const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) throw( css::uno::Exception );
+
+DECLARE_SERVICE( OOo2OasisTransformer )
+DECLARE_SERVICE( Oasis2OOoTransformer )
+
+DECLARE_SERVICE( XMLAutoTextEventImportOOO )
+DECLARE_SERVICE( XMLMetaImportOOO )
+DECLARE_SERVICE( XMLMathSettingsImportOOO )
+DECLARE_SERVICE( XMLMathMetaImportOOO )
+DECLARE_SERVICE( XMLCalcSettingsImportOOO )
+DECLARE_SERVICE( XMLCalcMetaImportOOO )
+DECLARE_SERVICE( XMLCalcContentImportOOO )
+DECLARE_SERVICE( XMLCalcStylesImportOOO )
+DECLARE_SERVICE( XMLCalcImportOOO )
+DECLARE_SERVICE( XMLWriterSettingsImportOOO )
+DECLARE_SERVICE( XMLWriterMetaImportOOO )
+DECLARE_SERVICE( XMLWriterContentImportOOO )
+DECLARE_SERVICE( XMLWriterStylesImportOOO )
+DECLARE_SERVICE( XMLWriterImportOOO )
+DECLARE_SERVICE( XMLChartContentImportOOO )
+DECLARE_SERVICE( XMLChartStylesImportOOO )
+DECLARE_SERVICE( XMLChartImportOOO )
+DECLARE_SERVICE( XMLDrawSettingsImportOOO )
+DECLARE_SERVICE( XMLDrawMetaImportOOO )
+DECLARE_SERVICE( XMLDrawContentImportOOO )
+DECLARE_SERVICE( XMLDrawStylesImportOOO )
+DECLARE_SERVICE( XMLDrawImportOOO )
+DECLARE_SERVICE( XMLImpressSettingsImportOOO )
+DECLARE_SERVICE( XMLImpressMetaImportOOO )
+DECLARE_SERVICE( XMLImpressContentImportOOO )
+DECLARE_SERVICE( XMLImpressStylesImportOOO )
+DECLARE_SERVICE( XMLImpressImportOOO )
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */