Skip to content

Commit

Permalink
fix: inline format error in cell (#1843)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs committed Apr 10, 2024
1 parent 5f7e9a2 commit 2002fdf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Expand Up @@ -1759,6 +1759,13 @@ export class SpreadsheetSkeleton extends Skeleton {
if (!documentData.documentStyle) {
documentData.documentStyle = {};
}

// Fix https://github.com/dream-num/univer/issues/1586
documentData.documentStyle.pageSize = {
width: Number.POSITIVE_INFINITY,
height: Number.POSITIVE_INFINITY,
};

documentData.documentStyle.renderConfig = renderConfig;

const paragraphs = documentData.body.paragraphs || [];
Expand Down
Expand Up @@ -31,7 +31,7 @@ import type {
ITextStyle,
Nullable,
} from '@univerjs/core';
import { CellValueType, CommandType, IUniverInstanceService, ObjectMatrix, Tools } from '@univerjs/core';
import { CellValueType, CommandType, IUniverInstanceService, normalizeTextRuns, ObjectMatrix, Tools } from '@univerjs/core';
import type { IAccessor } from '@wendellhu/redi';

/** Params of `SetRangeValuesMutation` */
Expand Down Expand Up @@ -148,7 +148,9 @@ function setNull(value: Nullable<ICellData>) {
*/
export const SetRangeValuesMutation: IMutation<ISetRangeValuesMutationParams, boolean> = {
id: 'sheet.mutation.set-range-values',

type: CommandType.MUTATION,

handler: (accessor, params) => {
const { cellValue, subUnitId, unitId } = params;
const univerInstanceService = accessor.get(IUniverInstanceService);
Expand Down Expand Up @@ -523,7 +525,7 @@ export function mergeRichTextStyle(p: IDocumentData, newStyle: Nullable<IStyleDa
newTextRuns.push(tr);
}

p.body.textRuns = newTextRuns;
p.body.textRuns = normalizeTextRuns(newTextRuns);
}

function isNumeric(str: string) {
Expand Down

0 comments on commit 2002fdf

Please sign in to comment.