From 2ea665579aa9d668fbc71203a85db044beb6acb6 Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 24 Nov 2005 13:17:30 +0000 Subject: [PATCH] no message --- src/CAF/CAF_Operation.cxx | 11 +++++++++++ src/CAF/CAF_Operation.h | 6 ++++++ 2 files changed, 17 insertions(+) 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 -- 2.39.2