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

Api.CreateBlipFill doesn't work in macro or plugin #157

Open
ghost opened this issue Jun 2, 2021 · 4 comments
Open

Api.CreateBlipFill doesn't work in macro or plugin #157

ghost opened this issue Jun 2, 2021 · 4 comments
Labels
confirmed-bug Issues with confirmed bugs

Comments

@ghost
Copy link

ghost commented Jun 2, 2021

Do you want to request a feature or report a bug?

Maybe a bug

What is the current behavior?

CreateBlipFill doesn't work in plugin or macro for slides.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

This kind of macro doesn't work (no effet).

(function()
{
  oPresentation = Api.GetPresentation();
  oSlide = oPresentation.GetSlideByIndex(0);
  oFill = Api.CreateBlipFill("https://api.onlyoffice.com/content/img/docbuilder/examples/icon_DocumentEditors.png", "tile");
  oSlide.SetBackground(oFill);
})();

No more luck with the builder example here in preview mode, but the final document seems good if you generate the document with this link

What is the expected behavior?

Fill the slide background with an image.

Which versions of DesktopEditors, and which OS are affected by this issue? Did this work in previous versions of DesktopEditors?

ONLYOFFICE Desktop Editors version 6.2.0.148
Ubuntu 20.04

@ShockwaveNN ShockwaveNN transferred this issue from ONLYOFFICE/DesktopEditors Jun 3, 2021
@ShockwaveNN
Copy link
Contributor

@askonev Please, take a look

@askonev
Copy link
Member

askonev commented Jun 3, 2021

Hello @1F987. This situation is actually a problem. Created a bug #50707. Thank you for your attention.

@ShockwaveNN ShockwaveNN added the confirmed-bug Issues with confirmed bugs label Jun 3, 2021
@ghost
Copy link
Author

ghost commented Jun 3, 2021

Thanks @ShockwaveNN & @askonev, the same problem seems to be present on the Api.CreatePatternFill function.

(function()
{
  oPresentation = Api.GetPresentation();
  oSlide = oPresentation.GetSlideByIndex(0);
  oFill = Api.CreatePatternFill("dashDnDiag", Api.CreateRGBColor(255, 224, 204), Api.CreateRGBColor(255, 164, 101));
  oSlide.SetBackground(oFill);
})();

No effect in macro/plugin and document builder preview. But if we generate the document, the slide is ok.

@askonev
Copy link
Member

askonev commented Jun 3, 2021

@1F987 This is a problem similar to the bug that has been filed for this issue. The fill value is not set to oSlide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs
Projects
None yet
Development

No branches or pull requests

2 participants