Skip to content

Commit

Permalink
updated signatures and parameters of other C++ classes
Browse files Browse the repository at this point in the history
  • Loading branch information
ovchinnikova-natalya committed Nov 19, 2024
1 parent 2df1ae7 commit e6ecc53
Show file tree
Hide file tree
Showing 42 changed files with 806 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,26 @@ Opens the document file which will be edited and saved afterwards.
- {type: type, text: const wchar_t*}
```
- : The path to the file to be opened together with its name and extension.
- :
The path to the file to be opened together with its name and extension.
- sParams
```yml signature.variant="inline"
- {type: type, text: const wchar_t*}
```
- : The parameters needed for the correct file opening (most commonly, the encoding is used for the `txt` and `csv` file types or the delimiter for the `csv` files, for other file types this is just an empty string). The parameters are added in the form of XML tags, where `m_nCsvTxtEncoding` is used for the text encoding and `m_nCsvDelimiter` is used for the delimiter. You can find all the supported values for the encoding [in this file](https://github.com/ONLYOFFICE/server/blob/master/Common/sources/commondefines.js). The supported values for the `csv` delimiters include:<br/><br/>`0` - no delimiter;<br/><br/>`1` - tab;<br/><br/>`2` - semicolon;<br/><br/>`3` - colon;<br/><br/>`4` - comma;<br/><br/>`5` - space.
- :
The parameters needed for the correct file opening (most commonly, the encoding is used for the `txt` and `csv` file types or the delimiter for the `csv` files, for other file types this is just an empty string). The parameters are added in the form of XML tags, where `m_nCsvTxtEncoding` is used for the text encoding and `m_nCsvDelimiter` is used for the delimiter. You can find all the supported values for the encoding [in this file](https://github.com/ONLYOFFICE/server/blob/master/Common/sources/commondefines.js). The supported values for the `csv` delimiters include:

- `0` - no delimiter;
- `1` - tab;
- `2` - semicolon;
- `3` - colon;
- `4` - comma;
- `5` - space.

</parameters>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,38 @@ Saves the file after all the changes are made. The type of the file which will b
- {type: type, text: const wchar_t*}
```
- : The file extension. The following values are possible: `docx`, `odt`, `rtf`, `txt`, `pptx`, `xlsx`, `ods`, `csv`, `pdf` (see [OFFICESTUDIO\_FILE\_XXX](../../../../Builder%20App/Overview/index.md#format-types) values).
- :
The file extension. The following values are possible: `docx`, `odt`, `rtf`, `txt`, `pptx`, `xlsx`, `ods`, `csv`, `pdf` (see [OFFICESTUDIO\_FILE\_XXX](../../../../Builder%20App/Overview/index.md#format-types) values).

- sPath

```yml signature.variant="inline"
- {type: type, text: const wchar_t*}
```

- : The path to the file to be saved together with its name and extension.
- :

The path to the file to be saved together with its name and extension.

- sParams

```yml signature.variant="inline"
- {type: type, text: const wchar_t*}
```

- : The parameters needed for the correct file saving (most commonly, the encoding is used for the `txt` and `csv` file types or the delimiter for the `csv` files, for other file types this is just an empty string). The parameters are added in the form of XML tags, where `m_nCsvTxtEncoding` is used for the text encoding and `m_nCsvDelimiter` is used for the `csv` delimiter. You can find all the supported values for the encoding [in this file](https://github.com/ONLYOFFICE/server/blob/master/Common/sources/commondefines.js). The supported values for the `csv` delimiters include:<br/><br/>`0` - no delimiter;<br/><br/>`1` - tab;<br/><br/>`2` - semicolon;<br/><br/>`3` - colon;<br/><br/>`4` - comma;<br/><br/>`5` - space.<br/><br/>When saving into an image file (`png` or `jpg`) for creating thumbnails, the additional parameters are used. [See below](#saving-into-images) to find them out.
- :

The parameters needed for the correct file saving (most commonly, the encoding is used for the `txt` and `csv` file types or the delimiter for the `csv` files, for other file types this is just an empty string). The parameters are added in the form of XML tags, where `m_nCsvTxtEncoding` is used for the text encoding and `m_nCsvDelimiter` is used for the `csv` delimiter. You can find all the supported values for the encoding [in this file](https://github.com/ONLYOFFICE/server/blob/master/Common/sources/commondefines.js). The supported values for the `csv` delimiters include:

- `0` - no delimiter;
- `1` - tab;
- `2` - semicolon;
- `3` - colon;
- `4` - comma;
- `5` - space.

When saving into an image file (`png` or `jpg`) for creating thumbnails, the additional parameters are used. [See below](#saving-into-images) to find them out.

</parameters>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Base class used by ONLYOFFICE Document Builder for the document file (text docum
- [Dispose](Dispose/index.md)
- : Unloads the ONLYOFFICE Document Builder from the application memory when it is no longer needed.
- [ExecuteCommand](ExecuteCommand/index.md)
- : Executes the command which will be used to create the document file (text document, spreadsheet, presentation, form document, PDF)
- : Executes the command which will be used to create the document file (text document, spreadsheet, presentation, form document, PDF).
- [GetContext](GetContext/index.md)
- : Returns the current JS context.
- [GetVersion](GetVersion/index.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
`static unsigned char* AllocMemoryTypedArray(nSize);`
```yml signature
- {type: keyword, text: static unsigned char*}
- {type: text, text: " "}
- {type: entity, text: AllocMemoryTypedArray}
- {type: text, text: (}
- {type: parameter, text: nSize}
- {type: text, text: ": "}
- {type: type, text: const size_t*}
- {type: text, text: )}
```
## Description
Allocates the memory for a typed array by creating a buffer array of the specified size.
> Please note, that for the *.docbuilder* file the *CDocBuilderContext.AllocMemoryTypedArray* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.AllocMemoryTypedArray` method is not used.

## Parameters

| Name | Type | Description |
| ------- | --------------- | ---------------------- |
| *nSize* | const size\_t\* | The buffer array size. |
<parameters>

- nSize

```yml signature.variant="inline"
- {type: type, text: const size_t*}
```

- : The buffer array size.

</parameters>

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
`CDocBuilderValue CreateArray(nLength);`
```yml signature
- {id: ../../CDocBuilderValue/index.md, token: {type: keyword, text: CDocBuilderValue}}
- {type: text, text: " "}
- {type: entity, text: CreateArray}
- {type: text, text: (}
- {type: parameter, text: nLength}
- {type: text, text: ": "}
- {type: type, text: const int&}
- {type: text, text: )}
```
## Description
Creates an array value, an analogue of *new Array (length)* in JS.
Creates an array value, an analogue of `new Array (length)` in JS.

> Please note, that for the *.docbuilder* file the *CDocBuilderContext.CreateArray* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.CreateArray` method is not used.

## Parameters

| Name | Type | Description |
| --------- | ---------- | ----------------- |
| *nLength* | const int& | The array length. |
<parameters>

- nLength

```yml signature.variant="inline"
- {type: type, text: const int&}
```

- : The array length.

</parameters>

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
`CDocBuilderValue CreateNull();`
```yml signature
- {id: ../../CDocBuilderValue/index.md, token: {type: keyword, text: CDocBuilderValue}}
- {type: text, text: " "}
- {type: entity, text: CreateNull}
- {type: text, text: (}
- {type: text, text: )}
```
## Description
Creates a null value, an analogue of *null* in JS.
Creates a null value, an analogue of `null` in JS.

> Please note, that for the *.docbuilder* file the *CDocBuilderContext.CreateNull* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.CreateNull` method is not used.

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
`CDocBuilderValue CreateObject();`
```yml signature
- {id: ../../CDocBuilderValue/index.md, token: {type: keyword, text: CDocBuilderValue}}
- {type: text, text: " "}
- {type: entity, text: CreateObject}
- {type: text, text: (}
- {type: text, text: )}
```
## Description
Creates an empty object, an analogue of *{}* in JS.
Creates an empty object, an analogue of `{}` in JS.

> Please note, that for the *.docbuilder* file the *CDocBuilderContext.CreateObject* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.CreateObject` method is not used.

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
`CDocBuilderContextScope CreateScope();`
```yml signature
- {id: ../../CDocBuilderContextScope/index.md, token: {type: keyword, text: CDocBuilderContextScope}}
- {type: text, text: " "}
- {type: entity, text: CreateScope}
- {type: text, text: (}
- {type: text, text: )}
```
## Description
Creates a [context scope](../../CDocBuilderContextScope/index.md) which sets the execution context for all operations executed within a local scope.
> Please note, that for the *.docbuilder* file the *CDocBuilderContext.CreateScope* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.CreateScope` method is not used.

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,57 @@
`CDocBuilderValue CreateTypedArray(sBuffer, nLength, bExternalize);`
```yml signature
- {id: ../../CDocBuilderValue/index.md, token: {type: keyword, text: CDocBuilderValue}}
- {type: text, text: " "}
- {type: entity, text: CreateTypedArray}
- {type: text, text: (}
- {type: parameter, text: sBuffer}
- {type: text, text: ": "}
- {type: type, text: unsigned char*}
- {type: text, text: ", "}
- {type: parameter, text: nLength}
- {type: text, text: ": "}
- {type: type, text: const int&}
- {type: text, text: ", "}
- {type: parameter, text: bExternalize}
- {type: text, text: ": "}
- {type: type, text: const bool&}
- {type: text, text: )}
```
## Description
Creates a Uint8Array value, an analogue of *Uint8Array* in JS.
Creates a Uint8Array value, an analogue of `Uint8Array` in JS.

> Please note, that for the *.docbuilder* file the *CDocBuilderContext.CreateTypedArray* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.CreateTypedArray` method is not used.

## Parameters

| Name | Type | Description |
| -------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| *sBuffer* | unsigned char\* | The array buffer. |
| *nLength* | const int& | The array length. |
| *bExternalize* | const bool& | Specifies if the application releases the memory after freeing Uint8Array (**true**). If this parameter is **false**, then the memory will be released automatically. In this case, the buffer must be created with the [AllocMemoryTypedArray](../AllocMemoryTypedArray/index.md) method. |
<parameters>

- sBuffer

```yml signature.variant="inline"
- {type: type, text: unsigned char*}
```

- : The array buffer.

- nLength

```yml signature.variant="inline"
- {type: type, text: const int&}
```

- : The array length.

- bExternalize

```yml signature.variant="inline"
- {type: type, text: const bool&}
```

- : Specifies if the application releases the memory after freeing Uint8Array (`true`). If this parameter is `false`, then the memory will be released automatically. In this case, the buffer must be created with the [AllocMemoryTypedArray](../AllocMemoryTypedArray/index.md) method.

</parameters>

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
`CDocBuilderValue CreateUndefined();`
```yml signature
- {id: ../../CDocBuilderValue/index.md, token: {type: keyword, text: CDocBuilderValue}}
- {type: text, text: " "}
- {type: entity, text: CreateUndefined}
- {type: text, text: (}
- {type: text, text: )}
```
## Description
Creates an undefined value, an analogue of *undefined* in JS.
Creates an undefined value, an analogue of `undefined` in JS.

> Please note, that for the *.docbuilder* file the *CDocBuilderContext.CreateUndefined* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.CreateUndefined` method is not used.

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
`static void FreeMemoryTypedArray(sData, nSize);`
```yml signature
- {type: keyword, text: static void}
- {type: text, text: " "}
- {type: entity, text: FreeMemoryTypedArray}
- {type: text, text: (}
- {type: parameter, text: sData}
- {type: text, text: ": "}
- {type: type, text: unsigned char*}
- {type: text, text: ", "}
- {type: parameter, text: nSize}
- {type: text, text: ": "}
- {type: type, text: const size_t*}
- {type: text, text: )}
```
## Description
Frees the memory for a typed array.
> Please note, that for the *.docbuilder* file the *CDocBuilderContext.FreeMemoryTypedArray* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.FreeMemoryTypedArray` method is not used.

## Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------ |
| *sData* | unsigned char\* | The allocated memory to be released. |
| *nSize* | const size\_t\* | The buffer array size. |
<parameters>

- sData

```yml signature.variant="inline"
- {type: type, text: unsigned char*}
```

- : The allocated memory to be released.

- nSize

```yml signature.variant="inline"
- {type: type, text: const size_t*}
```

- : The buffer array size.

</parameters>

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
`CDocBuilderValue GetGlobal();`
```yml signature
- {id: ../../CDocBuilderValue/index.md, token: {type: keyword, text: CDocBuilderValue}}
- {type: text, text: " "}
- {type: entity, text: GetGlobal}
- {type: text, text: (}
- {type: text, text: )}
```
## Description
Returns the global object for the current context.
> Please note, that for the *.docbuilder* file the *CDocBuilderContext.GetGlobal* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.GetGlobal` method is not used.

## Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
`bool IsError();`
```yml signature
- {type: keyword, text: bool}
- {type: text, text: " "}
- {type: entity, text: IsError}
- {type: text, text: (}
- {type: text, text: )}
```
## Description
Checks for errors in JS. The error message and call stack will be written to *std::cerr*.
Checks for errors in JS. The error message and call stack will be written to `std::cerr`.

> Please note, that for the *.docbuilder* file the *CDocBuilderContext.IsError* method is not used.
> Please note, that for the `.docbuilder` file the `CDocBuilderContext.IsError` method is not used.

## Example

Expand Down
Loading

0 comments on commit e6ecc53

Please sign in to comment.