as part of the process of merging the Outliner code into the normal EditEngine paths.
So instead of keeping a bunch of information "on the side" and then having to merge information
from multiple sources, it all lives where it logically belongs.
Also take the chance to rename the depth/getdepth/setdepth
fields and methods to NumberingDepth, which makes the purpose
more obvious.
Change-Id: I314673ee1b9efa14f178ac34a122995a554cd788
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10551
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 284bbe0af12b96844976f30bb35ade3a327ea76d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210503
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A slide's picture placeholder can hold text the author typed instead of an
image, which PowerPoint displays. Impress dropped that text on import and
wrote nothing at all for such a shape on save. To reproduce, type into a
picture placeholder in PowerPoint, save, open the file and save it again:
the text is gone from the shape, and the shape from the file.
What a placeholder is now lives in the page's presentation object list, and
what represents it follows what it holds: a graphic object for a picture, an
SdrObjKind::OutlineText object while it holds text, the placeholder itself
while it holds nothing. It changes over when a file states such text, when
that text is deleted again and the prompt comes back, and when an image is
put in. Text arriving another way, through the API, is caught by the new
SdrPage::onEmptyPresObjFilled and switched at the next idle, so that route
needs a spinning scheduler; what a save writes is right either way. An object
in text edit is left to that edit, which is where it changes over: the idle
pass walks every page, so it asks each object rather than trusting the one
that asked for the pass - in a shared document another view holds it. That
switch is the model's own and covered by no undo step - it answers for a
document the API changed, not for anything the user did.
What the file says about the shape travels with it both ways, the graphic
items included, so an outline a picture placeholder is clipped to is still
there when a picture arrives. It is not written while the placeholder holds
text: the file says text box, and a text box states no geometry to clip a
picture to.
PPTX writes it as the placeholder it is, with the text it holds. ODF states
the class of what represents it, so the placeholder's own class travels
beside it as coext:placeholder-class, and a reader that ignores the
extension sees an outline placeholder with the text.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I0f3353115e56d63a4158ebaeb5689689499894bb
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9441
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7921401ae48188568e1016db00bd90256d666a6a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210329
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
* Makes the title show as "Slide Properties" instead of "Page
Properties".
* Makes the label for the resize all slides checkbox show as "Resize all
slides" instead of "Resize all pages"
Change-Id: Idda0bdf6ef6215696ae4189549f62c05ef0076c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209996
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
The patch adds a color interpolation in the HSL color model to the
BColor tools and extends the 'Duplicate' dialog to include these new
color interpolations.
This patch also solves bug tdf#173142.
Change-Id: Ie7f15d65f20b6a8d116c2ac03a57540e6be25ae1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209366
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
The unpublished UNO enum
com::sun::star::drawing::framework::AnchorBindingMode
is only used inside sd and not relevant for any other UNO API.
Make it sd-internal, by removing the idl file and instead
defining an sd::framework::AnchorBindingMode enum class
in an sd-internal header.
Change-Id: Ic8b58d5eca0cb4f59f695630d15c2f361d2def4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209358
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The word “outline” in LibreOffice can refer to either the lines of the
shape of something or an overview of something. When the string is quite
short it’s difficult for translators to know which meaning is intended.
There seems to be quite a lot of cases where the translators have got
this wrong. In order to help them this patch adds translator comments to
a bunch of the strings to explain which meaning should be used.
Change-Id: I4b75cc829128633bc9382817fc574d55a09af8a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209037
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
These classes are only used by the presenter console
implementation in sd/source/console/, so move the
classes there as well, which implies moving them
from Library_sd to Library_sdui and no longer having
to have PresenterHelper.hxx in an sd-wide internal
include directory and there is no more need for
PresenterHelper to be SD_DLLPUBLIC.
In other words: Make clear these are implementation
details of the presenter console, and not used
elsewhere.
Change-Id: Ica2a516215344360f647c121b5f0942a67f54ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208744
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
A presentation can reference sound files outside its own package, on a
slide transition, an animation, or a click action.
Linked graphics already come under link management, where the user
allows each external reference on its own.
Bring presentation sounds under the same link management. Each external
sound is registered as a link the user can allow through the link-update
infobar or "Edit, Links".
For the uno api move these sounds around as XSoundReference so their
allowed state can be moved with them. So that changes the property
from a string to an XInterface. Setter still accept a string, getter
returns the new XInterface, there's an acknowledged possibility of
incompatibility despite being technically api-change-passing
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib7deea2f78cf5c5b9958e43adb8e6f46b1b31e80
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6970
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0aa870b7b5a6bda50bab50c7a0a41d28fdf4f6ab)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208430
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Extend sdr::annotation::Annotation and AnnotationData with m_Threaded,
m_Resolved, and m_ParentId so a Draw annotation can carry a reply/resolve
relationship. The three fields are propagated by toData / fromData and
by sd::Annotation::clone; when IsThreaded() is true they are emitted
from Annotation::ToJSON and SdXImpressDocument::getPostIts under the
same keys (threaded, resolved, parentId) that ScModelObj::getPostIts
already uses for Calc.
The fields will be used by the PDF filter (follow-up commits) and left
at their defaults elsewhere; ODP, PPTX and ODF exporters are unchanged
and continue to ignore them. Support for [MS-PPTX] extensions [1] for
comments that introduce state and replies is not in the scope of this
patch series.
[1] https://learn.microsoft.com/en-us/openspecs/office_standards/ms-pptx/161bc2c9-98fc-46b7-852b-ba7ee77e2e54
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I49594e1e4698bfd541f4c5041362a52b675683fd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1454
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit bbde910405829527c92c406a82f75743bc4416c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207199
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
The program creates a 2cm margin
when chosing 'Normal 0.75in' from the page sidebar.
Well 2cm is 0.79in, so fix the wording to reflect reality.
In addition, for Draw, each margin is half of what the value showed.
Be consistent with Writer, and show the value
for only one margin.
make UITest_sw_sidebar \
UITEST_TEST_NAME=tdf133189.tdf133189.test_tdf133189
Change-Id: Ice89d95464cd29e0bcad5af7a74f5db154fe9689
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207051
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
In a dbgutil build (on macOS - but probably does not matter), type a word in a
slide's text box, select it, copy it, move the cursor past it, and paste.
The paste asserts:
assert( IsUpdateLayout() && "Should not be used for Update=FALSE: GetTextHeight" );
The paste merges paragraphs, which reaches
EffectSequenceHelper::disposeTextRange through the ParagraphDeleted callback
(SdPage::onParagraphRemoving). To decide which effect to drop it called
isParagraphTargetTextEmpty(), which reads the shape text through the UNO text
forwarder and so forces a text frame layout recompute
(NbcAdjustTextFrameWidthAndHeight, then GetTextHeight). The paste runs with
the EditEngine layout updates suspended, hence the assert in
ImpEditEngine::GetTextHeight.
Decide the previous paragraph's emptiness in onParagraphRemoving, where the
editing outliner with the live text is at hand, and pass it down to
disposeTextRange. This drops the UNO read and its layout side effect for
every case, animated or not.
Includes a unit test that executes the sequence described at the beginning;
without the fix, it fails with an assert.
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Change-Id: Id6ae3c8a121f036f87fa43ce134541376ff0b179
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3669
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 89a1a74dc95054698c1097b0aea0466ad6a6e092)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206213
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
In commit 93aa742ba3 which is
20 years ago 'cl' did a big change to get to SfxUndoManager
which is a needed abstraction for the formally Svx-based
Undo/Redo stuff.
Unfortunately SdrModel::SetUndoComment was *not* supported
and this was expressed as just doing a
OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" );
in SdrModel::SetUndoComment when SfxUndoManager was used.
But SetUndoComment *is* used in nine cases in
svdraw/svdedtv2.cxx. All of these execute some action and
create Undos for it. All nine Undos were without any Undo
text since then - over 20 years...
I stumbled over that when adding needed Diagram stuff to
UnGroupMarked().
I fix this with this commit. Creating that fix showed me
why 'cl' intentionally did not support that, but just
abandoning functionality is not a good choice.
Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: Idde2fcecc85a9eee39b62d38ed7d71a8cfbd3288
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2486
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 5adf090261d705123074a0fa1c46119b2bf44bf3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206022
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.
By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.
By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)
Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.
Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
...copying slides between documents
Open both presentations bugdocs, right click on the preview of slide 1
in the source document, copy, right click on the preview of the last
slide in the target document, paste, nothing happens in product builds.
In debug builds, we hit an assert due to a non-async dialog:
coolforkit-ns: /home/vmiklos/git/collaboraonline/online/engine/vcl/source/window/dialog.cxx:947: bool Dialog::ImplStartExecute(bool): Assertion `!"A dialog without a notifier: make me async / properly set up"' failed.
Converting the appearing dialog to async is not trivial, because
sd::slidesorter::controller::Clipboard::PasteSlidesFromSystemClipboard()
first calls InsertFileAsPage() (part of that triggers the dialog) and
then later it also calls InsertBookmarkAsObject(), so a number of
callers would need an async conversion. Instead do what other
presentation software (e.g. PowerPoint does): when pasting slides in,
just scale the objects unconditionally.
The test uses the same trick as commit
3db35199e711da81032c40cf525eb9fb3e792851 (Fix Impress textbox background
changing on cross-document paste in engine and online., 2026-05-11) to
trigger a slide sorter paste.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia410f57efbaf0a514ae2fc3fb2a645be76bb799d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3077
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 350d2c9da46659781095361e0ded395102b9619f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205700
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The "SlideSections" UNO property is just a view onto our own
in-memory maSections (the getter calls GetSectionsAsPropertyValues,
the setter calls SetSectionsFromPropertyValues). Calling
setPropertyValue from SaveToDocument was therefore a roundtrip:
maSections -> PropertyValue -> maSections, with no actual
persistence. The data was already in its final place after each
mutation.
Remove SaveToDocument() and all its callers; mutations to
maSections are the final state. Also drop the includes that
were only needed by it: DrawDocShell.hxx, XPropertySet.hpp,
XPropertySetInfo.hpp, XModel.hpp, sal/log.hxx.
Change-Id: I2fda95a52ba067b69f4492b8abaec7e1eb145f7b
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1232
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1618
Tested-by: Pranam Lashkari <lpranam@collabora.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
(cherry picked from commit b43943b73d5b98b180eac2093bc0fe9c1f58192c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205171
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Makes 'Slide' or 'Page' be shown in the Navigator navigation toolbox
button tooltips depending whether the Navigator is being used for
Impress or Draw.
Change-Id: I4301e2661130b9ef2e4312e0b7b395fc3b3edb45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199462
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Tested-by: Jenkins
Seems to be unused ever since its 2008 addition in
commit e48a6ceb3f
Drop the related image from icon themes as well.
Also drop the XHotSpot/YHotspot bitmap property, which is also unused now.
Last place "using" them in code was removed in 2025 with
commit b363e27529
"loplugin:unusedfields"
Change-Id: I44950026390f51aa4c498428041a4422d762af53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198069
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
added .uno:ReshufflePages which when executed will re-order the pages
based on the position of their previews on the canvas page.
Sorting logic:
1. Sort the previews based on their y-center
2. Form a row if the y-centers are within a tolerance limit
3. Sort the row based on their x-center (also considering RTL locale)
4. Repeat for each rows
Signed-off-by: Mohit Marathe <mohit.marathe@collabora.com>
Change-Id: If654e0cc14686aed2ad6cd69f2dc81249924ee2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192940
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196798
Tested-by: Jenkins