|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
OC Document class, holds parts & is a owner of views. More...
#include <ocf/ocdoc.h>
Public Member Functions | |
| TOcDocument (TOcApp &app, LPCTSTR fileName=0) | |
| TOcDocument (TOcApp &app, LPCTSTR fileName, IStorage *storageI) | |
| ~TOcDocument () | |
| int | AllocPartID () |
| TOcApp & | GetOcApp () |
Collection management | |
| TOcPartCollection & | GetParts () |
| TOcLinkCollection & | GetLinks () |
| TOcLinkCollection & | GetViews () |
Storage & streaming related | |
| TOcStorage * | GetStorage () |
| void | SetStorage (IStorage *storage, bool remember=true) |
| Set the storage for this document. | |
| void | SetStorage (LPCTSTR path) |
| Set the storage for this document. | |
| bool | SaveToFile (LPCTSTR newName) |
| Perform saveas operation. | |
| bool | RestoreStorage () |
| Restore the original root IStorage before the save operation. | |
Load/Save part information | |
| bool | LoadParts () |
| Loads the parts from the current storage into the PartCollection. | |
| bool | SaveParts (IStorage *storage=0, bool sameAsLoaded=true, bool remember=true) |
| Save the embedded parts to the provided storage. | |
| void | RenameParts (IBRootLinkable *bLDocumentI) |
| void | Close () |
Get/Set active view | |
| TOcView * | GetActiveView () |
| void | SetActiveView (TOcView *view) |
Get/Set document name | |
| owl::tstring | GetName () const |
| void | SetName (const owl::tstring &newName) |
| Notify container that doc pathname has changed. | |
Friends | |
| class _ICLASS | TOcControl |
| class _ICLASS | TOcView |
| class _ICLASS | TOcRemVie |
Definition at line 36 of file ocdoc.cpp.
References owl::ToBool(), ocf::TOcStorage, and TRACEX.
Definition at line 57 of file ocdoc.cpp.
References ocf::TOcStorage, and TRACEX.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool ocf::TOcDocument::LoadParts | ( | ) |
Loads the parts from the current storage into the PartCollection.
Return false if a serious error occurs. Having no part stream at all is OK.
Clear the part collection
PartCollection.Clear(); ///DR clear before make a new one.
There is a case when clearing now causes a crash
Definition at line 230 of file ocdoc.cpp.
References ocf::TOcPartCollection::Clear(), ocf::HRSucceeded(), ocf::TOcStorage::Stat(), owl::to_tstring(), and ocf::TOcPart.
| void ocf::TOcDocument::RenameParts | ( | IBRootLinkable * | bLDocumentI | ) |
Definition at line 301 of file ocdoc.cpp.
References ocf::HRSucceeded().
| bool ocf::TOcDocument::RestoreStorage | ( | ) |
| bool ocf::TOcDocument::SaveParts | ( | IStorage * | storage = 0, |
| bool | sameAsLoaded = true, | ||
| bool | remember = true ) |
Save the embedded parts to the provided storage.
'remember' flag is not really used here, as our save/restore is done outside here.
Definition at line 155 of file ocdoc.cpp.
References CHECK, ocf::TOcPartCollection::Count(), ocf::HRSucceeded(), ocf::TOcStorage::Stat(), owl::ToBool(), and ocf::TOcStorage.
Perform saveas operation.
Definition at line 141 of file ocdoc.cpp.
References PRECONDITION, and SaveParts().
| void ocf::TOcDocument::SetName | ( | const owl::tstring & | newName | ) |
Notify container that doc pathname has changed.
Definition at line 349 of file ocdoc.cpp.
References ocf::TOcView::Rename().
Set the storage for this document.
Definition at line 92 of file ocdoc.cpp.
References ocf::TOcStorage::GetIStorage(), and ocf::TOcStorage.
Set the storage for this document.
Definition at line 114 of file ocdoc.cpp.
References SetName(), and ocf::TOcStorage.