Optimization in Office
Make the pattern creator smarter
Make it possible to create a pattern from the current layer
as well as the current image and don't use deprecated code
We also don't create a pattern on every show event, it's slightly
less convenient but makes opening the pattern editor much faster.