home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.0 KB | 95 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWCntPrp.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWFrameW.hpp"
-
- #ifndef FWCNTPRP_H
- #include "FWCntPrp.h"
- #endif
-
- #ifndef FWFRMING_H
- #include "FWFrming.h"
- #endif
-
- #ifndef FWPRTITE_H
- #include "FWPrtIte.h"
- #endif
-
- //========================================================================================
- // RunTime Info
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment FW_FrameSegment
- #endif
-
- //========================================================================================
- // class FW_MContainingPropertiesFrame
- //========================================================================================
-
- FW_DEFINE_AUTO(FW_MContainingPropertiesFrame)
- FW_DEFINE_CLASS_M0(FW_MContainingPropertiesFrame)
-
- //----------------------------------------------------------------------------------------
- // FW_MContainingPropertiesFrame::FW_MContainingPropertiesFrame
- //----------------------------------------------------------------------------------------
-
- FW_MContainingPropertiesFrame::FW_MContainingPropertiesFrame()
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_MContainingPropertiesFrame::~FW_MContainingPropertiesFrame
- //----------------------------------------------------------------------------------------
-
- FW_MContainingPropertiesFrame::~FW_MContainingPropertiesFrame()
- {
- FW_START_DESTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_MContainingPropertiesFrame::UpdateContainerProperties
- //----------------------------------------------------------------------------------------
-
- void FW_MContainingPropertiesFrame::UpdateContainerProperties(Environment* ev)
- {
- FW_CAcquiredODStorageUnit su = NULL;
- FW_CEmbeddingFrame* frame = FW_DYNAMIC_CAST(FW_CEmbeddingFrame, this);
-
- FW_ASSERT(frame);
-
- FW_CEmbeddingPart* part = FW_DYNAMIC_CAST(FW_CEmbeddingPart, frame->GetPart(ev));
-
- FW_ASSERT(part);
-
- FW_CPartEmbeddedFrameIterator iter(ev, part, frame);
-
- for (ODFrame* frme = iter.First(ev); iter.IsNotComplete(ev); frme = iter.Next(ev))
- {
- if (su == NULL)
- su = AcquirePropertiesStorage(ev, part->GetDraft(ev));
-
- FW_CAcquiredODPart part = frme->AcquirePart(ev);
- part->ContainingPartPropertiesUpdated(ev, frme, su);
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_MContainingPropertiesFrame::AcquirePropertiesStorage
- //----------------------------------------------------------------------------------------
-
- ODStorageUnit* FW_MContainingPropertiesFrame::AcquirePropertiesStorage(Environment* ev, ODDraft* draft)
- {
- ODStorageUnit* su = draft->CreateStorageUnit(ev);
- ExternalizeProperties(ev, su);
-
- return su;
- }
-