openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1409438 [2/2] - in /incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper: DomainMapper_Impl.cxx PropertyIds.cxx PropertyIds.hxx
Date Wed, 14 Nov 2012 21:41:51 GMT
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyIds.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyIds.hxx?rev=1409438&r1=1409437&r2=1409438&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyIds.hxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyIds.hxx Wed Nov
14 21:41:50 2012
@@ -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



Mime
View raw message