27 Commits
Author SHA1 Message Date
Sarper Akdemir 0eea3f11f8 fix spellcheck dialog preventing replacement of "."
There appears to be special logic for replacing words that end
with a dot in the spellcheck dialog. Where the dot at the end is
ignored during replacement.

This special handling is only there for the spelldialog, i.e. it
is not there if you try to do the replacement via the context
menu or via IDocumentRedlineAccess.

e.g. If the text with the error text is only "." and the
replacement is "REPLACEMENT", clicking Correct button on the
dialog ends up with "REPLACEMENT."

Make it so that if the error text is just a dot, do not enforce
having a dot at the end of the replacement. Since it is obvious
the suggested replacement is for the dot.

It feels to me like the whole special handling for dot was
originally dictionary/suggestion error and was worked around in
the wrong place.

Change-Id: I65675ad18e5386f65ee978c0e92952bba29ae3cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184495
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-06-11 12:28:25 +02:00
Sarper Akdemir 47db8dfc39 tdf#166075: sd: notes pane: enable sidebar list format button
support slots FN_NUM_BULLET_ON & FN_NUM_NUMBERING_ON to properly
report back whether or not numbering functionality is available in
notes pane.

Change-Id: I94fd395a328a45db3bc7c394b7473a22edf0c957
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183943
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-04-09 17:58:32 +02:00
Sarper Akdemir 3edd54cd91 tdf#166068: support paste-special slot for notes pane
start handling the paste special slot: supporting at least RICHTEXT,
HTML, HTML_SIMPLE, EDITENGINE_ODF_TEXT_FLAT which should be trivial to
handle for the notes area.

Change-Id: If508e81f81b213d829efef59220196b18252dec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183917
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-04-09 16:53:53 +02:00
Sarper Akdemir 543fea4c36 related tdf#166068: sd: make paste-special html paste into current textedit
fix HTML paste-special option creating a new text object even if
paste-special was used in a text-edit context. insert the text into the
current text edit context instead of creating a seperate object.

this is the current behavior for RTF & Flat XML Format paste options- so
it is was a bug for html paste option.

Change-Id: Ief9a19997a619b9f0b9c7855561de3f00de2df68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183913
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-04-09 14:02:16 +02:00
Sarper Akdemir 8346ab98c1 sd: impress: fix scrollbar not updating on PgUp/PgDown
make scrollbars update when the current slide is switched via
hotkeys.
which eliminates now not needed UpdateScrollBars call at
CurrentSlideManager.

Change-Id: I89db8c45edd14a871e6d9901a156609ad569984c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183854
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-04-09 11:48:16 +02:00
Sarper Akdemir b6a4f372f9 tdf#163426 sd: notes pane: use ctrl+pgup/down for slide navigation
notes pane uses pgup & pgdown for scrolling the text inside
the pane. which blocks regular slide switching hotkeys for
impress.

add a new impress shortcut ctrl+pgup / ctrl+pgdown for going
to the next or previous slide. for consistency sake this
shortcut is not specific to notes pane but works everywhere on
impress.

make notes pane do not consume these keys so the default keys
from accelerator config takes effect.

Change-Id: I2221f90556683d1c00747ea855a7fe3a11d1a2a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183849
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
Tested-by: Jenkins
2025-04-09 11:47:52 +02:00
Sarper Akdemir 7d7ee87f18 tdf#163444 sd: add mnemonic for Notes Pane menu item
Set p as the mnemonic for Notes Pane menu item. AFAICS no
clash-free mnemonic was possible. As a result the mnemonics
for Slide Pane and Notes Pane clash now.

I think it is logical to make these two items clash, since
they are both for toggling panes.

Change-Id: I00ac6f815e0109a3e276eeee7e03beffba7b0946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183777
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-04-07 17:38:59 +02:00
Sarper Akdemir dc468362e4 tdf#94699: freehand drawing tool, ignore extremely offsetted control points
Now with the /org.openoffice.Office.Common/Misc/FreehandThresholdPixels config
option, when using low threshold pixels like 1px it is more apparent that
XPolygon::PointsToBezier will sometimes make the curve shoot off.

Try to counteract by ignoring control points offsetted more then the segment
length.

Better fix would be changing the PointsToBezier algorithm, but this seems to
hold OK for now.

Change-Id: I7ab0a67a33e25874ff55af932b3e087bbaad98fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181841
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-03-31 09:33:50 +02:00
Sarper Akdemir 3a5c9f31b6 tdf#94699: make hardcoded freehandmindist an expert option
Make Freehand Tool minimum pixels between points, a configurable option.
/org.openoffice.Office.Common/Misc/FreehandThresholdPixels

Change-Id: I4f1f56bc16bbf86820418c286a8f9e1a632645ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181840
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2025-03-30 21:41:44 +02:00
Sarper Akdemir c1473de894 sd: keep a non-owning pointer to the OverridingShell
... instead of keeping an owning shared_ptr

To fix the ubsan build error
<https://ci.libreoffice.org/job/lo_ubsan/3385/>

Which appears to be caused from EventMultiplexer::CallListeners
triggering a NotesPanelView to be deleted, and then notifying
that just-deleted NotesPanelView, see
<https://gerrit.libreoffice.org/c/core/+/177686/2#message-857c0180ae3e6572534d3bcd40f32000d434cc3d>

Change-Id: I05e67dfeab093e7549e9b2ec4caf4a95dc743627
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178348
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-12-12 11:52:04 +01:00
Sarper Akdemir ae281b5145 tdf#163948: fix crash when NotesPane is enabled on Tabbed UI
Pane shells (BottomImpressPane, LeftImpressPane etc.) do not implement any slot
handling, so make sure they are not activated on the top of the shellstack.

Another solution for this could have been getting ChildWindowPanes properly
dispose instead of Hide() at BasicPaneFactory::releaseResource, and adapting the
rest of the code which assumes these Panes are recycled.

This is since ConfigurationUpdater::UpdateCore attempts at releasing via
ConfigurationUpdater::CheckPureAnchors and
ConfigurationControllerResourceManager::DeactivateResources calls.

But in the end the ChildWindowPane is hidden on the DeactivateResource call
instead of being diposed, so the "PureAnchor"'s Shell stays at the shellstack.

Change-Id: I52788d350b66ae22875683f57d87326f4a9a77de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177686
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
Tested-by: Jenkins
2024-12-02 15:46:14 +01:00
Sarper Akdemir 4b399dbfc4 tdf#162405: check if there's a matching singing cert only when saving
previously Save as dialog's "Sign with default certificate"
checkbox's senstivity was decided depending on if there was a
matching key.

Doing that forces a dialog pop-up for password protected NSS
databases.

Now if there's a value in
"/org.openoffice.UserProfile/Data/signingkey", the checkbox
is sensitive.

Matching key is checked during save, and reported if it isn't
found & signing failed.

Change-Id: Ia714b70ce6456752200088cc5382ab6374af9587
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173129
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
Tested-by: Jenkins
2024-09-12 16:42:20 +02:00
Sarper Akdemir 9786f8ea59 tdf#159040 tdf#162206: better the user key selection and test sign with default
fix GPG CertificateImpl::getSHA1Thumbprint not returning a
sequence of bytes as the thumbprint. (that is what the
documented API states, and what all of the code assumed.)

now /org.openoffice.UserProfile/Data/signingkey and
encryptionkey stores the key's SHA1Thumbprint for better
identification of keys. Previously on the key name was being
used.

fix annoying NSS Certificate Database password prompt
appearing on Tools->Options if the certificate database is
password protected.

improve Tools->Options->UserData user key selection and
display of information.

add a ui test for "Sign with default certificate"
interaction in the save dialog.

Change-Id: I1036856003f58f494838e0f81ca0fe18e821f528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171395
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-08-05 13:15:31 +02:00
Sarper Akdemir 426c641976 tdf#159040: add sign with default certificate to save dialog
Include X.509 certificates under Tools->Options->UserData
among the keys for signing.

Add a new checkbox to Save file dialog, to sign with that
selected key easily.

The checkbox is disabled if there's no matching key found.

Change-Id: I9fc16790c479819cd1f35bcad040d0ebc7c4bdef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170619
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-24 07:08:46 +02:00
Sarper Akdemir 2648907f51 make pop-up on Encrypt With GPG Key modal
Not setting any parent window for XDocumentDigitalSignatures
causes the key selection window to be non-modal, letting the
user keep editing the document without completing the
encryption interaction.

Change-Id: Ic7e66cb43606355beaffc720b7c23cdf4f81d934
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170630
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-19 17:11:26 +02:00
Sarper Akdemir b2aa4319f9 tdf#33603: make notes pane searchable
Flattens DocumentIteratorImpl, getting rid of the
intermediary ViewIteratorImpl.

Now the DocumentIteratorImpl, iterates in the following
pattern:
1-) For all slides, visit the NormalView and
    the NotesView before advancing to next slide.
2-) Master Pages
3-) Handouts

Now when a search result is found in the NotesView that is
displayed on the NotesPane instead of the NotesView.

Change-Id: I8133c6a74861e783ab1a23f51ac5faf362a0f512
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169659
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-03 08:21:24 +02:00
Sarper Akdemir 5e14349232 tdf#33603: fix notespane (side/tool)bar interactions
Introduces OverridingShells that when set, makes the view
act like the MainViewShell.

The main use case is having more then one ViewShell in a
single window, where context (toolbars, sidebars etc.) can
jump in between different ViewShells.

Uses OverridingShells to enable NotesPane to react
ToolBarShells. Accessing the functionality of ToolBarShells
without the previous hacks with slot forwarding.

Change-Id: Icc9721d7f54097025bc9dc7ef7069aed856e6d96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169658
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-06-28 14:25:36 +02:00
Sarper Akdemir a7d1a6f313 languagetool show cURL errors with the interaction handler
Only shows the error once for a given checkerURL.

Change-Id: I1873dc09584df33162c93d9d133b12eb8dfede04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169518
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-06-28 14:24:22 +02:00
Sarper Akdemir 2ad7d5cfb0 make additionsdialog show connection errors
use non-scoped interaction handler instead of the scoped
SimpleFileAccessInteraction so that errors will be handled
with correct pop-up dialogs.

Also throw the correct type of DAVException for
USC_CONNECT_FAILED in Content::Open

Change-Id: If2031dfa2796f91fad6866bc9608194c92658b96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169519
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-06-28 12:06:25 +02:00
Sarper Akdemir 2beaa3be38 remove ability to trust not validated macro signatures in high security
Giving the user the option to determine if they should trust an
invalid signature in HIGH macro security doesn't make sense.
CommonName of the signature is the most prominent feature presented
and the CommonName of a certificate can be easily forged for an
invalid signature, tricking the user into accepting an invalid
signature.

in the HIGH macro security setting only show the pop-up to
enable/disable signed macro if the certificate signature can be
validated.

Additionally present a ViewSignatures button in the Macro Disabled
infobar, so that the user can inspect what are the invalid signatures
and why (wihtout the ability of enabling macros).

Change-Id: Ia766fb701660160ee5dc9f6e077f4012a44ce721
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168667
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-06-12 10:06:04 +02:00
Sarper Akdemir a50b13f357 related tdf#33603: update current page on SlideSorter view
Make SlideSorterView update the current page properly when it is the
MainViewShell.

Also fixes Notes Pane not properly updating on SlideSorter
view mode.

Change-Id: If4fed4e84951cb4a1707874b288ac46e6d5c26da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168022
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-05-24 18:03:28 +02:00
Sarper Akdemir 8fc4eb1149 related tdf#33603: sd: outlineview: update current page on moving cursor
The "early rejection test" removed here is a historical
artifact when UpdateForKeyPress was created.

in the current state it checked if
pOutlineViewShell->GetActualPage() was different from
itself.

In the OutlineViewShell::UpdatePreview, there's an
additional check if we have actually moved to a new page, so
we can just safely remove this.

Also fixes Notes Pane not properly updating on Outline View Mode

Change-Id: Ic9de2e7302e76260809f90360533f0bfe6e05d2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168017
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
Tested-by: Jenkins
2024-05-24 15:18:29 +02:00
Sarper Akdemir dc208a0de0 tdf#33603: sd: notes pane: properly handle movement keys
Makes it so that notes pane handles some previously
incorrectly handled keys itself. e.g. PageUp & PageDown

Change-Id: I19f73fa2782900a752889544dcc79fc180ee52d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168008
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
Tested-by: Jenkins
2024-05-24 15:18:11 +02:00
Sarper Akdemir 51436ecfd3 tdf#33603: sd: notes pane: force proper flush on page change
After clearing the notes pane outliner and filling with then
new content, if the new content didn't overfill the
previous' area there was a residue from the last content
visible.

Make sure it is flushed by triggering onResize() on page
change.

Which also fixes the notespane sometimes keeping the
scrollbar & scrollarea from the previous content.

Change-Id: Ibbcb0f4f316bd283e5e65bb2ebd9cf17a3b38c0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167489
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-05-16 15:02:03 +02:00
Sarper Akdemir 9d075157cc tdf#33603: sd: make state of notes pane persist across runs
Introduces new NotesPaneModule which manages the visibility
of NotesPane across modes and different runs.

Also introduces new three config values under
Office/Impress/MuliPaneGUI/NotesPane/Visible ImpressView,
OutlineView and NotesView.

Similar to what was there for SlideSorterBar.

Change-Id: Id540c508e81878e5a8e1aebd6544839e70b813c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167348
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-05-16 15:01:55 +02:00
Sarper Akdemir 06c4dfc743 tdf#33603: do not block SID_SAVEDOC slots on NotesPanelViewShell
Change-Id: Icc7320b0960f0d73027359b7525a37b44bdd7ee7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167365
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper@libreoffice.org>
2024-05-10 10:03:42 +02:00
Sarper Akdemir 423d240dc6 sd: properly read values of optional config items for SlideSorterBar
Guessing this has regressed with
9fc28d7ef5

Read the values from std::optional<bool> properly.

The default values are taken from the configuration
officecfg/registry/data/org/openoffice/Office/Impress.xcu

Change-Id: I93d5537a9e06dc6985a2ec375353d9869b92e08c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167353
Reviewed-by: Sarper Akdemir <sarper@libreoffice.org>
Tested-by: Jenkins
2024-05-10 10:02:26 +02:00