321 return olefr->GetOcApp();
#define PRECONDITION(condition)
bool SaveParts(IStorage *storage=0, bool sameAsLoaded=true, bool remember=true)
Save the embedded parts to the provided storage.
void SetStorage(IStorage *storage, bool remember=true)
Set the storage for this document.
bool RestoreStorage()
Restore the original root IStorage before the save operation.
bool LoadParts()
Loads the parts from the current storage into the PartCollection.
void SetName(const owl::tstring &newName)
Notify container that doc pathname has changed.
owl::tstring GetName() const
bool Revert(bool clear)
Performs the reverse of Commit.
TOleDocument(owl::TDocument *parent=0)
Constructs a TOleDocument object associated with the given parent TDocument object.
bool CanClose()
Prepares the document for closing.
bool SetStorage(IStorage *stg, bool remember=true)
Attaches the IStorage pointer (stg) to this document.
bool ReleaseDoc()
Releases the ObjectComponents document when the server is finished using the document.
TOcApp * GetOcApp()
Returns the ObjectComponents application associated with this TOleDocument object.
~TOleDocument()
Destroys the TOleDocument object.
bool Open(int mode, LPCTSTR path=0)
Loads the embedded objects, if any, using the path specified in path.
virtual bool Read()
Loads the embedded objects from the compound file.
virtual bool Write()
Saves the embedded objects to the compound file.
void OleViewClose()
Shuts down the TOleView's.
virtual void PreOpen()
Before the document is actually opened, PreOpen gives the derived class a chance to perform a particu...
bool PathChanged()
Checks to see if the current document's path is the same as the TOcDocument's path.
bool Close()
Ensures that the IStorage is released properly and disconnects any active server in the document.
bool RestoreStorage()
Restores the original root IStorage before the save operation.
bool Commit(bool force)
Commits the current document's data to storage.
bool InitDoc()
Overrides the TDocument::InitDoc function and creates or opens a compound file so that there is an IS...
Decorated frame that supports OLE 2 using OCF.
The OLE2 window view class. Used as a view in doc/view model.
bool Commit(bool force=false)
virtual bool SetStorage(IStorage *stg, bool remember=true)
Give an IStorage to document. This typically happens for OLE servers.
bool Open(int omode, LPCTSTR stgId)
Open the compound file with a given path.
virtual bool ReleaseDoc()
Release the IStorage and close the document.
bool IsOpen()
Return 'true' if the storage document object has opened an OLE storage.
virtual IStorage * GetNewStorage()
Get a new IStorage, typically in a SaveAs situation.
virtual bool RestoreStorage()
Restore the original root IStorage before the save operation.
bool SetDocPath(LPCTSTR path)
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
LPCTSTR GetDocPath() const
Returns the directory path for the document.
virtual bool CanClose()
Returns false if unable to close.
TDocManager & GetDocManager()
Returns a pointer to the current document manager.
void SetOpenMode(int mode)
Sets the mode and protection flag values for the current document.
void SetDirty(bool dirty=true)
Updates the document's dirty flag using the specified parameter.
TView * GetViewList() const
Return pointer to the head of the link list of views associated with this document.
bool IsEmbedded() const
Returns true if the document is embedded in an OLE 2 container.
int GetOpenMode() const
Gets the mode and protection flag values for the current document.
virtual bool Revert(bool clear=false)
abort changes, no reload if true
Abstract base class for view access from document.
Definition of class TDocManager.
@ ofTransacted
STGM_TRANSACTED, supports commit and revert.
@ ofNoCreate
ios::nocreate, open fails if file doesn't exist
@ ofTemporary
STGM_DELETEONRELEASE, delete when destructed.
Include for OC, gets common headers when precompiled headers are enabled.
Object Component Framework (COM encapsulation)
class _ICLASS TOcDocument
@ amExeMode
may be overridden per instance if running DLL
Object Windows Library (OWLNext Core)
Definition of TOcApp application connection class.
Definition of TOcDocument Class.
interface _ICLASS IStorage
#define TYPESAFE_DOWNCAST(object, toClass)