Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sheets): inline format error in cell #1843

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading