Skip to content

Commit

Permalink
Merge branch 'master' into feature/get_number_format
Browse files Browse the repository at this point in the history
  • Loading branch information
askonev authored Jul 3, 2023
2 parents 1d020f2 + 7f46c61 commit 739e058
Show file tree
Hide file tree
Showing 17 changed files with 98 additions and 101 deletions.
13 changes: 9 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 12 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ 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)
jwt (2.7.1)
mini_portile2 (2.8.2)
nokogiri (1.15.0)
nokogiri (1.15.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
onlyoffice_pdf_parser (0.5.0)
Expand All @@ -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)
Expand All @@ -33,19 +33,20 @@ 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)
hashery (~> 2.0)
ruby-rc4
ttfunk
pkg-config (1.5.1)
racc (1.6.2)
racc (1.7.1)
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)
Expand All @@ -62,23 +63,23 @@ 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.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)
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)
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)
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/debian-develop/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +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
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
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 $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; \
Expand Down
13 changes: 8 additions & 5 deletions dockerfiles/debian-next-release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
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
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; \
Expand Down
18 changes: 1 addition & 17 deletions js/docx/functional/custom_js/priglashenie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -23,15 +22,13 @@ oTextPr.SetSpacing(0);
oTextPr.SetPosition(0);
oTextPr.SetColor(0x07, 0x3A, 0x77, false);


// default paragraph properties
oParaPr = oDocument.GetDefaultParaPr();
oParaPr.SetSpacingLine(240, "auto");
oParaPr.SetSpacingBefore(0);
oParaPr.SetSpacingAfter(0);
oParaPr.SetJc("left");


// heading 1 style
oHeading1Style = oDocument.CreateStyle("Heading 1 custom", "paragraph");

Expand All @@ -45,7 +42,6 @@ oParaPr.SetSpacingLine(560, "exact");
oParaPr.SetJc("center");
oParaPr.SetSpacingBefore(180);


// heading 2 style
oHeading2Style = oDocument.CreateStyle("Heading 2 custom", "paragraph");

Expand All @@ -59,7 +55,6 @@ oParaPr.SetSpacingLine(280, "exact");
oParaPr.SetJc("center");
oParaPr.SetSpacingBefore(360);


// heading 3 style
oHeading3Style = oDocument.CreateStyle("Heading 3 custom", "paragraph");

Expand All @@ -74,7 +69,6 @@ oParaPr.SetSpacingLine(280, "exact");
oParaPr.SetJc("center");
oParaPr.SetSpacingBefore(0);


// normal style
oNormalStyle = oDocument.CreateStyle("Normal custom", "paragraph");

Expand All @@ -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());
Expand All @@ -106,7 +98,6 @@ oDrawingRect.SetWrappingStyle("square");
oDrawingRect.SetHorPosition("page", 685800);
oDrawingRect.SetVerPosition("page", 800100);


// paragraph_text
// heading 1
oParagraphInner = Api.CreateParagraph();
Expand All @@ -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);
Expand All @@ -153,7 +141,6 @@ oRun.AddText("предоставлять не нужно, удалите это
oParagraphInner.AddElement(oRun);
oDrawingRect.GetDocContent().Push(oParagraphInner);


// italic normal
oParagraphInner = Api.CreateParagraph();
oParagraphInner.SetStyle(oNormalStyle);
Expand All @@ -163,7 +150,6 @@ oRun.SetItalic(true);
oParagraphInner.AddElement(oRun);
oDrawingRect.GetDocContent().Push(oParagraphInner);


// all caps normal
oParagraphInner = Api.CreateParagraph();
oParagraphInner.SetStyle(oNormalStyle);
Expand All @@ -174,14 +160,12 @@ oRun.SetCaps(true);
oParagraphInner.AddElement(oRun);
oDrawingRect.GetDocContent().Push(oParagraphInner);


// KnV coding style: removing 1st element 'empty paragraph'
oDrawingRect.GetDocContent().RemoveElement(0);

oParagraph = Api.CreateParagraph();
oParagraph.AddDrawing(oDrawingRect);
oDocument.Push(oParagraph);


builder.SaveFile("docx", "priglashenie.docx");
builder.CloseFile();
Loading

0 comments on commit 739e058

Please sign in to comment.