As reported in the bug ticket, the commands SID_ZOOM_IN and SID_ZOOM_OUT are not smooth and increase/decrease zoom at too big steps.
This patch uses basegfx::zoomtools to zoom in and out, making it smoother.
Change-Id: I801fa6123bf0696046e5d45c7a6b309e7cc3312e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146825
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Several parts of SvxLRSpaceItem appear to maintain an invariant of the
3 members nTxtLeft/nLeftMargin/nFirstLineOffset: nLeftMargin is either
equal to nTxtLeft if nFirstLineOffset is positive, otherwise equal to
nTxtLeft + nFirstLineOffset.
But not every part maintains it: there are functions SetLeftValue() and
SetLeft() which simply write into nLeftMargin regardless, and a
constructor that takes 3 separate numbers without any checks.
The constructor calls violate the invariant in 2 ways: nTxtLeft is
simply set to 0 (many cases), and one case in OutlineView::OutlineView()
that sets nTxtLeft to 2000 but the other 2 at 0.
Another odd thing is that the UNO services that expose SvxLRSpaceItem
either expose a property for MID_L_MARGIN or for MID_TXT_LMARGIN but
never both.
It looks like there are 2 distinct usages of SvxLRSpaceItem:
for anything that's applied to paragraphs, all 3 members are used;
for anything else, nTxtLeft is unused.
Try to simplify this by removing the nTxtLeft member, instead
GetTextLeft() simply calculates it.
Also assert in SetLeftValue()/SetLeft() that nFirstLineOffset is 0.
Change-Id: Ida900c6ff04ef78e92e8914beda1cc731a695b06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146643
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(a) It is not obvious what DeviceFormat::DEFAULT means
(b) There are two parameters (each with two states), but only really 2
possible overall states
So
(1) use more useful names
(2) combine the two parameters into one enum
Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
if its a high contrast mode with white text on black background. Reuse
isOutputToWindow to distinguish between the case we are outputting to
screen but not using a vcl::Window (and want to use the appropiate color
for autocolor) vs the cases we are printing or exporting to pdf and not
using a vcl::Window where the color should be black.
Change-Id: Ib688892a6315fe88ba585613539088611d3995ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145234
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
MapMode ctor taking origin and scales sets mbSimple to false, so
avoid calling it when these are the defaults.
Some calculations become unneeded when the fraction is (1, 1).
Change-Id: I19a98ad2cac0a66b9bd7b72620180addb3f7fec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146375
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Refactor the existing places and tests in Impress code (sd) to
use it instead.
Also keep the old property of construction and view of the theme
with a sequence of property values, but under the new property
named "ThemeUnoRepresentation". This is needed by the UI tests
currently.
Change-Id: I484567f4a603f1a5e2e03955fdd2b63132dcc66e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146225
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
In SdrPaintView (and subclasses) the mpModel variable is always
the same as the input (reference) model, so there is no need for
that extra variable.
Change the strange and confusing var. name mrSdrModelFromSdrView
(the input reference to SdrModel) to just mrModel and use that in
GetModel(). Change the GetModel() to return a reference instead
of a pointer and reactor the code to accomodate the change.
This gets rid of many nullptr checks for the pointer that the
GetModel() returns and makes the code more simple is some cases.
Change-Id: I18351a417fd82f49262a83de036ec1420a65399c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146373
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This removes the scale fraction on SdrModel - SetScaleFraction and
the m_aObjUnit instance variable, as it is never set to anything
else than 1/1 (and don't see it usefult to set it to anything else
than this).
Change-Id: I990d20f110b3be00e6770b68e39df212f9c576be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146348
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
LibreOffice export all the child nodes of a timenode
to childTnLst. It seems that PowerPoint anticipate there
being fixed starting-time timenodes on childTnLst.
This patch export event-triggered audio time nodes to
subTnLst to make audio playback work. Other node types can
be added in the future once more test cases are found.
Change-Id: Ic96ec50876f568145bdde122d01dec10c1ac7c50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146295
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Refactor "Any NodeContext::getCondition(bool bBegin) const" to
"const Reference<XAnimationNode>& NodeContext::getNodeForCondition()
const", to get rid of the bool arguement of getCondition.
Change-Id: Ic61d2caecaad2d3ada38556346f66aedb258e554
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Also move Theme from svx to model namespace so it is consistent
with other classes in docmodel.
Theme header also includes ThemeSupplementalFont, ThemeFont,
FontScheme classes that are used by the Theme and were also moved
to docmodel. These may be moved to its own file in the future when
they are used in more places.
Change-Id: Ic409bea8e5298adc2b039b529c4f7b01cf64f03e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146221
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Also move ColorSet from svx to model namespace so it is consistent
with other classes in docmodel.
Change-Id: Iacbdbdf5ece4015c628a0e45adf6a732b2d27777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146220
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
It really wants to part of the main sd UI where it can interact
nicely with the existing logic, instead of using awkward UNO
APIs.
Change-Id: I6e0d486275515d48abe3438b88d4f58d4bee58fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
which was introduced in
commit 8c4d7aa42d
Author: Kurt Zenker <kz@openoffice.org>
Date: Thu Apr 3 13:42:43 2008 +0000
INTEGRATION: CWS presenterview (1.1.2); FILE ADDED
but does not appear to have ever been actually used.
Change-Id: Icd33f81cfee246fe72a4b9e584f7a6ca96d6e38b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145907
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
to catch places where we are converting a weak reference to a strong
reference, and then using a pointer to store the result
Change-Id: I69b132907b574e5c6974fadf18bd9658107d3a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145877
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Split text lines in a paragraph, right before polygons are created
for rendering, so eol will brake line in fontwork just like eop.
Change-Id: Ie9e6764f9f91c2e19afd43dc9a212bd18c41c99d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145425
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
The base SvxDrawPage uses WeakAggImplHelper7, so (for better or worse) derives
from XAggregation, but SdGenericDrawPage and its derived classes (SdDrawPage,
SdMasterPage) failed to properly implement the XAggregation protocol.
When fixing this, it became apparent that SdGenericDrawPage::queryInterface had
erroneously delegated to SvxDrawPage::queryInterface rather than to the
intermediary SvxFmDrawPage::queryInterface, so that querying for e.g.
XFormsSupplier had only worked by accident: SdGenericDrawPage::queryInterface
didn't support it, so delegated to SvxDrawPage::queryInterface, which didn't
support it, so delegated to WeakAggImplHelper7::queryInterface, which didn't
support it, so delegated to OWeakAggObject::queryInterface, which (as there was
no delegator set) delegated to the most derived SvxFmDrawPage::queryAggregation,
which supports it.
Change-Id: Ia7154d62e493238738e6d15dea2f01a437a70bff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145763
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Just past the concrete type down through a couple of layers, rather than
using a generic type and then casting
Change-Id: I7ba6c83463f3db7176b72cb7e764d3659706ae78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145638
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
The embedded object became unusably oversized after editing,
because it was not possible to minimize it by the mouse. Now
the object keeps its original size to avoid of the UX problem.
Note: losing the original zoom of the OLE content is still a problem.
Change-Id: I8b7a2f2a84324bf4de2358ecb5fec5c1f7349155
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145454
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>