From: stv Date: Thu, 24 Nov 2005 13:17:30 +0000 (+0000) Subject: no message X-Git-Tag: BR_3_1_0_deb~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2ea665579aa9d668fbc71203a85db044beb6acb6;p=modules%2Fgui.git no message --- diff --git a/src/CAF/CAF_Operation.cxx b/src/CAF/CAF_Operation.cxx index f5a1e51cc..83cd7b16f 100755 --- a/src/CAF/CAF_Operation.cxx +++ b/src/CAF/CAF_Operation.cxx @@ -3,6 +3,8 @@ #include "CAF_Study.h" #include "CAF_Application.h" +#include + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// @@ -15,3 +17,12 @@ CAF_Operation::CAF_Operation(SUIT_Application* theApp) CAF_Operation::~CAF_Operation() { } + +Handle(TDocStd_Document) CAF_Operation::stdDoc() const +{ + Handle(TDocStd_Document) doc; + CAF_Study* s = ::qt_cast( study() ); + if ( s ) + doc = s->stdDoc(); + return doc; +} diff --git a/src/CAF/CAF_Operation.h b/src/CAF/CAF_Operation.h index b9715c41a..0991bad65 100755 --- a/src/CAF/CAF_Operation.h +++ b/src/CAF/CAF_Operation.h @@ -8,7 +8,10 @@ #include #include +#include + class CAF_Study; +class Handle(TDocStd_Document); class CAF_EXPORT CAF_Operation : public SUIT_Operation { @@ -17,6 +20,9 @@ class CAF_EXPORT CAF_Operation : public SUIT_Operation public: CAF_Operation( SUIT_Application* ); virtual ~CAF_Operation(); + +protected: + Handle(TDocStd_Document) stdDoc() const; }; #endif