You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2016/02/24 02:41:54 UTC
svn commit: r1732005 [2/2] - in /openoffice/branches/gbuild-reintegration:
./ main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
main/writerfilter/source/dmapper/PropertyIds.cxx
main/writerfilter/source/dmapper/PropertyIds.hxx
Modified: openoffice/branches/gbuild-reintegration/main/writerfilter/source/dmapper/PropertyIds.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/writerfilter/source/dmapper/PropertyIds.hxx?rev=1732005&r1=1732004&r2=1732005&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/writerfilter/source/dmapper/PropertyIds.hxx (original)
+++ openoffice/branches/gbuild-reintegration/main/writerfilter/source/dmapper/PropertyIds.hxx Wed Feb 24 01:41:54 2016
@@ -23,10 +23,18 @@
#ifndef INCLUDED_DMAPPER_PROPERTYIDS_HXX
#define INCLUDED_DMAPPER_PROPERTYIDS_HXX
+#include <hash_map>
+#include <boost/shared_ptr.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
namespace rtl{ class OUString;}
namespace writerfilter {
namespace dmapper{
+
+using namespace ::com::sun::star;
+
enum PropertyIds
{
PROP_ID_START = 1
@@ -285,16 +293,54 @@ enum PropertyIds
,PROP_WRITING_MODE
};
struct PropertyNameSupplier_Impl;
+
+struct PropertyIdsHash
+{
+ size_t operator()(const PropertyIds a) const { return a; }
+};
+
class PropertyNameSupplier
{
PropertyNameSupplier_Impl* m_pImpl;
-public:
PropertyNameSupplier();
+
+public:
~PropertyNameSupplier();
const rtl::OUString& GetName( PropertyIds eId ) const;
+ PropertyIds GetId(const ::rtl::OUString & rString) const;
static PropertyNameSupplier& GetPropertyNameSupplier();
};
+
+class PropertySequence
+{
+ typedef ::std::hash_map<PropertyIds, sal_Int32, PropertyIdsHash> Map_t;
+ Map_t m_indexMap;
+ uno::Sequence<beans::PropertyValue>m_sequence;
+ PropertyNameSupplier & m_rPropNameSupplier;
+
+public:
+ typedef boost::shared_ptr<PropertySequence> Pointer_t;
+
+ PropertySequence();
+ PropertySequence(const uno::Sequence<beans::PropertyValue> & rSeq);
+ virtual ~PropertySequence();
+
+ uno::Any get(PropertyIds aId);
+
+ void set(PropertyIds aId, const uno::Any & rValue);
+ void set(PropertyIds aId, sal_uInt32 nValue);
+ void set(PropertyIds aId, sal_Int32 nValue);
+ void set(PropertyIds aId, sal_uInt16 nValue);
+ void set(PropertyIds aId, sal_Int16 nValue);
+
+ uno::Sequence<beans::PropertyValue> & getSequence();
+
+#ifdef DEBUG
+ ::std::string toString() const;
+#endif
+};
+
} //namespace dmapper
} // namespace writerfilter
#endif