summaryrefslogtreecommitdiff
path: root/svx/inc/svx/fmtools.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/inc/svx/fmtools.hxx')
-rw-r--r--svx/inc/svx/fmtools.hxx158
1 files changed, 4 insertions, 154 deletions
diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx
index 02e063e0314d..b74f00aa236c 100644
--- a/svx/inc/svx/fmtools.hxx
+++ b/svx/inc/svx/fmtools.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmtools.hxx,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,6 +27,8 @@
#ifndef _SVX_FMTOOLS_HXX
#define _SVX_FMTOOLS_HXX
+#include "svx/svxdllapi.h"
+
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
@@ -48,7 +47,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
-#include <com/sun/star/frame/XInterceptorInfo.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
@@ -66,38 +64,18 @@
#include <com/sun/star/awt/FontStrikeout.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <vcl/wintypes.hxx>
-#include <vos/mutex.hxx>
-
-#ifndef _SVSTDARR_ULONGS
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
-#endif
-#include <sfx2/ctrlitem.hxx>
-#include <tools/link.hxx>
-#include <tools/date.hxx>
-#include <tools/time.hxx>
-#include <tools/datetime.hxx>
-
-//#include "fmprop.hrc"
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XObjectOutputStream.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
-#include <cppuhelper/interfacecontainer.h>
-#include <cppuhelper/compbase2.hxx>
-#include <cppuhelper/compbase3.hxx>
+
+#include <vcl/wintypes.hxx>
#include <cppuhelper/weakref.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/component.hxx>
-
-#include <svx/svxdllapi.h>
#include <set>
@@ -114,24 +92,7 @@ SVX_DLLPUBLIC void displayException(const ::com::sun::star::sdb::SQLContext&, Wi
void displayException(const ::com::sun::star::sdb::SQLErrorEvent&, Window* _pParent = NULL);
void displayException(const ::com::sun::star::uno::Any&, Window* _pParent = NULL);
-#define DATA_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) )
-#define FILTER_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) )
-
-// Kopieren von Persistenten Objecten
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> cloneUsingProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj);
-
-sal_Int32 findPos(const ::rtl::OUString& aStr, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList);
-
-// Suchen in einer Indexliste nach einem Element
-sal_Bool searchElement(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement);
-
sal_Int32 getElementPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement);
-String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement);
-String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rTopLevelElement);
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> getElementFromAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xParent, const String& _rRelativePath);
-
-
-::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> getXModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xIface);
SVX_DLLPUBLIC ::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel);
@@ -236,10 +197,8 @@ protected:
void setAdapter(FmXDisposeMultiplexer* pAdapter);
};
-typedef ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener> FmXDisposeMultiplexer_x;
//==============================================================================
-
class FmXDisposeMultiplexer :public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener>
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xObject;
@@ -258,119 +217,10 @@ public:
// ==================================================================
-//========================================================================
-//= dispatch interception helper classes
-//========================================================================
-
-//------------------------------------------------------------------------
-//- FmDispatchInterceptor
-//------------------------------------------------------------------------
-class FmDispatchInterceptor
-{
-public:
- FmDispatchInterceptor() { }
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> interceptedQueryDispatch(sal_uInt16 _nId,
- const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException ) = 0;
-
- virtual ::osl::Mutex* getInterceptorMutex() = 0;
-};
-
-//------------------------------------------------------------------------
-//- FmXDispatchInterceptorImpl
-//------------------------------------------------------------------------
-typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::frame::XDispatchProviderInterceptor
- , ::com::sun::star::lang::XEventListener
- , ::com::sun::star::frame::XInterceptorInfo
- > FmXDispatchInterceptorImpl_BASE;
-
-class FmXDispatchInterceptorImpl : public FmXDispatchInterceptorImpl_BASE
-{
- ::osl::Mutex m_aFallback;
-
- // the component which's dispatches we're intercepting
- ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProviderInterception>
- m_xIntercepted;
- sal_Bool m_bListening;
-
- // the real interceptor
- FmDispatchInterceptor* m_pMaster;
-
- // chaining
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xSlaveDispatcher;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xMasterDispatcher;
-
- // our id
- sal_Int16 m_nId;
-
- ::com::sun::star::uno::Sequence< ::rtl::OUString >
- m_aInterceptedURLSchemes;
-
- virtual ~FmXDispatchInterceptorImpl();
-
-public:
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> getIntercepted() const { return m_xIntercepted; }
-
-public:
- FmXDispatchInterceptorImpl(
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _rToIntercept,
- FmDispatchInterceptor* _pMaster,
- sal_Int16 _nId,
- ::com::sun::star::uno::Sequence< ::rtl::OUString > _rInterceptedSchemes /// if not empty, this will be used for getInterceptedURLs
- );
-
- // StarOne
- DECLARE_UNO3_DEFAULTS(FmXDispatchInterceptorImpl, FmXDispatchInterceptorImpl_BASE);
- // virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
-
-
- // ::com::sun::star::frame::XDispatchProvider
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::frame::XDispatchProviderInterceptor
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setSlaveDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewDispatchProvider ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setMasterDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewSupplier ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::frame::XInterceptorInfo
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getInterceptedURLs( ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::lang::XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
-
- // OComponentHelper
- virtual void SAL_CALL disposing();
-
-protected:
- void ImplDetach();
-
- ::osl::Mutex& getAccessSafety()
- {
- if (m_pMaster && m_pMaster->getInterceptorMutex())
- return *m_pMaster->getInterceptorMutex();
- return m_aFallback;
- }
-};
-
-//==================================================================
-// ...
-//==================================================================
-::rtl::OUString getServiceNameByControlType(sal_Int16 nType);
- // get a service name to create a model of the given type (OBJ_FM_...)
sal_Int16 getControlTypeByObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>& _rxObject);
// get the object type (OBJ_FM_...) from the services the object supports
-void TransferEventScripts(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor>& rTransferIfAvailable);
-
-sal_Int16 GridView2ModelPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nViewPos);
-
//==================================================================
-sal_Bool isLoadable(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xLoad);
sal_Bool isRowSetAlive(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxRowSet);
// checks if the ::com::sun::star::sdbcx::XColumnsSupplier provided by _rxRowSet supllies any columns