home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.3 KB | 125 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLODFStr.cpp
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWOS.hpp"
-
- #ifndef SLODFSTR_H
- #include "SLODFStr.h"
- #endif
-
- #ifndef FWMENU_K
- #include "FWMenu.k"
- #endif
-
- #ifndef SLODFSTR_K
- #include "SLODFStr.k"
- #endif
-
- // for FW_HString and FW_CString
- #ifndef FWPSTR_H
- #include "FWPStr.h"
- #endif
-
- // for FW_SOM_TRY
- #ifndef FWODFEXC_H
- #include "FWODFExc.h"
- #endif
-
- // for FW_CSharedLibraryResourceFile
- #ifndef FWCFMRES_H
- #include "FWCFMRes.h"
- #endif
-
- // for FW_LoadStringByID
- #ifndef FWRESACC_H
- #include "FWResAcc.h"
- #endif
-
- // for MULTISTRINGRES
- #ifndef FWRESTYP_H
- #include "FWResTyp.h"
- #endif
-
- #ifndef FWPRIDEB_H
- #include "FWPriDeb.h"
- #endif
-
- //========================================================================================
- // Runtime Information
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment odfcommands
- #endif
-
- //----------------------------------------------------------------------------------------
- // FW_PrivLoadUndoStrings
- //----------------------------------------------------------------------------------------
-
- void SL_API FW_PrivLoadUndoStrings(Environment* ev,
- unsigned long undoMsgID,
- FW_HString* undoStringRep,
- FW_HString* redoStringRep)
- {
- FW_SOM_TRY
- {
- FW_CString undoString(*undoStringRep);
- FW_CString redoString(*redoStringRep);
-
- FW_CSharedLibraryResourceFile resFile(ev);
-
- if (!::FW_LoadStringByIDNoFail(ev, resFile, FW_kUndoStrings, MULTISTRINGRES, undoMsgID, undoString))
- ::FW_LoadStringByID(ev, resFile, FW_kUndoStrings, MULTISTRINGRES, FW_kDefaultUndoMsg, undoString);
-
- if (!::FW_LoadStringByIDNoFail(ev, resFile, FW_kUndoStrings, MULTISTRINGRES, undoMsgID + 1, redoString))
- ::FW_LoadStringByID(ev, resFile, FW_kUndoStrings, MULTISTRINGRES, FW_kDefaultUndoMsg + 1, redoString);
- }
- FW_SOM_CATCH
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PrivLoadDefaultUndoStrings
- //----------------------------------------------------------------------------------------
-
- void SL_API FW_PrivLoadDefaultUndoStrings(Environment* ev,
- FW_HString* undoStringRep,
- FW_HString* redoStringRep)
- {
- FW_SOM_TRY
- {
- FW_CString undoString(*undoStringRep);
- FW_CString redoString(*redoStringRep);
-
- FW_CSharedLibraryResourceFile resFile(ev);
-
- ::FW_LoadStringByID(ev, resFile, FW_kUndoStrings, MULTISTRINGRES, FW_kDefaultUndoMsg, undoString);
- ::FW_LoadStringByID(ev, resFile, FW_kUndoStrings, MULTISTRINGRES, FW_kDefaultUndoMsg + 1, redoString);
- }
- FW_SOM_CATCH
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PrivLoadODFString
- //----------------------------------------------------------------------------------------
-
- void SL_API FW_PrivLoadODFString(Environment* ev,
- unsigned long stringID,
- FW_HString* stringRep)
- {
- FW_SOM_TRY
- {
- FW_CString aString(*stringRep);
-
- FW_CSharedLibraryResourceFile resFile(ev);
- ::FW_LoadStringByID(ev, resFile, FW_kODFStrings, MULTISTRINGRES, stringID, aString);
- }
- FW_SOM_CATCH
- }
-
-