From fa63fed7c474b0e223d1fa865a4ef15fbac59780 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 13:17:09 +0400 Subject: [PATCH 01/20] Bump rubocop-performance from 1.17.1 to 1.18.0 (#900) Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.17.1 to 1.18.0. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.17.1...v1.18.0) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cacb4a35d..a2c6ef387 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,7 +78,7 @@ GEM rubocop (~> 1.41) rubocop-factory_bot (2.23.1) rubocop (~> 1.33) - rubocop-performance (1.17.1) + rubocop-performance (1.18.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rake (0.6.0) From 35f491e7059d7624b29626126b78c31e33c2117c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 14:02:14 +0400 Subject: [PATCH 02/20] Bump nokogiri from 1.15.0 to 1.15.1 (#901) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.15.0 to 1.15.1. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.15.0...v1.15.1) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a2c6ef387..b5ddc503a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,7 +12,7 @@ GEM json (2.6.3) jwt (2.7.0) mini_portile2 (2.8.2) - nokogiri (1.15.0) + nokogiri (1.15.1) mini_portile2 (~> 2.8.2) racc (~> 1.4) onlyoffice_pdf_parser (0.5.0) From 7b149945650a416ecfa9397ad4404fc38b20ce4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 14:28:20 +0400 Subject: [PATCH 03/20] Bump ooxml_parser from 0.36.0 to 0.36.1 (#902) Bumps [ooxml_parser](https://github.com/onlyoffice/ooxml_parser) from 0.36.0 to 0.36.1. - [Release notes](https://github.com/onlyoffice/ooxml_parser/releases) - [Changelog](https://github.com/ONLYOFFICE/ooxml_parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/onlyoffice/ooxml_parser/compare/v0.36.0...v0.36.1) --- updated-dependencies: - dependency-name: ooxml_parser dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b5ddc503a..b0aed5592 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,7 +22,7 @@ GEM ooxml_decrypt (1.0.0) nokogiri (~> 1.10) ruby-ole (~> 1.2) - ooxml_parser (0.36.0) + ooxml_parser (0.36.1) nokogiri (~> 1) ooxml_decrypt (~> 1) rubyzip (~> 2) From d92ff58926975d78de8e4c679792b04ffb1554f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:47:17 +0400 Subject: [PATCH 04/20] Bump nokogiri from 1.15.1 to 1.15.2 (#905) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.15.1 to 1.15.2. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.15.1...v1.15.2) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b0aed5592..3066485b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,7 +12,7 @@ GEM json (2.6.3) jwt (2.7.0) mini_portile2 (2.8.2) - nokogiri (1.15.1) + nokogiri (1.15.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) onlyoffice_pdf_parser (0.5.0) From 2d2a942abf4e882821ebd8b850b1eed39f97dc2e Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Mon, 12 Jun 2023 13:08:14 +0300 Subject: [PATCH 05/20] update: dockerfile for dev (#913) --- dockerfiles/debian-develop/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dockerfiles/debian-develop/Dockerfile b/dockerfiles/debian-develop/Dockerfile index a4e544058..65301fd0c 100644 --- a/dockerfiles/debian-develop/Dockerfile +++ b/dockerfiles/debian-develop/Dockerfile @@ -2,16 +2,19 @@ FROM ruby:3.2 MAINTAINER Pavel.Lobashov "shockwavenn@gmail.com" -RUN apt-get update && apt-get -y -q install git curl -RUN apt-get update && apt-get -y -q install libmagic-dev \ - poppler-utils +RUN apt-get update && apt-get -y -q install git \ + curl \ + libmagic-dev \ + poppler-utils \ + lsb-release RUN gem install bundler COPY . /doc-builder-testing WORKDIR /doc-builder-testing RUN bundle config set without 'development' && \ bundle install -RUN echo "deb [trusted=yes] http://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/onlyoffice/repo-unstable/ubuntu trusty main" >> /etc/apt/sources.list.d/onlyoffice.list && \ +RUN echo "deb [trusted=yes] https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/repo/debian $(lsb_release -cs) 99.99.99" | \ + tee /etc/apt/sources.list.d/onlyoffice-dev.list && \ apt-get -y update && \ apt-get -y install onlyoffice-documentbuilder From 00a27c14b63aaf21e5f1e3c2a83bd458bfa2b02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:46:28 +0400 Subject: [PATCH 06/20] Bump rubocop from 1.51.0 to 1.52.0 (#908) Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.51.0 to 1.52.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.51.0...v1.52.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3066485b7..be15ee5e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,7 +62,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.51.0) + rubocop (1.52.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) @@ -72,7 +72,7 @@ GEM rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.28.1) + rubocop-ast (1.29.0) parser (>= 3.2.1.0) rubocop-capybara (2.18.0) rubocop (~> 1.41) From 9a65fb5f78e59c1085563e5959f3028f54beb25b Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:17:04 +0300 Subject: [PATCH 07/20] skip: check set_highligth (#914) --- js/docx/smoke/api_run/set_highlight.js | 20 ++++++++++---------- js/docx/smoke/api_text_pr/set_highlight.js | 12 ++++++------ spec/docx/smoke/api_run_spec.rb | 1 + spec/docx/smoke/api_text_properties_spec.rb | 1 + 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/js/docx/smoke/api_run/set_highlight.js b/js/docx/smoke/api_run/set_highlight.js index e8eb4e00c..ddafcc4f9 100644 --- a/js/docx/smoke/api_run/set_highlight.js +++ b/js/docx/smoke/api_run/set_highlight.js @@ -1,13 +1,13 @@ builder.CreateFile("docx"); -var oDocument = Api.GetDocument(); -var oParagraph, oRun; -oParagraph = oDocument.GetElement(0); -oRun = Api.CreateRun(); -oRun.AddText("This is just a sample text. "); -oParagraph.AddElement(oRun); -oRun = Api.CreateRun(); -oRun.SetHighlight("yellow"); -oRun.AddText("This is a text run with the text highlighted with yellow color."); -oParagraph.AddElement(oRun); + var oDocument = Api.GetDocument(); + var oParagraph, oRun; + oParagraph = oDocument.GetElement(0); + oRun = Api.CreateRun(); + oRun.AddText("This is just a sample text. "); + oParagraph.AddElement(oRun); + oRun = Api.CreateRun(); + oRun.SetHighlight("yellow"); + oRun.AddText("This is a text run with the text highlighted with yellow color."); + oParagraph.AddElement(oRun); builder.SaveFile("docx", "SetHighlight.docx"); builder.CloseFile(); diff --git a/js/docx/smoke/api_text_pr/set_highlight.js b/js/docx/smoke/api_text_pr/set_highlight.js index 5ce13caf9..65cc60e5f 100644 --- a/js/docx/smoke/api_text_pr/set_highlight.js +++ b/js/docx/smoke/api_text_pr/set_highlight.js @@ -1,9 +1,9 @@ builder.CreateFile("docx"); -var oDocument = Api.GetDocument(); -var oParagraph, oTextPr; -oTextPr = oDocument.GetDefaultTextPr(); -oTextPr.SetHighlight("yellow", false); -oParagraph = oDocument.GetElement(0); -oParagraph.AddText("A sample text highlighted with yellow color using the text properties."); + var oDocument = Api.GetDocument(); + var oParagraph, oTextPr; + oTextPr = oDocument.GetDefaultTextPr(); + oTextPr.SetHighlight("yellow", false); + oParagraph = oDocument.GetElement(0); + oParagraph.AddText("A sample text highlighted with yellow color using the text properties."); builder.SaveFile("docx", "SetHighlight.docx"); builder.CloseFile(); diff --git a/spec/docx/smoke/api_run_spec.rb b/spec/docx/smoke/api_run_spec.rb index 99c368e77..69a0fa13b 100644 --- a/spec/docx/smoke/api_run_spec.rb +++ b/spec/docx/smoke/api_run_spec.rb @@ -111,6 +111,7 @@ end it 'ApiRun | SetHighlight method' do + skip('https://bugzilla.onlyoffice.com/show_bug.cgi?id=62996') docx = builder.build_and_parse('js/docx/smoke/api_run/set_highlight.js') expect(docx.elements.first.nonempty_runs[1].text).to eq('This is a text run with the text highlighted with yellow color.') expect(docx.elements.first.nonempty_runs[1].highlight).to eq('yellow') diff --git a/spec/docx/smoke/api_text_properties_spec.rb b/spec/docx/smoke/api_text_properties_spec.rb index a8067036a..5ec088d5d 100644 --- a/spec/docx/smoke/api_text_properties_spec.rb +++ b/spec/docx/smoke/api_text_properties_spec.rb @@ -38,6 +38,7 @@ end it 'ApiTextPr | SetHighlight method' do + skip('https://bugzilla.onlyoffice.com/show_bug.cgi?id=62996') docx = builder.build_and_parse('js/docx/smoke/api_text_pr/set_highlight.js') expect(docx.elements.first.nonempty_runs.first.highlight).to eq('yellow') end From e3883f13d5a2b84d9fd05d4b06454f658c5b9a75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:39:31 +0400 Subject: [PATCH 08/20] Bump rubocop-ast from 1.28.1 to 1.29.0 (#907) Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.28.1 to 1.29.0. - [Release notes](https://github.com/rubocop/rubocop-ast/releases) - [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.28.1...v1.29.0) --- updated-dependencies: - dependency-name: rubocop-ast dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> From 6e6e90d37f0e1a9eaa90fb9e44324e99709ab599 Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Mon, 12 Jun 2023 19:02:25 +0300 Subject: [PATCH 09/20] fix: HTTPGatewayTimeout bacause incorrect cloud for png (#916) --- js/docx/functional/custom_js/priglashenie.js | 18 +----------------- js/docx/functional/custom_js/rsvp_cards.js | 19 +++---------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/js/docx/functional/custom_js/priglashenie.js b/js/docx/functional/custom_js/priglashenie.js index 5d63b22cc..a5179c72a 100644 --- a/js/docx/functional/custom_js/priglashenie.js +++ b/js/docx/functional/custom_js/priglashenie.js @@ -13,7 +13,6 @@ oSection.SetPageMargins(1800, 1440, 1800, 1440); oSection.SetPageSize(11909, 16834, true); oSection.SetType("nextPage"); - // default text properties oTextPr = oDocument.GetDefaultTextPr(); oTextPr.SetFontSize(24); @@ -23,7 +22,6 @@ oTextPr.SetSpacing(0); oTextPr.SetPosition(0); oTextPr.SetColor(0x07, 0x3A, 0x77, false); - // default paragraph properties oParaPr = oDocument.GetDefaultParaPr(); oParaPr.SetSpacingLine(240, "auto"); @@ -31,7 +29,6 @@ oParaPr.SetSpacingBefore(0); oParaPr.SetSpacingAfter(0); oParaPr.SetJc("left"); - // heading 1 style oHeading1Style = oDocument.CreateStyle("Heading 1 custom", "paragraph"); @@ -45,7 +42,6 @@ oParaPr.SetSpacingLine(560, "exact"); oParaPr.SetJc("center"); oParaPr.SetSpacingBefore(180); - // heading 2 style oHeading2Style = oDocument.CreateStyle("Heading 2 custom", "paragraph"); @@ -59,7 +55,6 @@ oParaPr.SetSpacingLine(280, "exact"); oParaPr.SetJc("center"); oParaPr.SetSpacingBefore(360); - // heading 3 style oHeading3Style = oDocument.CreateStyle("Heading 3 custom", "paragraph"); @@ -74,7 +69,6 @@ oParaPr.SetSpacingLine(280, "exact"); oParaPr.SetJc("center"); oParaPr.SetSpacingBefore(0); - // normal style oNormalStyle = oDocument.CreateStyle("Normal custom", "paragraph"); @@ -88,16 +82,14 @@ oParaPr.SetSpacingLine(240, "auto"); oParaPr.SetJc("center"); oParaPr.SetSpacingBefore(180); - // frame oParagraph = oDocument.GetElement(0); -oDrawing = Api.CreateImage("https://cloud.githubusercontent.com/assets/668524/22776978/d4623fd6-eec2-11e6-98a8-263e7d75e538.png", 2972435, 4286250); +let oDrawing = Api.CreateImage("https://testing-documentserver-files.s3.amazonaws.com/png/d4623fd6-eec2-11e6-98a8-263e7d75e538.png", 2972435, 4286250); oDrawing.SetWrappingStyle("behind"); oDrawing.SetHorPosition("page", 452118); oDrawing.SetVerPosition("page", 463548); oParagraph.AddDrawing(oDrawing); - // shape with text oFill = Api.CreateNoFill(); oStroke = Api.CreateStroke(0, Api.CreateNoFill()); @@ -106,7 +98,6 @@ oDrawingRect.SetWrappingStyle("square"); oDrawingRect.SetHorPosition("page", 685800); oDrawingRect.SetVerPosition("page", 800100); - // paragraph_text // heading 1 oParagraphInner = Api.CreateParagraph(); @@ -124,21 +115,18 @@ oParagraphInner.SetStyle(oHeading1Style); oParagraphInner.AddText("МЕРОПРИЯТИЯ"); oDrawingRect.GetDocContent().Push(oParagraphInner); - // heading 2 oParagraphInner = Api.CreateParagraph(); oParagraphInner.SetStyle(oHeading2Style); oParagraphInner.AddText("24 cентября (воскресенье)"); oDrawingRect.GetDocContent().Push(oParagraphInner); - // heading 3 oParagraphInner = Api.CreateParagraph(); oParagraphInner.SetStyle(oHeading3Style); oParagraphInner.AddText("19:00"); oDrawingRect.GetDocContent().Push(oParagraphInner); - // normal oParagraphInner = Api.CreateParagraph(); oParagraphInner.SetStyle(oNormalStyle); @@ -153,7 +141,6 @@ oRun.AddText("предоставлять не нужно, удалите это oParagraphInner.AddElement(oRun); oDrawingRect.GetDocContent().Push(oParagraphInner); - // italic normal oParagraphInner = Api.CreateParagraph(); oParagraphInner.SetStyle(oNormalStyle); @@ -163,7 +150,6 @@ oRun.SetItalic(true); oParagraphInner.AddElement(oRun); oDrawingRect.GetDocContent().Push(oParagraphInner); - // all caps normal oParagraphInner = Api.CreateParagraph(); oParagraphInner.SetStyle(oNormalStyle); @@ -174,7 +160,6 @@ oRun.SetCaps(true); oParagraphInner.AddElement(oRun); oDrawingRect.GetDocContent().Push(oParagraphInner); - // KnV coding style: removing 1st element 'empty paragraph' oDrawingRect.GetDocContent().RemoveElement(0); @@ -182,6 +167,5 @@ oParagraph = Api.CreateParagraph(); oParagraph.AddDrawing(oDrawingRect); oDocument.Push(oParagraph); - builder.SaveFile("docx", "priglashenie.docx"); builder.CloseFile(); diff --git a/js/docx/functional/custom_js/rsvp_cards.js b/js/docx/functional/custom_js/rsvp_cards.js index c73809a3c..1d43776b1 100644 --- a/js/docx/functional/custom_js/rsvp_cards.js +++ b/js/docx/functional/custom_js/rsvp_cards.js @@ -1,7 +1,8 @@ builder.CreateFile("docx"); + var oDocument, oSection, oTextPr, oParaPr, oRun, oTable; var oParagraph, oTableRow, oCell, oNumbering, oTablePr; -var oTableCellPr, oDrawing, oRow, oCell2, oTableRow2; +var oTableCellPr, oDrawing, oCell2, oTableRow2; var oTable2, oTable3, oTableRow3, oCell3; var oTable4, oTableRow4, oCell4; @@ -13,8 +14,6 @@ oSection.SetPageMargins(2520, 1440, 2520, 1440); oSection.SetPageSize(12240, 15840, false); oSection.SetType("nextPage"); - - // default text properties oTextPr = oDocument.GetDefaultTextPr(); oTextPr.SetFontSize(24); @@ -23,7 +22,6 @@ oTextPr.SetFontFamily("Gabriola"); oTextPr.SetSpacing(0); oTextPr.SetPosition(0); - // default paragraph properties oParaPr = oDocument.GetDefaultParaPr(); oParaPr.SetSpacingLine(180, "auto"); @@ -34,14 +32,12 @@ oParaPr.SetIndLeft(0); oParaPr.SetIndRight(0); oParaPr.SetIndFirstLine(0); - // subtitle style var oSubTitleStyle = oDocument.CreateStyle("Subtitle Custom", "paragraph"); oTextPr = oSubTitleStyle.GetTextPr(); oTextPr.SetFontSize(28); - // title style var oTitleStyle = oDocument.CreateStyle("Title Custom", "paragraph"); @@ -53,7 +49,6 @@ oParaPr = oTitleStyle.GetParaPr(); oParaPr.SetSpacingAfter(290); oParaPr.SetSpacingLine(168, "auto"); - // table style var oTableStyle = oDocument.CreateStyle("TableStyle", "table"); @@ -65,13 +60,11 @@ oTablePr.SetWidth("auto"); oTablePr.SetTableCellMarginRight(0); oTablePr.SetTableCellMarginLeft(0); - // table oTable = Api.CreateTable(3, 3); oDocument.Push(oTable); oDocument.RemoveElement(0); - oTable.SetStyle(oTableStyle); oTable.SetWidth(7200); oTable.SetTableLook(true, true, false, false, true, false); @@ -81,10 +74,9 @@ for (var nRow = 0; nRow <= 2; nRow += 2) { oTableRow = oTable.GetRow(nRow); oTableRow.SetHeight("atLeast", 5040); - // cells oCell = oTable.GetRow(nRow).GetCell(0); - oDrawing = Api.CreateImage("https://cloud.githubusercontent.com/assets/668524/22776978/d4623fd6-eec2-11e6-98a8-263e7d75e538.png", 1167386, 2928086); + oDrawing = Api.CreateImage("https://testing-documentserver-files.s3.amazonaws.com/png/d4623fd6-eec2-11e6-98a8-263e7d75e538.png", 1167386, 2928086); oCell.GetContent().GetElement(0).AddDrawing(oDrawing); oCell.GetContent().GetElement(0).SetJc("right"); oCell.GetContent().GetElement(0).SetSpacingLine(240, "auto"); @@ -98,7 +90,6 @@ for (var nRow = 0; nRow <= 2; nRow += 2) { oCell = oTable.GetRow(nRow).GetCell(2); oCell.SetWidth("twips", 4752); - // table 3rd cell oTable2 = Api.CreateTable(1, 2); oTable2.SetTableCellMarginRight(0); @@ -142,7 +133,6 @@ for (var nRow = 0; nRow <= 2; nRow += 2) { oParagraph.AddElement(oRun); oTable2.GetRow(1).GetCell(0).GetContent().Push(oParagraph); - // table 3 oTable3 = Api.CreateTable(1, 2); oTable3.SetTableCellMarginRight(0); @@ -198,7 +188,6 @@ for (var nRow = 0; nRow <= 2; nRow += 2) { oCell2.Push(oTable4); // inner lvl 2 table 2 (table 4) - // cells oCell4 = oTable4.GetRow(0).GetCell(0); oCell4.SetWidth("twips", 432); @@ -221,11 +210,9 @@ for (var nRow = 0; nRow <= 2; nRow += 2) { oCell4.GetContent().GetElement(0).AddText("Regrets"); } - // middle cell oTableRow = oTable.GetRow(1); oTableRow.SetHeight("atLeast", 1440); - builder.SaveFile("docx", "rsvp_cards.docx"); builder.CloseFile(); From d69b15d9e4c0347510595f7af7cd69f167f2e6f7 Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Mon, 12 Jun 2023 19:14:34 +0300 Subject: [PATCH 10/20] Use agrs to pass an array of parameters for initialization WebBuilderWrapper instanse (#917) * fix: HTTPGatewayTimeout bacause incorrect cloud for png * feature: Use args for init param --- .../web_doc_builder_wrapper.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/doc_builder_testing/web_doc_builder_wrapper.rb b/lib/doc_builder_testing/web_doc_builder_wrapper.rb index 249461220..b8f14022c 100644 --- a/lib/doc_builder_testing/web_doc_builder_wrapper.rb +++ b/lib/doc_builder_testing/web_doc_builder_wrapper.rb @@ -12,17 +12,22 @@ class WebDocBuilderWrapper include DocBuilderHelper include DocBuilderVersionHelper - def initialize(documentserver_path = default_web_builder_url) - @uri = URI(documentserver_path) + def initialize(**args) + @uri = URI(args.fetch(:documentserver_path, default_web_builder_url)) @http = Net::HTTP.new(@uri.host, @uri.port) @http.use_ssl = true if @uri.port == 443 @request_data = Net::HTTP::Post.new('/docbuilder?async=false') @temp_script_data = nil - @jwt_key = 'doc-linux' - @jwt_header = 'AuthorizationJwt' + @jwt_key = args.fetch(:jwt_key, 'doc-linux') + @jwt_header = args.fetch(:jwt_header, 'AuthorizationJwt') @jwt_prefix = 'Bearer' end + # @return [String] Url for default location of DocBuilder + def default_web_builder_url + ENV.fetch('WEB_BUILDER_URL', 'https://doc-linux.teamlab.info') + end + # Send script for building and parse it # @param script_file [String] path to script file # @return [OoxmlParser::CommonDocumentStructure] parsed file if file is Ooxml @@ -94,9 +99,4 @@ def check_response_for_errors(response) raise WebDocBuilderError, response unless response.code == '200' raise EmptyUrlsInWebBuilderResponse, response if JSON.parse(response.body)['urls'].empty? end - - # @return [String] Url for default location of DocBuilder - def default_web_builder_url - ENV.fetch('WEB_BUILDER_URL', 'https://doc-linux.teamlab.info') - end end From 5e75bc23e664fbc82025f17203be369f1da5eade Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Mon, 12 Jun 2023 19:33:50 +0300 Subject: [PATCH 11/20] feature: Bilder error handling (#918) * fix: HTTPGatewayTimeout bacause incorrect cloud for png * feature: Use args for init param * feature: Bilder error handling --- .rubocop_todo.yml | 13 +++++++++---- lib/doc_builder_testing/web_doc_builder_wrapper.rb | 10 ++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0b4a09dfe..fd1c76677 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,19 +1,24 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2022-10-21 11:53:40 UTC using RuboCop version 1.37.0. +# on 2023-06-12 15:41:56 UTC using RuboCop version 1.52.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 105 +# Offense count: 1 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. +Metrics/MethodLength: + Max: 11 + +# Offense count: 111 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 21 -# Offense count: 422 +# Offense count: 404 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns. +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https Layout/LineLength: Max: 179 diff --git a/lib/doc_builder_testing/web_doc_builder_wrapper.rb b/lib/doc_builder_testing/web_doc_builder_wrapper.rb index b8f14022c..7f3dcf02c 100644 --- a/lib/doc_builder_testing/web_doc_builder_wrapper.rb +++ b/lib/doc_builder_testing/web_doc_builder_wrapper.rb @@ -96,7 +96,17 @@ def download_file(url, output_file) # @param response [Net::HTTPResponse] response to check error # @return [nil] def check_response_for_errors(response) + webbuilder_errors = { '-1': 'Unknown error.', + '-2': 'Generation timeout error.', + '-3': 'Document generation error.', + '-4': 'Error while downloading the document file to be generated.', + '-6': 'Error while accessing the document generation result database.', + '-8': 'Invalid token.' } raise WebDocBuilderError, response unless response.code == '200' + + webbuilder_errors.each do |key, value| + raise WebDocBuilderError, value if response.body.include?(key.to_s) + end raise EmptyUrlsInWebBuilderResponse, response if JSON.parse(response.body)['urls'].empty? end end From 9c92abf3189658373d33ad85475650643c098228 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:00:28 +0400 Subject: [PATCH 12/20] Bump racc from 1.6.2 to 1.7.0 (#909) Bumps [racc](https://github.com/tenderlove/racc) from 1.6.2 to 1.7.0. - [Release notes](https://github.com/tenderlove/racc/releases) - [Changelog](https://github.com/ruby/racc/blob/master/ChangeLog) - [Commits](https://github.com/tenderlove/racc/compare/v1.6.2...v1.7.0) --- updated-dependencies: - dependency-name: racc dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index be15ee5e5..0d06ec976 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM ruby-rc4 ttfunk pkg-config (1.5.1) - racc (1.6.2) + racc (1.7.0) rainbow (3.1.1) rake (13.0.6) regexp_parser (2.8.0) From 3eb0fe87e1cd68322827afcbb138c8946abe7c14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:21:06 +0400 Subject: [PATCH 13/20] Bump regexp_parser from 2.8.0 to 2.8.1 (#911) Bumps [regexp_parser](https://github.com/ammar/regexp_parser) from 2.8.0 to 2.8.1. - [Changelog](https://github.com/ammar/regexp_parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/ammar/regexp_parser/compare/v2.8.0...v2.8.1) --- updated-dependencies: - dependency-name: regexp_parser dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0d06ec976..5c462fa4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GEM racc (1.7.0) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.8.0) + regexp_parser (2.8.1) rexml (3.2.5) rmagick (5.2.0) pkg-config (~> 1.4) From 4fe0f7bc305a70ea3c3646bf9eb34c0aa85c9cfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 18:21:42 +0400 Subject: [PATCH 14/20] Bump image_size from 3.2.0 to 3.3.0 (#906) Bumps [image_size](https://github.com/toy/image_size) from 3.2.0 to 3.3.0. - [Changelog](https://github.com/toy/image_size/blob/master/CHANGELOG.markdown) - [Commits](https://github.com/toy/image_size/compare/v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: image_size dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5c462fa4c..3e351ec74 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GEM childprocess (4.1.0) diff-lcs (1.5.0) hashery (2.1.2) - image_size (3.2.0) + image_size (3.3.0) iniparse (1.5.0) json (2.6.3) jwt (2.7.0) From 658b019411123b6f901b9db8cc34ecdf10fbdea9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:39:43 +0400 Subject: [PATCH 15/20] Bump parser from 3.2.2.1 to 3.2.2.3 (#910) Bumps [parser](https://github.com/whitequark/parser) from 3.2.2.1 to 3.2.2.3. - [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/whitequark/parser/compare/v3.2.2.1...v3.2.2.3) --- updated-dependencies: - dependency-name: parser dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e351ec74..a3e0015af 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,8 +33,9 @@ GEM parallel (1.23.0) parallel_tests (4.2.1) parallel - parser (3.2.2.1) + parser (3.2.2.3) ast (~> 2.4.1) + racc pdf-reader (2.11.0) Ascii85 (~> 1.0) afm (~> 0.2.1) From 67eb3f1cf84fb68ec004c73766f0b86f049fa50f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 20:01:45 +0400 Subject: [PATCH 16/20] Bump jwt from 2.7.0 to 2.7.1 (#912) Bumps [jwt](https://github.com/jwt/ruby-jwt) from 2.7.0 to 2.7.1. - [Release notes](https://github.com/jwt/ruby-jwt/releases) - [Changelog](https://github.com/jwt/ruby-jwt/blob/main/CHANGELOG.md) - [Commits](https://github.com/jwt/ruby-jwt/compare/v2.7.0...v2.7.1) --- updated-dependencies: - dependency-name: jwt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a3e0015af..31a4ecfa3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,7 +10,7 @@ GEM image_size (3.3.0) iniparse (1.5.0) json (2.6.3) - jwt (2.7.0) + jwt (2.7.1) mini_portile2 (2.8.2) nokogiri (1.15.2) mini_portile2 (~> 2.8.2) From b7d54f87d31801ecf85fa7946e89b4fec186237a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 20:24:17 +0400 Subject: [PATCH 17/20] Bump rubocop from 1.52.0 to 1.52.1 (#919) Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.52.0 to 1.52.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.52.0...v1.52.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sorokin Maksim <60688343+askonev@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 31a4ecfa3..22a7e22bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,10 +63,10 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.52.0) + rubocop (1.52.1) json (~> 2.3) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) From b29f130fdd97303660bea8b30e2955b02e3942f6 Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Tue, 13 Jun 2023 20:26:36 +0300 Subject: [PATCH 18/20] fix: Clarify a server error (#920) --- lib/doc_builder_testing/web_doc_builder_wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/doc_builder_testing/web_doc_builder_wrapper.rb b/lib/doc_builder_testing/web_doc_builder_wrapper.rb index 7f3dcf02c..a76b63e2d 100644 --- a/lib/doc_builder_testing/web_doc_builder_wrapper.rb +++ b/lib/doc_builder_testing/web_doc_builder_wrapper.rb @@ -105,7 +105,7 @@ def check_response_for_errors(response) raise WebDocBuilderError, response unless response.code == '200' webbuilder_errors.each do |key, value| - raise WebDocBuilderError, value if response.body.include?(key.to_s) + raise WebDocBuilderError, value if response.body.include?("\"error\":#{key}") end raise EmptyUrlsInWebBuilderResponse, response if JSON.parse(response.body)['urls'].empty? end From 57655220629ce43bea8faaa4fa22a016649f41f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 18:57:40 +0400 Subject: [PATCH 19/20] Bump racc from 1.7.0 to 1.7.1 (#921) Bumps [racc](https://github.com/tenderlove/racc) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/tenderlove/racc/releases) - [Changelog](https://github.com/ruby/racc/blob/master/ChangeLog) - [Commits](https://github.com/tenderlove/racc/compare/v1.7.0...v1.7.1) --- updated-dependencies: - dependency-name: racc dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 22a7e22bc..f469e5b68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,7 +43,7 @@ GEM ruby-rc4 ttfunk pkg-config (1.5.1) - racc (1.7.0) + racc (1.7.1) rainbow (3.1.1) rake (13.0.6) regexp_parser (2.8.1) From 7f46c611bd7cbc53b07a1f7f1493e3c24c965647 Mon Sep 17 00:00:00 2001 From: Sorokin Maksim <60688343+askonev@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:58:56 +0300 Subject: [PATCH 20/20] Update to 7.4.0 dockerfiles (next-release: 7.4.1) & fixed: bug `59740` (#915) * fixed: fixed bug 59740 * update to 7.4.1 --- dockerfiles/debian-develop/Dockerfile | 8 +++++--- dockerfiles/debian-next-release/Dockerfile | 13 ++++++++----- js/xlsx/smoke/api_range/get_col.js | 6 +++--- js/xlsx/smoke/api_range/get_row.js | 6 +++--- js/xlsx/smoke/api_range/getter_col.js | 6 +++--- js/xlsx/smoke/api_range/getter_row.js | 6 +++--- js/xlsx/smoke/api_worksheet/get_name.js | 8 ++++---- spec/xlsx/smoke/api_range_spec.rb | 8 ++++---- 8 files changed, 33 insertions(+), 28 deletions(-) diff --git a/dockerfiles/debian-develop/Dockerfile b/dockerfiles/debian-develop/Dockerfile index 65301fd0c..82a41620a 100644 --- a/dockerfiles/debian-develop/Dockerfile +++ b/dockerfiles/debian-develop/Dockerfile @@ -1,22 +1,24 @@ FROM ruby:3.2 MAINTAINER Pavel.Lobashov "shockwavenn@gmail.com" +ENV VERSION="99.99.99" +ENV DIST="stable" RUN apt-get update && apt-get -y -q install git \ curl \ libmagic-dev \ - poppler-utils \ - lsb-release + poppler-utils RUN gem install bundler COPY . /doc-builder-testing WORKDIR /doc-builder-testing RUN bundle config set without 'development' && \ bundle install -RUN echo "deb [trusted=yes] https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/repo/debian $(lsb_release -cs) 99.99.99" | \ +RUN echo "deb [trusted=yes] https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/repo/debian $DIST $VERSION" | \ tee /etc/apt/sources.list.d/onlyoffice-dev.list && \ apt-get -y update && \ apt-get -y install onlyoffice-documentbuilder +RUN cat /etc/apt/sources.list.d/onlyoffice-dev.list CMD /bin/bash -c "onlyoffice-documentbuilder; \ cd /doc-builder-testing; \ diff --git a/dockerfiles/debian-next-release/Dockerfile b/dockerfiles/debian-next-release/Dockerfile index abb2efa75..433dd4775 100644 --- a/dockerfiles/debian-next-release/Dockerfile +++ b/dockerfiles/debian-next-release/Dockerfile @@ -1,10 +1,12 @@ FROM ruby:3.2 MAINTAINER Pavel.Lobashov "shockwavenn@gmail.com" -ENV VERSION="7.4.0" +ENV VERSION="7.4.1" +ENV DIST="stable" -RUN apt-get update && apt-get -y -q install git curl -RUN apt-get update && apt-get -y -q install libmagic-dev \ +RUN apt-get update && apt-get -y -q install git \ + curl \ + libmagic-dev \ poppler-utils RUN gem install bundler @@ -12,10 +14,11 @@ COPY . /doc-builder-testing WORKDIR /doc-builder-testing RUN bundle config set without 'development' && \ bundle install -RUN echo "deb [trusted=yes] https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/repo/debian stretch $VERSION" | tee /etc/apt/sources.list.d/onlyoffice.list && \ +RUN echo "deb [trusted=yes] https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/repo/debian $DIST $VERSION" | \ + tee /etc/apt/sources.list.d/onlyoffice-dev.list && \ apt-get -y update && \ apt-get -y install onlyoffice-documentbuilder=$VERSION-* -RUN cat /etc/apt/sources.list.d/onlyoffice.list +RUN cat /etc/apt/sources.list.d/onlyoffice-dev.list CMD /bin/bash -c "onlyoffice-documentbuilder; \ cd /doc-builder-testing; \ diff --git a/js/xlsx/smoke/api_range/get_col.js b/js/xlsx/smoke/api_range/get_col.js index 9285410fd..dffeef169 100644 --- a/js/xlsx/smoke/api_range/get_col.js +++ b/js/xlsx/smoke/api_range/get_col.js @@ -1,6 +1,6 @@ builder.CreateFile("xlsx"); -var oWorksheet = Api.GetActiveSheet(); -var oRange = oWorksheet.GetRange("D9").GetCol(); -oWorksheet.GetRange("A2").SetValue(oRange.toString()); + var oWorksheet = Api.GetActiveSheet(); + var oRange = oWorksheet.GetRange("D9").GetCol(); + oWorksheet.GetRange("A2").SetValue(oRange.toString()); builder.SaveFile("xlsx", "GetCol.xlsx"); builder.CloseFile(); diff --git a/js/xlsx/smoke/api_range/get_row.js b/js/xlsx/smoke/api_range/get_row.js index 8b6faa5d5..8526b2a03 100644 --- a/js/xlsx/smoke/api_range/get_row.js +++ b/js/xlsx/smoke/api_range/get_row.js @@ -1,6 +1,6 @@ builder.CreateFile("xlsx"); -var oWorksheet = Api.GetActiveSheet(); -var oRange = oWorksheet.GetRange("A9").GetRow(); -oWorksheet.GetRange("A2").SetValue(oRange.toString()); + var oWorksheet = Api.GetActiveSheet(); + var oRange = oWorksheet.GetRange("A9").GetRow(); + oWorksheet.GetRange("A2").SetValue(oRange.toString()); builder.SaveFile("xlsx", "GetRow.xlsx"); builder.CloseFile(); diff --git a/js/xlsx/smoke/api_range/getter_col.js b/js/xlsx/smoke/api_range/getter_col.js index 0c78d0033..0763c73e9 100644 --- a/js/xlsx/smoke/api_range/getter_col.js +++ b/js/xlsx/smoke/api_range/getter_col.js @@ -1,6 +1,6 @@ builder.CreateFile("xlsx"); -var oWorksheet = Api.GetActiveSheet(); -var oRange = oWorksheet.GetRange("D9").Col; -oWorksheet.GetRange("A2").SetValue(oRange.toString()); + var oWorksheet = Api.GetActiveSheet(); + var oRange = oWorksheet.GetRange("D9").Col; + oWorksheet.GetRange("A2").SetValue(oRange.toString()); builder.SaveFile("xlsx", "GetCol.xlsx"); builder.CloseFile(); diff --git a/js/xlsx/smoke/api_range/getter_row.js b/js/xlsx/smoke/api_range/getter_row.js index 69d72dd08..ba7882ae8 100644 --- a/js/xlsx/smoke/api_range/getter_row.js +++ b/js/xlsx/smoke/api_range/getter_row.js @@ -1,6 +1,6 @@ builder.CreateFile("xlsx"); -var oWorksheet = Api.GetActiveSheet(); -var oRange = oWorksheet.GetRange("A9").Row; -oWorksheet.GetRange("A2").SetValue(oRange.toString()); + var oWorksheet = Api.GetActiveSheet(); + var oRange = oWorksheet.GetRange("A9").Row; + oWorksheet.GetRange("A2").SetValue(oRange.toString()); builder.SaveFile("xlsx", "GetRow.xlsx"); builder.CloseFile(); diff --git a/js/xlsx/smoke/api_worksheet/get_name.js b/js/xlsx/smoke/api_worksheet/get_name.js index 29f6e7c7b..66f8ec62e 100644 --- a/js/xlsx/smoke/api_worksheet/get_name.js +++ b/js/xlsx/smoke/api_worksheet/get_name.js @@ -1,6 +1,6 @@ builder.CreateFile("xlsx"); -var oWorksheet = Api.GetActiveSheet(); -oWorksheet.SetName("sheet 1"); -oWorksheet.GetRange("A1").Value = oWorksheet.GetName(); -builder.SaveFile("xlsx", "GetCol.xlsx"); + var oWorksheet = Api.GetActiveSheet(); + oWorksheet.SetName("sheet 1"); + oWorksheet.GetRange("A1").Value = oWorksheet.GetName(); +builder.SaveFile("xlsx", "GetName.xlsx"); builder.CloseFile(); diff --git a/spec/xlsx/smoke/api_range_spec.rb b/spec/xlsx/smoke/api_range_spec.rb index 7b9656c4e..0c1e7a2c5 100644 --- a/spec/xlsx/smoke/api_range_spec.rb +++ b/spec/xlsx/smoke/api_range_spec.rb @@ -4,22 +4,22 @@ describe 'ApiRange section tests' do it 'ApiRange | GetCol method' do xlsx = builder.build_and_parse('js/xlsx/smoke/api_range/get_col.js') - expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('3') + expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('4') end it 'ApiRange | Col method' do xlsx = builder.build_and_parse('js/xlsx/smoke/api_range/getter_col.js') - expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('3') + expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('4') end it 'ApiRange | GetRow method' do xlsx = builder.build_and_parse('js/xlsx/smoke/api_range/get_row.js') - expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('8') + expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('9') end it 'ApiRange | Row method' do xlsx = builder.build_and_parse('js/xlsx/smoke/api_range/getter_row.js') - expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('8') + expect(xlsx.worksheets.first.rows[1].cells.first.text).to eq('9') end it 'ApiRange | SetFontName method' do