summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-02-02 00:03:23 +0100
committerMichael Stahl <mstahl@redhat.com>2013-02-03 02:14:16 +0100
commitb49e0680d7511487a66e73a0acb1137f6043bb94 (patch)
treefecab567a6b9b1fa2bb9947d21ec60ff3a7a03e1 /sw/inc
parentb40f4e258a7825516dac43a1a56809948cf4de6b (diff)
sw: split out SwXTextFieldMasters, SwXTextFieldTypes from unofield.hxx
Change-Id: I3d3d240b32105d9409089fed966fb6d62e78adf9
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/unofield.hxx88
-rw-r--r--sw/inc/unofieldcoll.hxx136
2 files changed, 145 insertions, 79 deletions
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index ddcc2e87695d..2636e71be5e4 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -16,18 +16,23 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _UNOFIELD_HXX
-#define _UNOFIELD_HXX
+
+#ifndef SW_UNOFIELD_HXX
+#define SW_UNOFIELD_HXX
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase5.hxx>
+#include <tools/string.hxx>
+
#include <calbck.hxx>
-#include <unocoll.hxx>
#include <RefreshListenerContainer.hxx>
@@ -198,79 +203,6 @@ public:
sal_uInt16 GetServiceId();
};
-typedef
-cppu::WeakImplHelper2
-<
- ::com::sun::star::container::XNameAccess,
- ::com::sun::star::lang::XServiceInfo
->
-SwXTextFieldMastersBaseClass;
-class SwXTextFieldMasters : public SwXTextFieldMastersBaseClass,
- public SwUnoCollection
-{
-protected:
- virtual ~SwXTextFieldMasters();
-public:
- SwXTextFieldMasters(SwDoc* pDoc);
-
-
- //XNameAccess
- virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
-
- //XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
-
- //XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
-
-
- static sal_Bool getInstanceName(const SwFieldType& rFldType, String& rName);
-};
-
-typedef
-cppu::WeakImplHelper3
-<
- ::com::sun::star::container::XEnumerationAccess,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::util::XRefreshable
->
-SwXTextFieldTypesBaseClass;
-class SwXTextFieldTypes : public SwXTextFieldTypesBaseClass,
- public SwUnoCollection
-{
- SwRefreshListenerContainer aRefreshCont;
-protected:
- virtual ~SwXTextFieldTypes();
-public:
- SwXTextFieldTypes(SwDoc* pDoc);
-
-
- //XEnumerationAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
-
- //XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::util::XRefreshable
- virtual void SAL_CALL refresh( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException);
-
- //XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
-
- // SwUnoCollection
- virtual void Invalidate();
-};
-
class SwXFieldEnumeration : public cppu::WeakImplHelper2
<
::com::sun::star::container::XEnumeration,
@@ -302,6 +234,4 @@ public:
};
#endif
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unofieldcoll.hxx b/sw/inc/unofieldcoll.hxx
new file mode 100644
index 000000000000..de024fecbdf7
--- /dev/null
+++ b/sw/inc/unofieldcoll.hxx
@@ -0,0 +1,136 @@
+/* -*- 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 SW_UNOFIELDCOLL_HXX
+#define SW_UNOFIELDCOLL_HXX
+
+#include <com/sun/star/util/XRefreshable.hpp>
+
+#include <unocoll.hxx>
+#include <RefreshListenerContainer.hxx>
+
+class SwFieldType;
+
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::container::XNameAccess
+, ::com::sun::star::lang::XServiceInfo
+> SwXTextFieldMasters_Base;
+
+class SwXTextFieldMasters
+ : public SwXTextFieldMasters_Base
+ , public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextFieldMasters();
+
+public:
+ SwXTextFieldMasters(SwDoc* pDoc);
+
+ static sal_Bool getInstanceName(const SwFieldType& rFldType, String& rName);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(
+ const ::rtl::OUString& rName)
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getElementNames() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& rName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+typedef ::cppu::WeakImplHelper3
+< ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::util::XRefreshable
+> SwXTextFieldTypes_Base;
+
+class SwXTextFieldTypes
+ : public SwXTextFieldTypes_Base
+ , public SwUnoCollection
+{
+private:
+ SwRefreshListenerContainer aRefreshCont;
+
+protected:
+ virtual ~SwXTextFieldTypes();
+
+public:
+ SwXTextFieldTypes(SwDoc* pDoc);
+
+ // SwUnoCollection
+ virtual void Invalidate();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XRefreshable
+ virtual void SAL_CALL refresh()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addRefreshListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XRefreshListener>& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRefreshListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XRefreshListener>& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */