summaryrefslogtreecommitdiff
path: root/stoc/source
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-07-23 14:03:51 +0000
committerRüdiger Timm <rt@openoffice.org>2004-07-23 14:03:51 +0000
commit902853fdc662f3a3300726dd3da57c70b68d5842 (patch)
tree870dc95f2d7c61d6b012f9f347ced95663680f17 /stoc/source
parentd36b3495bb98c2dbcfa73674ae135adc93239401 (diff)
INTEGRATION: CWS sb20 (1.5.22); FILE MERGED
2004/07/13 14:34:41 sb 1.5.22.1: #i31281# Added support for XPublished.
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx39
1 files changed, 35 insertions, 4 deletions
diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
index b784566d754f..92adc3cf7bb3 100644
--- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
+++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: rdbtdp_tdenumeration.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 16:15:25 $
+ * last change: $Author: rt $ $Date: 2004-07-23 15:03:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,6 +73,8 @@
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
#endif
+#include "com/sun/star/reflection/XPublished.hpp"
+#include "cppuhelper/implbase1.hxx"
#include "registry/reader.hxx"
#include "registry/version.h"
@@ -85,6 +87,32 @@
using namespace com::sun::star;
+namespace {
+
+class IndividualConstantTypeDescriptionImpl:
+ public cppu::ImplInheritanceHelper1<
+ stoc_rdbtdp::ConstantTypeDescriptionImpl,
+ com::sun::star::reflection::XPublished >
+{
+public:
+ IndividualConstantTypeDescriptionImpl(
+ rtl::OUString const & name, com::sun::star::uno::Any const & value,
+ bool published):
+ cppu::ImplInheritanceHelper1<
+ stoc_rdbtdp::ConstantTypeDescriptionImpl,
+ com::sun::star::reflection::XPublished >(name, value),
+ m_published(published) {}
+
+ virtual sal_Bool SAL_CALL isPublished()
+ throw (::com::sun::star::uno::RuntimeException)
+ { return m_published; }
+
+private:
+ bool m_published;
+};
+
+}
+
namespace stoc_rdbtdp
{
@@ -533,8 +561,11 @@ bool TypeDescriptionEnumerationImpl::queryMore()
aReader.getFieldValue( nFields ) ) );
m_aTypeDescs.push_back(
- new ConstantTypeDescriptionImpl(
- aName.makeStringAndClear(), aValue ) );
+ new IndividualConstantTypeDescriptionImpl(
+ aName.makeStringAndClear(), aValue,
+ ( ( aReader.getFieldFlags( nFields )
+ & RT_ACCESS_PUBLISHED )
+ != 0 ) ) );
}
}
}