summaryrefslogtreecommitdiff
path: root/dbaccess/inc
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-10-01 12:28:29 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-10-01 12:28:29 +0000
commit34b1c1b1673dd86becb00eb490abce060682beff (patch)
treed07dc75cbdbd80149cbe81556f6043fedfc577e2 /dbaccess/inc
parent4d01cb7a32b4264bbe3f646e71def13199ed32e2 (diff)
CWS-TOOLING: integrate CWS dba31b
Diffstat (limited to 'dbaccess/inc')
-rw-r--r--dbaccess/inc/genericcontroller.hxx34
1 files changed, 20 insertions, 14 deletions
diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx
index 0b5e88a7a..5ccb5dae4 100644
--- a/dbaccess/inc/genericcontroller.hxx
+++ b/dbaccess/inc/genericcontroller.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: genericcontroller.hxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.13.24.2 $
*
* This file is part of OpenOffice.org.
*
@@ -77,7 +77,7 @@ namespace dbaui
// ====================================================================
// = optional
// ====================================================================
- /** convenience wrapper around boost::optional, allowing type assignments
+ /** convenience wrapper around boost::optional, allowing typed assignments
*/
template < typename T >
class optional : public ::boost::optional< T >
@@ -134,21 +134,20 @@ namespace dbaui
// = helper
// ====================================================================
- // --------------------------------------------------------------------
// ....................................................................
struct ControllerFeature : public ::com::sun::star::frame::DispatchInformation
{
sal_uInt16 nFeatureId;
};
+ // ....................................................................
typedef ::std::map < ::rtl::OUString
, ControllerFeature
, ::std::less< ::rtl::OUString >
> SupportedFeatures;
- /// binary_function Functor object for class SupportedFeatures::value_type returntype is bool
// ....................................................................
- struct SupportedFeaturesEqualId : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool >
+ struct CompareFeatureById : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool >
{
// ................................................................
inline bool operator()( const SupportedFeatures::value_type& _aType, const sal_Int32& _nId ) const
@@ -157,30 +156,29 @@ namespace dbaui
}
};
- // --------------------------------------------------------------------
// ....................................................................
- typedef struct FeatureStruct
+ struct FeatureListener
{
::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >
xListener;
sal_Int32 nId;
sal_Bool bForceBroadcast;
- } FeaturePair;
+ };
// ....................................................................
- typedef ::std::deque< FeaturePair > FeaturePairDeque;
+ typedef ::std::deque< FeatureListener > FeatureListeners;
- /// binary_function Functor object for class FeaturePair returntype is bool
// ....................................................................
- struct FeaturePairFunctor : ::std::binary_function< FeaturePair, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >, bool >
+ struct FindFeatureListener : ::std::binary_function< FeatureListener, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >, bool >
{
// ................................................................
- inline bool operator()( const FeaturePair& lhs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& rhs ) const
+ inline bool operator()( const FeatureListener& lhs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& rhs ) const
{
return !!( lhs.xListener == rhs );
}
};
+ // ....................................................................
typedef ::comphelper::OBaseMutex OGenericUnoController_MBASE;
typedef ::cppu::WeakComponentImplHelper11 < ::com::sun::star::frame::XDispatch
@@ -230,7 +228,7 @@ namespace dbaui
DECLARE_STL_MAP( sal_uInt16, FeatureState, ::std::less< sal_uInt16 >, StateCache );
DECLARE_STL_VECTOR( DispatchTarget, Dispatch);
- FeaturePairDeque m_aFeaturesToInvalidate;
+ FeatureListeners m_aFeaturesToInvalidate;
::osl::Mutex m_aFeatureMutex; // locked when features are append to or remove from deque
StateCache m_aStateCache; // save the current status of feature state
@@ -339,7 +337,13 @@ namespace dbaui
@see IController::registerCommandURL
*/
- bool isUserDefinedFeature( const sal_uInt16 nFeatureId );
+ bool isUserDefinedFeature( const sal_uInt16 nFeatureId ) const;
+
+ /** determines whether the given feature URL denotes a user-defined feature
+
+ @see IController::registerCommandURL
+ */
+ bool isUserDefinedFeature( const ::rtl::OUString& _rFeatureURL ) const;
// connect to a datasource
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect(
@@ -383,6 +387,8 @@ namespace dbaui
virtual void startFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
virtual void stopFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
+ void releaseNumberForComponent();
+
virtual ~OGenericUnoController();
private: