Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeTextHighlightColor.cxx
index 04973fd573d519a58764013795d9401baa9ba8f9..2f1b8c8033300aba690c3731e8e063e772900f8e 100644 (file)
 #include "SALOMEDS_AttributeTextHighlightColor.hxx"
 #include "SALOMEDS.hxx"
 
-#include <TColStd_HArray1OfReal.hxx>
+#include <vector>
+
+using namespace std;
 
 SALOMEDS_AttributeTextHighlightColor::SALOMEDS_AttributeTextHighlightColor
-                  (const Handle(SALOMEDSImpl_AttributeTextHighlightColor)& theAttr)
+                  (SALOMEDSImpl_AttributeTextHighlightColor* theAttr)
 :SALOMEDS_GenericAttribute(theAttr)
 {}
 
@@ -45,11 +47,10 @@ STextColor SALOMEDS_AttributeTextHighlightColor::TextHighlightColor()
   STextColor aColor;
   if (_isLocal) {
     SALOMEDS::Locker lock;
-    Handle(TColStd_HArray1OfReal) aSeq;
-    aSeq = Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_local_impl)->TextHighlightColor();
-    aColor.R = aSeq->Value(1);
-    aColor.G = aSeq->Value(2);
-    aColor.B = aSeq->Value(3); 
+    vector<double> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTextHighlightColor*>(_local_impl)->TextHighlightColor();
+    aColor.R = aSeq[0];
+    aColor.G = aSeq[1];
+    aColor.B = aSeq[2];        
   }
   else {
     SALOMEDS::Color anImplColor =
@@ -66,11 +67,11 @@ void SALOMEDS_AttributeTextHighlightColor::SetTextHighlightColor(STextColor valu
   if (_isLocal) {
     CheckLocked();
     SALOMEDS::Locker lock;
-    Handle(TColStd_HArray1OfReal) aSeq = new TColStd_HArray1OfReal(1, 3);
-    aSeq->SetValue(1, value.R);
-    aSeq->SetValue(2, value.G);
-    aSeq->SetValue(3, value.B);
-    Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_local_impl)->ChangeArray(aSeq);
+    vector<double> aSeq;
+    aSeq.push_back(value.R);
+    aSeq.push_back(value.G);
+    aSeq.push_back(value.B);
+    dynamic_cast<SALOMEDSImpl_AttributeTextHighlightColor*>(_local_impl)->ChangeArray(aSeq);
   }
   else {
     SALOMEDS::Color aColor;