114. XXE.saveAll
Prev | Chapter 6. Commands written in the Java™ programming language | Next

## 114. XXE.saveAll

Parameter syntax:

    [ '[ifNeeded]' ]?

Saves all the documents (which actually need to be saved) currently opened in XXE.

[ifNeeded]

  Without this option, this command cannot be executed if no documents at all need to be saved.

  With this option, this command does nothing but can be successfully executed even when no documents at all need to be saved.

Returns `Command.EXECUTION_FAILED` if no documents at all need to be saved (when `[ifNeeded]` is not specified) or if some of the documents which need to be saved, cannot be saved. Otherwise, returns `null`.

Example: converting a map to PDF requires all the topics referenced in this map to have been saved to disk.

      <command name="map.convertToPDF">
        <macro>
          <sequence>
            <command name="XXE.saveAll" parameter="[ifNeeded]" />
            <command name="selectConvertedFile"
                     parameter="saveFileURLWithExtension=pdf" />
            <command name="map.toPDF" parameter="%_" />
          </sequence>
        </macro>
      </command>

Prev | Up | Next
113. XXE.save | Home | 115. XXE.setReadOnly