Writes all the pages to the given filename. Returns false on error.
| 406 | |
| 407 | // Writes all the pages to the given filename. Returns false on error. |
| 408 | bool DocumentData::SaveDocument(const char* filename, FileWriter writer) { |
| 409 | SVAutoLock lock(&pages_mutex_); |
| 410 | TFile fp; |
| 411 | fp.OpenWrite(NULL); |
| 412 | if (!pages_.Serialize(&fp) || !fp.CloseWrite(filename, writer)) { |
| 413 | tprintf("Serialize failed: %s\n", filename); |
| 414 | return false; |
| 415 | } |
| 416 | return true; |
| 417 | } |
| 418 | bool DocumentData::SaveToBuffer(GenericVector<char>* buffer) { |
| 419 | SVAutoLock lock(&pages_mutex_); |
| 420 | TFile fp; |
nothing calls this directly
no test coverage detected