home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / FWIntrng.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  17.2 KB  |  515 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWIntrng.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFrameW.hpp"
  11.  
  12. #ifndef FWINTRNG_H
  13. #include "FWIntrng.h"
  14. #endif
  15.  
  16. #ifndef FWPROXY_H
  17. #include "FWProxy.h"
  18. #endif
  19.  
  20. #ifndef FWPRESEN_H
  21. #include "FWPresen.h"
  22. #endif
  23.  
  24. #ifndef FWFRMING_H
  25. #include "FWFrming.h"
  26. #endif
  27.  
  28. #ifndef FWPXYFRM_H
  29. #include "FWPxyFrm.h"
  30. #endif
  31.  
  32. #ifndef FWUTIL_H
  33. #include "FWUtil.h"
  34. #endif
  35.  
  36. #ifndef FWCLNINF_H
  37. #include "FWClnInf.h"
  38. #endif
  39.  
  40. #ifndef FWCONTNG_H
  41. #include "FWContng.h"
  42. #endif
  43.  
  44. // ----- OS Includes -----
  45.  
  46. #ifndef FWBARRAY_H
  47. #include "FWBArray.h"
  48. #endif
  49.  
  50. #ifndef FWODGEOM_H
  51. #include "FWODGeom.h"
  52. #endif
  53.  
  54. // ----- OD Utils -----
  55.  
  56. #ifndef _STDTYPIO_
  57. #include "StdTypIO.h"
  58. #endif
  59.  
  60. // ----- OpenDoc Includes -----
  61.  
  62. #ifndef SOM_Module_OpenDoc_StdProps_defined
  63. #include <StdProps.xh>
  64. #endif
  65.  
  66. #ifndef SOM_Module_OpenDoc_StdTypes_defined
  67. #include <StdTypes.xh>
  68. #endif
  69.  
  70. #ifndef SOM_ODSession_xh
  71. #include <ODSessn.xh>
  72. #endif
  73.  
  74. #ifndef SOM_ODWindowState_xh
  75. #include "WinStat.xh"
  76. #endif
  77.  
  78. #ifndef SOM_ODContainer_xh
  79. #include "ODCtr.xh"
  80. #endif
  81.  
  82. //========================================================================================
  83. // RunTime Info
  84. //========================================================================================
  85.  
  86. #ifdef FW_BUILD_MAC
  87. #pragma segment fw_embedding2
  88. #endif
  89.  
  90. //========================================================================================
  91. //    class FW_CEmbeddingDataInterchange
  92. //========================================================================================
  93.  
  94. //----------------------------------------------------------------------------------------
  95. //    FW_CEmbeddingDataInterchange constructor
  96. //----------------------------------------------------------------------------------------
  97. FW_CEmbeddingDataInterchange::FW_CEmbeddingDataInterchange(Environment* ev, FW_CEmbeddingPart* part) :
  98.     FW_CDataInterchange(ev, part)
  99. {
  100. }
  101.  
  102. //----------------------------------------------------------------------------------------
  103. //    FW_CEmbeddingDataInterchange destructor
  104. //----------------------------------------------------------------------------------------
  105. FW_CEmbeddingDataInterchange::~FW_CEmbeddingDataInterchange()
  106. {
  107. }
  108.  
  109. //----------------------------------------------------------------------------------------
  110. //    FW_CEmbeddingDataInterchange::DoExternalizeSingleEmbeddedFrame
  111. //----------------------------------------------------------------------------------------
  112.  
  113. void FW_CEmbeddingDataInterchange::DoExternalizeSingleEmbeddedFrame(Environment* ev, 
  114.                                         ODFrame* odEmbeddedFrame, 
  115.                                         ODStorageUnit* destinationSU, 
  116.                                         FW_CCloneInfo* cloneInfo)
  117. {            
  118.     destinationSU->AddProperty(ev, kODPropContentFrame);
  119.     destinationSU->AddValue(ev, kODWeakStorageUnitRef);
  120.         
  121.     // Add the cloneKind property and value
  122.     destinationSU->AddProperty(ev, kODPropCloneKindUsed)->AddValue(ev, kODCloneKind);
  123.     ODCloneKind cloneKind = cloneInfo->GetCloneKind(ev);
  124.     FW_CByteArray byteArray(&cloneKind, sizeof(ODCloneKind));
  125.     destinationSU->SetValue(ev, byteArray);
  126.         
  127.     //    Clone the embedded part into the root storage unit.
  128.     FW_CAcquiredODPart aqPart = odEmbeddedFrame->AcquirePart(ev);
  129.     ODID toRootID = cloneInfo->Clone(ev, aqPart->GetID(ev), destinationSU->GetID(ev), odEmbeddedFrame->GetID(ev));
  130.         
  131.     // Clone the embedded frame to any storage unit. Must be done
  132.     // after cloning the part because it strongly references the part
  133.     ODID toFrameID = cloneInfo->Clone(ev, odEmbeddedFrame->GetID(ev), 0, odEmbeddedFrame->GetID(ev));
  134.         
  135.     //    Weakly reference the frame
  136.     destinationSU->Focus(ev, kODPropContentFrame, kODPosUndefined, kODWeakStorageUnitRef, 0, kODPosUndefined);
  137.     ODStorageUnitRef aSURef;
  138.     destinationSU->GetWeakStorageUnitRef(ev, toFrameID, aSURef);
  139.     byteArray.Set(&aSURef, sizeof(ODStorageUnitRef));
  140.     destinationSU->SetValue(ev, byteArray);
  141. }
  142.  
  143. //----------------------------------------------------------------------------------------
  144. //    FW_CEmbeddingDataInterchange::DoInternalizeSingleEmbeddedFrame
  145. //----------------------------------------------------------------------------------------
  146.  
  147. FW_EInternalizeResult FW_CEmbeddingDataInterchange::DoInternalizeSingleEmbeddedFrame(Environment* ev, 
  148.                                                                              ODStorageUnit* sourceSU,
  149.                                                                              FW_CCloneInfo* cloneInfo)
  150. {
  151.     FW_EInternalizeResult result = FW_kInternalizeFailed;
  152.     
  153.     ODDraft* myDraft = fPart->GetDraft(ev);
  154.     
  155.     cloneInfo->fClonedPartID = cloneInfo->Clone(ev, sourceSU->GetID(ev), 0, 0);
  156.     FW_ASSERT(cloneInfo->fClonedPartID != kODNULLID);
  157.     
  158.     result = FW_kInternalizePart;
  159.  
  160.     // ----- Try Cloning the frame -----
  161.     ODStorageUnitRef aSURef;
  162.     sourceSU->Focus(ev, kODPropContentFrame, kODPosUndefined, kODWeakStorageUnitRef, 0, kODPosUndefined);
  163.     
  164.     FW_CByteArray byteArray; 
  165.     sourceSU->GetValue(ev, sizeof(aSURef), byteArray);
  166.     byteArray.CopyBuffer( &aSURef, sizeof(aSURef));
  167.  
  168.     if (sourceSU->IsValidStorageUnitRef(ev, aSURef))
  169.     {
  170.         ODID sourceFrameID = sourceSU->GetIDFromStorageUnitRef(ev, aSURef);
  171.         cloneInfo->fClonedFrameID = cloneInfo->Clone(ev, sourceFrameID, 0, 0);
  172.         FW_ASSERT(cloneInfo->fClonedFrameID != kODNULLID);
  173.         
  174.         result = FW_kInternalizeFrame;
  175.     }
  176.     else
  177.     {
  178.         // ----- Look for the frame shape -----    
  179.         cloneInfo->fFrameShape = PrivReadFrameShape(ev, sourceSU);
  180.     }
  181.     
  182.     return result;
  183. }
  184.  
  185. //----------------------------------------------------------------------------------------
  186. //    FW_CEmbeddingDataInterchange::PrivHandleExternalizeData
  187. //----------------------------------------------------------------------------------------
  188. //    Here we have two cases: 
  189. //        1) The data consists of only one embedded part(frame). In this case
  190. //            we just want to clone it into the storage unit.
  191. //        2) The data is two or more embedded parts or one or more
  192. //            embedded parts plus content. In this case we externalize the data.
  193.  
  194. void FW_CEmbeddingDataInterchange::PrivHandleExternalizeData(Environment* ev, 
  195.                                                             FW_CContent* content,
  196.                                                             ODStorageUnit* destinationSU,
  197.                                                             FW_StorageKinds storageKind, 
  198.                                                             FW_CCloneInfo* cloneInfo)
  199. {
  200.     FW_ASSERT(cloneInfo->GetScopeFrame(ev));
  201.     FW_ASSERT(FW_DYNAMIC_CAST(FW_CEmbeddingContent, content) != NULL);
  202.     
  203.     FW_MProxy* singleProxy = content ? ((FW_CEmbeddingContent*)content)->IsDataOnlyOneProxy(ev) : NULL;
  204.     if (singleProxy)        // if the data is only one embedded frame clone it into the SU 
  205.     {
  206.         FW_CEmbeddingFrame* embeddingFrame = FW_DYNAMIC_CAST(FW_CEmbeddingFrame, cloneInfo->GetScopeFrame(ev));
  207.         FW_ASSERT(embeddingFrame);
  208.  
  209.         FW_CAcquiredODFrame aqEmbeddedFrame = singleProxy->AcquireEmbeddedFrame(ev, embeddingFrame);    
  210.         FW_ASSERT(aqEmbeddedFrame != NULL);
  211.         
  212.         DoExternalizeSingleEmbeddedFrame(ev, aqEmbeddedFrame, destinationSU, cloneInfo);        
  213.     
  214.     }
  215.     else
  216.     {
  217.         FW_CDataInterchange::PrivHandleExternalizeData(ev, content, destinationSU, storageKind, cloneInfo);
  218.     }
  219. }
  220.  
  221. //----------------------------------------------------------------------------------------
  222. //    FW_CEmbeddingDataInterchange::PrivHandleInternalizeData
  223. //----------------------------------------------------------------------------------------
  224.  
  225. FW_EInternalizeResult FW_CEmbeddingDataInterchange::PrivHandleInternalizeData(Environment* ev, 
  226.                                                                              FW_CContent* content,
  227.                                                                             ODStorageUnit* sourceSU,
  228.                                                                             FW_StorageKinds storageKind, 
  229.                                                                             FW_CCloneInfo* cloneInfo)
  230. {
  231.     FW_ASSERT(FW_DYNAMIC_CAST(FW_CEmbeddingContent, content) != NULL);
  232.  
  233.     FW_EInternalizeResult result = FW_kInternalizeFailed;
  234.     
  235.     // ----- Test first if the data consists of a single embedded frame
  236.     if (sourceSU->Exists(ev, kODPropContentFrame, kODWeakStorageUnitRef, 0))
  237.     {
  238.         result = DoInternalizeSingleEmbeddedFrame(ev, sourceSU, cloneInfo);
  239.     }
  240.     else
  241.     {
  242.         // ----- Try to incorporate -----
  243.         result = FW_CDataInterchange::PrivHandleInternalizeData(ev, content, sourceSU, storageKind, cloneInfo);
  244.  
  245.         // ----- Then try embedding -----
  246.         if (result == FW_kInternalizeFailed)
  247.             result = PrivClonePart(ev, sourceSU, cloneInfo);
  248.     }
  249.     
  250.     return result;
  251. }
  252.  
  253. //----------------------------------------------------------------------------------------
  254. //    FW_CEmbeddingDataInterchange::PrivPostInternalizeData
  255. //----------------------------------------------------------------------------------------
  256.  
  257. void FW_CEmbeddingDataInterchange::PrivPostInternalizeData(Environment* ev, 
  258.                                                             FW_CContent* content,
  259.                                                                FW_CCloneInfo* cloneInfo, 
  260.                                                                FW_EInternalizeResult result)
  261. {
  262.     FW_ASSERT(FW_DYNAMIC_CAST(FW_CEmbeddingContent, content) != NULL);
  263.  
  264.     switch (result)
  265.     {
  266.         case FW_kInternalizeFailed:
  267.             FW_DEBUG_MESSAGE("PrivPostInternalizeData should not have been called");
  268.             break;
  269.             
  270.         case FW_kInternalizeContent:
  271.             if (cloneInfo->fClonedProxyList != NULL)    // No embedded frames have been read
  272.                 PrivPostInternalizeContent(ev, cloneInfo);
  273.             break;
  274.             
  275.         case FW_kInternalizePart:
  276.             PrivPostInternalizePart(ev, (FW_CEmbeddingContent*)content, cloneInfo, GetPresentation(ev, cloneInfo)->GetDefaultEmbeddedFrameViewType(ev));
  277.             break;
  278.             
  279.         case FW_kInternalizeFrame:
  280.             PrivPostInternalizeFrame(ev, (FW_CEmbeddingContent*)content, cloneInfo, GetPresentation(ev, cloneInfo)->GetDefaultEmbeddedFrameViewType(ev));
  281.             break;
  282.     }
  283. }
  284.  
  285. //----------------------------------------------------------------------------------------
  286. //    FW_CEmbeddingDataInterchange::PrivReadFrameShape
  287. //----------------------------------------------------------------------------------------
  288.  
  289. ODShape* FW_CEmbeddingDataInterchange::PrivReadFrameShape(Environment* ev, ODStorageUnit* sourceSU)
  290. {
  291.     // ----- Look for a frame shape property -----
  292.     ODShape* frameShape = NULL;
  293.     
  294.     if (sourceSU->Exists(ev, kODPropSuggestedFrameShape, (ODValueType)NULL, 0))
  295.     {
  296.         // ----- Note: we focus on the property, ReadShape will focus on the value
  297.         sourceSU->Focus(ev, kODPropSuggestedFrameShape, 
  298.                             kODPosUndefined, 
  299.                                (ODValueType)NULL, 
  300.                             (ODValueIndex)1, 
  301.                             kODPosUndefined);
  302.         
  303.         frameShape = ::FW_NewODShape(ev);
  304.         frameShape = frameShape->ReadShape(ev, sourceSU);
  305.     }
  306.     
  307.     return frameShape;
  308. }
  309.  
  310. //----------------------------------------------------------------------------------------
  311. //    FW_CEmbeddingDataInterchange::PrivPostInternalizeContent
  312. //----------------------------------------------------------------------------------------
  313.  
  314. void FW_CEmbeddingDataInterchange::PrivPostInternalizeContent(Environment* ev, FW_CCloneInfo* cloneInfo)
  315. {
  316.     FW_TOrderedCollectionIterator<FW_MProxy> ite(cloneInfo->fClonedProxyList);
  317.     for (FW_MProxy* proxy = ite.First(); ite.IsNotComplete(); proxy = ite.Next())
  318.     {
  319.         proxy->PrivPostClone(ev, cloneInfo);
  320.     }
  321. }
  322.  
  323. //----------------------------------------------------------------------------------------
  324. //    FW_CEmbeddingDataInterchange::PrivPostInternalizeFrame
  325. //----------------------------------------------------------------------------------------
  326.  
  327. void FW_CEmbeddingDataInterchange::PrivPostInternalizeFrame(Environment* ev,
  328.                                                             FW_CEmbeddingContent* content, 
  329.                                                             FW_CCloneInfo* cloneInfo,
  330.                                                             ODTypeToken viewAs)
  331. {
  332.     FW_ASSERT(cloneInfo->fClonedPartID != kODNULLID);
  333.     FW_ASSERT(cloneInfo->fClonedFrameID != kODNULLID);
  334.  
  335.     FW_CEmbeddingFrame* embeddingScopeFrame = FW_DYNAMIC_CAST(FW_CEmbeddingFrame, cloneInfo->GetScopeFrame(ev));
  336.     FW_ASSERT(embeddingScopeFrame);
  337.  
  338.     // ----- Get the part -----
  339. //    ODDraft* myDraft = fPart->GetDraft(ev);
  340. //    FW_CAcquiredODPart aqNewPart = myDraft->AcquirePart(ev, cloneInfo->fClonedPartID);
  341.     ODDraft* toDraft = cloneInfo->GetToDraft(ev);
  342.     FW_CAcquiredODPart aqNewPart = toDraft->AcquirePart(ev, cloneInfo->fClonedPartID);
  343.     FW_ASSERT(aqNewPart != NULL);
  344.         
  345.     FW_TRY
  346.     {
  347. //        FW_CAcquiredODFrame aqNewFrame = myDraft->AcquireFrame(ev, cloneInfo->fClonedFrameID);
  348.         FW_CAcquiredODFrame aqNewFrame = toDraft->AcquireFrame(ev, cloneInfo->fClonedFrameID);
  349.         FW_ASSERT(aqNewFrame != NULL);
  350.  
  351.         aqNewFrame->SetContainingFrame(ev, embeddingScopeFrame->GetODFrame(ev));
  352.         
  353.         FW_CAcquiredODShape aqFrameShape = aqNewFrame->AcquireFrameShape(ev, NULL);
  354.  
  355.         content->SingleEmbeddedFrameInternalized(ev, 
  356.                                                  embeddingScopeFrame,
  357.                                                  aqNewPart, 
  358.                                                  aqNewFrame, 
  359.                                                  aqFrameShape,
  360.                                                  viewAs);
  361.     }
  362.     FW_CATCH_BEGIN
  363.     FW_CATCH_EVERYTHING()
  364.     {
  365.         FW_THROW_SAME();
  366.     }
  367.     FW_CATCH_END
  368. }
  369.  
  370. //----------------------------------------------------------------------------------------
  371. //    FW_CEmbeddingDataInterchange::PrivPostInternalizePart
  372. //----------------------------------------------------------------------------------------
  373.  
  374. void FW_CEmbeddingDataInterchange::PrivPostInternalizePart(Environment* ev, 
  375.                                                         FW_CEmbeddingContent* content,
  376.                                                         FW_CCloneInfo* cloneInfo,
  377.                                                            ODTypeToken viewAs)
  378. {
  379.     FW_ASSERT(cloneInfo->fClonedPartID != kODNULLID);
  380.     FW_ASSERT(cloneInfo->fClonedFrameID == kODNULLID);
  381.     
  382. //    ODDraft* myDraft = fPart->GetDraft(ev);
  383. //    FW_CAcquiredODPart aqEmbeddedPart = myDraft->AcquirePart(ev, cloneInfo->fClonedPartID);
  384.     FW_CAcquiredODPart aqEmbeddedPart = cloneInfo->GetToDraft(ev)->AcquirePart(ev, cloneInfo->fClonedPartID);
  385.     
  386.     FW_CEmbeddingFrame* embeddingScopeFrame = FW_DYNAMIC_CAST(FW_CEmbeddingFrame, cloneInfo->GetScopeFrame(ev));
  387.     FW_ASSERT(embeddingScopeFrame);
  388.     
  389.     content->SingleEmbeddedFrameInternalized(ev, 
  390.                                             embeddingScopeFrame,
  391.                                             aqEmbeddedPart, 
  392.                                             NULL, 
  393.                                             cloneInfo->fFrameShape,
  394.                                             viewAs);
  395. }
  396.  
  397. //----------------------------------------------------------------------------------------
  398. //    FW_CEmbeddingDataInterchange::PrivClonePart
  399. //----------------------------------------------------------------------------------------
  400.  
  401. FW_EInternalizeResult FW_CEmbeddingDataInterchange::PrivClonePart(Environment* ev, 
  402.                                                                  ODStorageUnit* sourceSU,
  403.                                                                   FW_CCloneInfo* cloneInfo)
  404. {
  405.     FW_EInternalizeResult result = FW_kInternalizeFailed;
  406.  
  407.     // ----- Clone the part -----            
  408.     cloneInfo->fClonedPartID = cloneInfo->Clone(ev, sourceSU->GetID(ev), 0, 0);
  409.     FW_ASSERT(cloneInfo->fClonedPartID != kODNULLID);
  410.     result = FW_kInternalizePart;
  411.     
  412.     // ----- Look for the frame shape -----    
  413.     cloneInfo->fFrameShape = PrivReadFrameShape(ev, sourceSU);
  414.  
  415.     return result;
  416. }
  417.  
  418. //----------------------------------------------------------------------------------------
  419. //    FW_CEmbeddingDataInterchange::PrivHandleEmbedAs
  420. //----------------------------------------------------------------------------------------
  421.  
  422. FW_EInternalizeResult FW_CEmbeddingDataInterchange::PrivHandleEmbedAs(Environment* ev, 
  423.                                                                       FW_CContent* content,
  424.                                                                       ODStorageUnit* sourceSU,
  425.                                                                       FW_CCloneInfo* cloneInfo,
  426.                                                                       ODPasteAsResult* embedAsInfo)
  427. {
  428.     FW_ASSERT(FW_DYNAMIC_CAST(FW_CEmbeddingContent, content) != NULL);
  429.  
  430.     ODDraft* dstDraft = fPart->GetDraft(ev);
  431.     FW_EInternalizeResult result = FW_kInternalizeFailed;
  432.  
  433.     cloneInfo->BeginClone(ev, dstDraft);
  434.  
  435.     if (sourceSU->Exists(ev, kODPropContentFrame, kODWeakStorageUnitRef, 0))
  436.         result = DoInternalizeSingleEmbeddedFrame(ev, sourceSU, cloneInfo);
  437.     else
  438.         result = PrivClonePart(ev, sourceSU, cloneInfo);
  439.     
  440.     if (result == FW_kInternalizeFailed) 
  441.     {
  442.         cloneInfo->AbortClone(ev);
  443.         return result;
  444.     }
  445.     
  446.     cloneInfo->EndClone(ev);
  447.  
  448.     PrivPostEmbedAs(ev, content, sourceSU, cloneInfo, embedAsInfo);
  449.     PrivPostInternalizeData(ev, content, cloneInfo, result);
  450.     
  451.     return result;
  452. }
  453.  
  454. //----------------------------------------------------------------------------------------
  455. //    FW_CEmbeddingDataInterchange::PrivPostEmbedAs
  456. //----------------------------------------------------------------------------------------
  457. void FW_CEmbeddingDataInterchange::PrivPostEmbedAs(    Environment* ev,
  458.                                                     FW_CContent* content,
  459.                                                     ODStorageUnit* sourceSU,
  460.                                                     FW_CCloneInfo* cloneInfo,
  461.                                                     ODPasteAsResult* embedAsInfo)
  462. {
  463.     FW_UNUSED(sourceSU);
  464.     FW_UNUSED(content);
  465.     
  466.     FW_ASSERT(FW_DYNAMIC_CAST(FW_CEmbeddingContent, content) != NULL);
  467.  
  468.     ODStorageUnit* newSU = NULL;
  469.     FW_VOLATILE(newSU);
  470.  
  471.     FW_TRY
  472.     {
  473.         // ----- Acquire the newly embedded storage unit
  474.         ODDraft* dstDraft = fPart->GetDraft(ev);
  475.         newSU = dstDraft->AcquireStorageUnit(ev, cloneInfo->fClonedPartID);
  476.  
  477.         /*-- If user wants translation, do it before the part gets embedded --*/
  478.         if (embedAsInfo->translateKind != NULL)
  479.         {
  480.             ODTranslateResult transResult = TranslateData(ev, newSU, 
  481.                                                           embedAsInfo->selectedKind, 
  482.                                                           embedAsInfo->translateKind);
  483.             FW_ASSERT(transResult != kODCannotTranslate);
  484.     
  485.             //-- Translation was successful, save the preferred kind in the cloned SU
  486.             ODSetISOStrProp(ev, newSU, kODPropPreferredKind, kODISOStr, embedAsInfo->selectedKind);
  487.         }
  488.  
  489.         //-- Save the preferred editor in the cloned SU
  490.         if (embedAsInfo->editor != kODNoEditor)
  491.         {
  492.             ODSetISOStrProp(ev, newSU, kODPropPreferredEditor, kODEditor, embedAsInfo->editor);
  493.         }
  494.  
  495.         newSU->Release(ev);
  496.     }
  497.     FW_CATCH_BEGIN
  498.     FW_CATCH_EVERYTHING()
  499.     {
  500.         if (newSU)
  501.             newSU->Release(ev);
  502.         FW_THROW_SAME();
  503.     }
  504.     FW_CATCH_END
  505. }
  506.  
  507. //----------------------------------------------------------------------------------------
  508. //    FW_CEmbeddingDataInterchange::GetPresentation
  509. //----------------------------------------------------------------------------------------
  510.  
  511. FW_CPresentation* FW_CEmbeddingDataInterchange::GetPresentation(Environment* ev, FW_CCloneInfo* cloneInfo)
  512. {
  513.     return cloneInfo->GetScopeFrame(ev)->GetPresentation(ev);
  514. }
  515.