57 Commits
Author SHA1 Message Date
Sarper Akdemir dfb412699b tdf#38164: sd: allow panning across pages when zoomed in
Change-Id: I513b2b8cbdc91733e551da71a1e6782fecc981a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166542
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper@libreoffice.org>
2024-04-24 11:28:00 +02:00
Sarper Akdemir 20e2b922da related tdf#33603: sd: do not assume there's always a viewshell
Change-Id: I171639150a84372e7e25b5246d4882c467edd58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166271
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-04-20 13:17:05 +02:00
Sarper Akdemir efef507cfd tdf#33603: make the notes pane handle placeholder text on focus
Change-Id: Id2bca2b8a8bafa9da44a5f97a8e763b512078ef7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166152
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-04-18 13:48:28 +02:00
Sarper Akdemir fd7afc0a66 related tdf#33603: sd: fix notespanel crash on drag and drop
Change-Id: I067fd3f3eccd8e0fa0d13795f660fe43410b0aa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165809
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-04-11 11:02:24 +02:00
Sarper Akdemir 7a495eb899 related tdf#33603: sd: force invalidate notespanel
This is likely not the correct thing to do here, but is a working
solution that fixes the view lagging behind the resize for now.

Change-Id: I662e59cfd0f1259eeb10a49b6e9c5fd616afa7a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165808
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-04-11 11:02:18 +02:00
Sarper Akdemir c3bc5c09e0 related tdf#33603: fix notespanel missing outliner on mode change
When MainViewShell changed editing mode, two EventMultipexerEvents
arrive in succession - if while processing the first one links are
reset, second one was ignored.

Do not remove EventMultiplexer listener on FillOutliner()

Change-Id: I9c41c823ca74574238d1199ed38f92d9c75a113e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165807
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-04-11 11:02:09 +02:00
Sarper Akdemir 2919194762 tdf#33603: sd: rework notes panel
To be able to support various dispatch commands, sidebar, proper
user configuration, and more - reworked the previous notes panel
implementation as a sd::View/sd::ViewShell pair that plays nice
with Impress framework.

To be able to support TextObjectBar(Shell) functionality, without
having TextObjectBar as a SubShell (In the current sd::framework
implementation AFAICS, SubShells are only possible for the
MainViewShell - this doesn't work for notes panel which is never
used as the MainViewShell.).

A workaround is implemented where NotesPanel inherits dispatching
slots from TextObjectBar, and for these inherited slots forwards
the calls to TextObjectBar's implementation.

This workaround could be removed if/when, SubShell support
outside of MainViewShell is implemented.

Known issues/TODO:
- Drag & Drop crashes / doesn't work.

- Some notes placeholder syncing problems on page change, edit mode
  change.

- A rendering issue related to resizing when ArrangeGUIElements
  isn't called on resize.

Change-Id: I588a4854fbedf6556e001fee1693b32410cbc23f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165770
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-04-11 11:02:01 +02:00
Sarper Akdemir 6c25216e46 tdf#159931: pptx export: export each used slide layout for a master
attempts to fix the slideLayout reference related regression
from Idb6b88ebe87a83818d8eb27a1fa087652a002c0c.

To correctly export the all used slideLayout instances for a
given master, iterate through sdr::PageUsers of that master
and figure out all used layouts.

Change-Id: I0f58befac1ba4d5ec01aeedbb5f611c83683dcf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164468
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-03-07 15:07:27 +01:00
Sarper Akdemir 10e12d0e63 tdf#157518: add uitest for password policy
Change-Id: If246779c944fe250c0070094450545d688712ea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164390
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-03-07 12:30:43 +01:00
Sarper Akdemir 2873a4c12d tdf#158375: add tests for DisableActiveContent
add two tests, one for EmbeddedObjects and one for DDE links.

Change-Id: Ia5bfd06361eb3850df538829abcd1a7cbea2b3ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164369
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-03-07 12:30:31 +01:00
Sarper Akdemir a321084efe do not assume there are no extra seperators at the end for dde links
Change-Id: Idee81b9a8a38aed2375092d2394010063c131fe2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164368
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-03-07 12:30:23 +01:00
Sarper Akdemir cb685f603e tdf#158375: make it possible to hot disable embedded objects
Do not require a reload of the current document for the
embedded objects to be disabled.

Also make sure the existing active embedded objects are
disabled when DisableActiveContent is enabled via options
dialog.

Change-Id: I5a8f302af0cac64575c3e5ec6dbe71ec50a15442
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164367
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-03-07 12:30:15 +01:00
Sarper Akdemir 75da0c3c57 related tdf#33603: do not register NotesChildWindow for Draw
Draw doesn't need the notes panel introduced in
c4c1ca58bb, so don't register
that for it's shell (GraphicViewShell).

Change-Id: I062a54e806058f352721b89d7cffff10cece8612
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163775
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-27 13:34:26 +01:00
Sarper Akdemir c4c1ca58bb tdf#33603: sd: add notes panel for normal view
Change-Id: Ibc6e8a3f126c443453c5ecab52ba988a4f4f56e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159288
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-22 09:47:34 +01:00
Sarper Akdemir 3a20c691ab tdf#138792: PDF export: export metadata dc:date
Dublin Core attribute dc:date wasn't exported so far in the
current implementation. Looking at the information pointed
by http://purl.org/dc/elements/1.1/date, dc:date is a
vaguely defined field.

Now creation date is exported there, as I've came across
the note of "Typically, Date will be associated with the
creation or availability of the resource" in the resource
linked below.
https://www.dublincore.org/specifications/dublin-core/dcmi-terms/2005-06-13/#:~:text=Typically%2C%20Date%20will%20be%20associated%20with%20the%20creation%20or%20availability%20of%20the%20resource

Change-Id: I0b5f37058f64e3d6d08cb46045a27ccde54ee434
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162404
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-01-23 13:45:27 +01:00
Sarper Akdemir 84055d875e tdf#156830: fix faulty transformation order in cairo canvas for patterns
Change-Id: Ib58e845c23dd14bbc3b96e5549a722b650d593a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162069
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-01-15 09:21:05 +01:00
Sarper Akdemir a2ccc25ccb tdf#158375: add UI option to disable active content
Adds a checkbox to disable active contents and OLE Automation at
Options - LibreOffice - Security - Security Options and Warnings

Change-Id: Idfac86e31c97f186eb6b6b2a7a7236b84aedbe83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161808
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-01-09 02:21:02 +01:00
Sarper Akdemir 8f4ff4c601 tdf#158375: add expert option DisableOLEAutomation
Add a disable option for OLE Automation interface that is used
only on Windows.

Change-Id: I86f212977bb604fbae6ac2603bee037b32b5036c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161035
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-01-09 00:50:10 +01:00
Sarper Akdemir 5372538648 tdf#158375: add expert option DisablePythonRuntime
When DisablePythonRuntime is set, anything that utilizes pyuno
bindings won't work (e.g. python macros and extensions).

Change-Id: Id42d01647eebee42b120b399470a1f944e4ba00f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160968
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-01-09 00:48:18 +01:00
Sarper Akdemir 09b13f3f85 tdf#158375: adapt UI when DDE is disabled via DisableActiveContent
When DisableActiveContent is set, provide now non-functional areas
meaningful error messages / popup dialogs.

Change-Id: I34bffee10fb0ba5c0194193f3d3d81b93d7dbd26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160923
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2023-12-21 07:49:16 +01:00
Sarper Akdemir 9157d8de8d tdf#158375: disable DDE when DisableActiveContent is set
Change-Id: I167f6ea5d740b5a53cd02a9b865e65ff980a8877
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160922
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2023-12-20 20:15:29 +01:00
Sarper Akdemir 7bb50fd239 tdf#158375: adapt UI when embedded content is disabled via option
When DisableActiveContent is set, embedded active content is
disabled (e.g. OLE). Therefore the existing ui insertion bits don't
function either. Disable them with a warning pop-up hinting "Active
content is disabled."

Change-Id: I14984684f22df6aff81af79d5a15589b5cae75fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161055
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-20 20:15:18 +01:00
Sarper Akdemir 75df80e34e tdf#158375: further disable embedded objects
there was the possibility of constructing an OOoEmbeddedObjectFactory
or OleEmbeddedObjectFactory directly instead of
UNOEmbeddedObjectCreator.

So disable all createInstance calls for them too. Securing there won't
be active embedded objects.

Change-Id: Ib47ad920d4951790c12d1a8587505cab2f1e126d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160921
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-20 20:15:02 +01:00
Sarper Akdemir 9bc8918cf0 add explainer for the reasoning of fMaxPassStrengthEntropyBits
also fixes the typo in the fMaxPassStrengthEntropyBits variable name.

Change-Id: I7c9cfcea7253a3e07428c83008b0c072033f33c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160425
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-12-10 10:13:31 +01:00
Sarper Akdemir 8d3ac3968e tdf#158375: add expert option to disable active content
adds new expert option DisableActiveContent

Right now only disables active embedded content / OLE.

If OLE content is being imported via
UNOEmbeddedObjectCreator::createInstanceInitFromEntry with the
expert option DisableActiveContent set, the imported OLE object is
now forced to be ODummyEmbeddedObject.

ODummyEmbeddedObject doesn't implement any other state then
embed::EmbedStates::LOADED (i.e. doesn't implement RUNNING,
ACTIVE etc.) which makes it possible to prevent the imported OLE
object becoming active.

The functions that now throw lang::NoSuchElementException are
usually called on new creation of embedded content via UI. But
since the call sites expect the possibility of embedded content
failing to initialize, that is handled by showing a popup stating
some form of `unable to insert`.

A follow-up improvement of disabling insertion of OLE content via
dialogs could be implemented.

Change-Id: Ib558a2a129b491798f5036a7bb269116545be75d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160402
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-12-07 13:07:17 +01:00
Sarper Akdemir ed72c6fbfa tdf#157518: enforce password policy on sfx2/ui/password.ui
Change-Id: I115b5b05ed82f2f900bcd70ec4f52c7f749544e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159443
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15 23:05:49 +01:00
Sarper Akdemir fed7b3068d tdf#157518: enforce password policy on setmasterpassworddlg
Change-Id: I7e7adde8f0d55808d16dc9247954a7645a1d3601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159384
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15 22:02:16 +01:00
Sarper Akdemir 861ebce9ca tdf#157518: add password strength bar to protectsheetdlg.ui
Change-Id: Iedd6793446c2c339cc17d32a28c6b195dfb250e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159372
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15 19:48:49 +01:00
Sarper Akdemir e8fc5d7fca tdf#157518: add password strength bar to sfx2/ui/password.ui
Change-Id: I181b71c6072a61651b33835f76e8deebb5f8d58a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159371
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15 19:48:44 +01:00
Sarper Akdemir cdcff8c341 tdf#157518: add password strength meter to setmasterpassworddlg
Moves PasswordStrength bits that provide utility functions from cui to svl,
merging them with PasswordHelper there.

Adds password strength bar for the set master password dialog.
(accessible via Tools -> Options -> LibreOffice -> Security -> Passwords for Web
Connections)

Change-Id: I8dc1090a041f8388c2e139beb1d0d9a0beb8acb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159370
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15 19:48:38 +01:00
Sarper Akdemir dab20fa2f6 specify the reason for listing zxcvbn-c among build tools
Change-Id: I814cebc6e8ca4815c055ed6f524bfebf08611ccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159017
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-07 09:06:33 +01:00
Sarper Akdemir 806656ce4b tdf#157518: vcl: add native macOS rendering support for LevelBar control
Uses NSLevelIndicator to render LevelBar control on macOS.
Closely follows the existing implementation for ControlType::Progress

Change-Id: Ibd38e172b8b6297e6322cfe9d5a1b0a6ef0f0656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158504
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-06 09:04:01 +01:00
Sarper Akdemir b1e24664de tdf#157518: add password policy and strength meter to save with password dialog
Introduces new configuration options PasswordPolicy and
PasswordPolicyErrorMessage.

PasswordPolicy takes a regular expression. When set, it only
accepts passwords that match that regular expression.

PasswordPolicyErrorMessage is the label displayed when the
password does not meet the PasswordPolicy.
In the ideal case, it should contain an explainer of the
PasswordPolicy, so the user is aware of the requirements.

Save with password dialog had maximum password length enforcing
bits depending on the requirements of the saved file format.
These are still applicable in combination with the password
policy.

Also introduces a visual password meter under the password
entries. If the password policy isn't satisfied the password
strength meter is capped at 70%.

The entropy bits to password quality is taken as a linear range.
Where the range of [0, 112] entropy bits is mapped to percentage
[0, 100]. Entropy bits ≥ 112 are mapped to 100% since, according
to KeePass' info page, ≥ 112 entropy bits correspond to a strong
password: <https://keepass.info/help/kb/pw_quality_est.html>

Change-Id: I2e70adacf271916661219f702dfc217292a1b59f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158453
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-06 09:03:47 +01:00
Sarper Akdemir df79eedf69 tdf#157518: vcl: Introduce vcl control LevelBar
Introduces LevelBar that shares implementation with
Progress(Bar).

LevelBar is to be as a level indicator, e.g. password strength
level. Currently with native backends for gtk and Windows.

Currently, except on gtk - the colors of the bar at different
levels are hardcoded and not dependent on any kind of themeing.

On Windows it follows the styling of progress bar of type "Meter"
according to the uxguide:
https://learn.microsoft.com/en-us/windows/win32/uxguide/progress-bars#meters

Change-Id: Id772cda23615e9582463bf589e4674fd4588c864
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157826
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-10-30 08:17:18 +01:00
Sarper Akdemir 3d5cafbe17 tdf#157518: external: bundle zxcvbn-c
Integrates zxcvbn-c as a static library.

zxcvbn-c is C/C++ implementation of
https://dropbox.tech/security/zxcvbn-realistic-password-strength-estimation.

This is the first step for introducing a password strength
meter. Some example projects that utilize zxcvbn-c are
KeepassXC, monero-gui.

ExternalProject_zxcvbn-c takes care of the dictionary node
generation bits resulting in the dict-src.h

Then StaticLibrary_zxcvbn-c depends on
ExternalProject_zxcvbn-c and uses the generated bits and the
zxcvbn-c source to compile the library.

It should be possible to get rid of dictionary node
generation bit with a patch that includes a constant
dict-src.h that's what monero-gui does for example. But this
might also obfuscate what dict-src.h is.

Right now the dictionary that is included with zxcvbn-c only
targets English, so that might be something to improve upon.

Change-Id: Ic2b0a558cff341114d69fbdc257979a28bf5c865
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157565
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-10-30 08:17:05 +01:00
Sarper Akdemir 676e0527d2 use Liberation Sans instead of Calibri in the test for tdf#144092
based on Stephan Bergmann's point on:
<https://gerrit.libreoffice.org/c/core/+/138652/comment/bb5fc1a4_75e060c9/>

the font used in the test file was Calibri, which likely was
being replaced with the best approximation on a given system.
Changed that to Liberation Sans which is a font that is bundled
with LibreOffice to improve the test's robustness.

Change-Id: I7ff75baeb9259dea244913ca9d5025948291f1e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158234
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2023-10-21 22:58:39 +02:00
Sarper Akdemir da38a44b28 WASM: Embind: get rid of redundant EMSCRIPTEN conditional
As suggested by Stephan Bergmann in
https://gerrit.libreoffice.org/c/core/+/156273/comments/4087f8b8_8ab9a1bc

It appears whole thing was redundant since the template specialization of
emscripten::internal::raw_destructor in
codemaker/source/cppumaker/cpputype.cxx:1228.

Likely this bit causes memory leaks when the API is used and it is a
temporary workaround.

Change-Id: Ifb015754f16ddff1065b3285268acf8a339f975b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157234
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-26 08:51:50 +02:00
Sarper Akdemir 841f898574 JavaScript uno bindings for WASM with Embind - first cut
A rough implementation of uno bindings for LOWA using embind.

Adds new parameter '-W' to cppumaker to generate _embind.cxx
files alongside .hdl & .hpp.

For usage examples see static/README.wasm.md

Change-Id: Iee5d05e37bfba8e101c08212b15c05f7f2fa6c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156273
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-18 19:59:57 +02:00
Sarper Akdemir 971425f9b7 fix emscripten build
Change-Id: I15df992e410f741a22d1f140b85e57a97195a5f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157020
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-18 19:56:50 +02:00
Sarper Akdemir 43df1237a0 remove repeated idl file in gb_UnoApi_add_idl_files call
XConditionEntry was repeated twice on line 3498 and 3495 of
offapi/UnoApi_offapi.mk

Removed the first one.

Change-Id: I7dd7db3c527a2a6825363ba4fb24eb266f870f53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156857
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-12 23:32:07 +02:00
Sarper Akdemir b0e8ce9967 tdf#156649: oox: correct import alphaModFix for custom shapes
alphaModFix should be imported into PROP_FillTransparency
for custom shapes.

Change-Id: I19621e424a64b097d5e6881877d60de253be636d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156660
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-08 08:58:02 +02:00
Sarper Akdemir 300dc54b04 related tdf#150557: fix unified transparence initialization with alpha
In 9831916428, shadow alpha
was passed in to UnifiedTransparencePrimitive2D instead of
shadow transparence mistakenly.

Fix that and pass shadow transparence instead.

Change-Id: Idabedade5d753961648683869cb077de0e4523eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156573
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-05 22:05:16 +02:00
Sarper Akdemir 9831916428 tdf#150557: svx: don't factor in transparence twice for cell shadows
multiplying child transparence with shadow alpha to get the
correct shadow alpha has been incorrect maybe since commits:
7eb4f92ed90e13ce5cbf7286fae623770e71324c,
e735ad1c57

In ShadowPrimitive2D::create2DDecomposition the
shadow-casting primitive's alpha(mask) itself is already
being taken into account.

Therefore getting cell shadow alpha by multiplying child
transparence with shadow alpha, has the effect of child
transparence being applied twice for the table cell.

Change-Id: I78f9bbfcb0694a86eabc061330677784e887b5dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156528
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-05 13:21:13 +02:00
Sarper Akdemir b273a0c152 tdf#138792: PDF export: export metadata dc:format
Export application/pdf MIMEType in dc:format

Change-Id: I7cb658c869898df3a9436937329b4082843338bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156507
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04 20:54:25 +02:00
Sarper Akdemir 0deea02b1d tdf#138792: PDF export: add batch of dublin core attributes
Adds support for exporting, editing in the UI and storage in
ODF for the dublin core attributes listed below.

Contributor (http://purl.org/dc/elements/1.1/contributor)
Coverage (http://purl.org/dc/elements/1.1/coverage)
Identifier (http://purl.org/dc/elements/1.1/identifier)
Publisher (http://purl.org/dc/elements/1.1/publisher)
Relation (http://purl.org/dc/elements/1.1/relation)
Rights (http://purl.org/dc/elements/1.1/rights)
Source (http://purl.org/dc/elements/1.1/source)
Type (http://purl.org/dc/elements/1.1/type)

Introduces XDocumentProperties2 to extend XDocumentProperties interface.

Change-Id: Ie2e0b1fbbbd00b66aef477ba1bf4e4f61c03a3b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156330
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04 20:54:19 +02:00
Sarper Akdemir a45f72b812 tdf#138792: PDF export: export metadata pdf:PDFVersion
Adds export of pdf:PDFVersion metadata.

Change-Id: Ic4c3eec3672839d0d125b64dfca6149912cd2458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156329
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04 20:53:40 +02:00
Sarper Akdemir 7803c57493 tdf#138792: PDF export: export metadata xmp:ModifyDate, xmp:MetadataDate
Export metadata xmp:ModifyDate & xmp:MetadataDate - populate
both with the same information as CreateDate.

Change-Id: I391a72cbe4e7d1ebba5c04c402a68534bbeb4743
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156328
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04 20:53:27 +02:00
Sarper Akdemir 07ac61f2c6 tdf#138792: PDF export: fix date of xmp:CreateDate
for pdf export xmp:CreateDate should be the modification
date instead of the creation date.

Change-Id: I2a86f30cb528cb2bd5e0f9e7c9a8a8b8d2993f50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156327
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04 20:53:17 +02:00
Sarper Akdemir 5eea6974d9 tdf#103706: tdf#142857: sd: context aware paste for clone format
Introduces selection aware pasting for Impress/Draw's Clone
Format where paragraph properties are applied when the selection
contains a whole paragraph or there's no selection at all (i.e.
clone format applied with just a left click - without drag).

Change-Id: I37e7197580c2b8da333ada1a60408f40f85d7ef5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155108
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-08-29 11:06:44 +02:00
Sarper Akdemir 7b5327ffcb tdf#103706: tdf#142857: sw: context aware paste for clone format
Introduces selection aware pasting for Writer's Clone Format
where paragraph properties are applied when the selection
contains a whole paragraph or there's no selection at all (i.e.
clone format applied with just a left click - without drag).

Change-Id: I9f3eedb4544bf53dabed4bb659ce2e44313a692a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155107
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-08-29 11:06:37 +02:00
Sarper Akdemir e9bb17369d related tdf#103706: sw: correct format paintbrush attribute reset
Reset all direct formatting before applying **any** attributes.

For instance, before this patch paragraph font colors were lost
on apply.

Change-Id: I62d202713e60e7e3690c67d63989179c3d5dc900
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155106
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-08-29 11:06:27 +02:00
Sarper Akdemir 36aa809fbd tdf#103706: sw: Revert "Format paintbrush default behaviour"
This reverts commit 1574c76ec2.

Reason for revert: The default behavior should copy *all* formatting.

Change-Id: If3ae81d412374433f2d95a04345c651a788de4f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155103
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-08-29 11:06:14 +02:00
Sarper Akdemir 3dc2f4f0d2 related tdf#152992: fix minor logic error in hittestprocessor2d
Fix logic errors I've missed previously on
(2c8c436c4a) where initialization of
aDiscreteHalfLineVector wasn't adapted to new HitTolerancePerAxis in
PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D & PRIMITIVE2D_ID_POLYGONWAVEPRIMITIVE2D.

Change-Id: I5d9f0347e489301d7e4f06f98f4a9c9d1385d6d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154717
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-07-21 18:26:10 +02:00
Sarper Akdemir 2acfc1448f related tdf#152992: rename HitTolerance to HitTolerancePerAxis
Rename ...HitTolerance instances to ...HitTolerancePerAxis as
suggested by Noel on:
https://gerrit.libreoffice.org/c/core/+/154694/2/include/drawinglayer/processor2d/hittestprocessor2d.hxx#45

Change-Id: I9c5b69218a4809f795c9a6324d76b2e2c1b12343
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154716
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-07-21 18:25:59 +02:00
Sarper Akdemir 83f7c6fe5b tdf#50725: sd: add new configuration option DragThresholdPixels
Adds new expert configuration option DragThresholdPixels for
Impress and Draw under Misc/DragThresholdPixels.

Also bumps up the previous hardcoded default
value from 2 to 6.
Assuming this value was set when 640x480 resolution was the
most common resolution, currently scaling the hardcoded
default by 3 makes sense.

(eg. GTK uses 8 pixels as the default)

Change-Id: I35c0eed3ce477685c759f517471ce0bdc8315864
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154379
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-07-21 14:32:16 +02:00
Sarper Akdemir 2c8c436c4a tdf#152992: for Impress/Draw add horizontal hit tolerance for quick text edit
Implements horizontal hit tolerance for quick text edit in Impress & Draw
making it more forgiving. Previously it was required to click exactly on
the glyph to get a direct text cursor.

Refactors hittestprocessor2d so that it now supports pseudo per axis hit
tolerance.
i.e. underlying isInEpsilonRange hit check is still the same utilizing
the larger tolerance of the two per axis tolerance, but the preliminary
check that uses aPolygonRange.grow() and later aPolygonRange.isInside()
now filters hit misses out with respect to the per axis hit tolerance.

Utilizes hittestprocessor2d's new per axis tolerance to introduce hit
tolerance for quick text edit, making it similar to TextEdit mode hit
tolerance which only has horizontal tolerance.

Fixes wrong use of BoundRect hit to determine text frame border hits.
Which previously only made sense for TextFrame borders, and was mostly
useless for shapes with text inside.

Change-Id: I749e63752da05b01270bfcab2632c41879a848ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154640
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-07-21 01:37:18 +02:00
Sarper Akdemir dc5163af16 tdf#90023: vcl: fix tooltip displaying over two monitors on Windows
To determine the WorkArea correctly in ImplSalGetWorkArea,
pass in the mouse pointer as pParentRect.

Similarly to how it has been done on:
vcl/win/window/salframe.cxx:1393

Change-Id: I43123be315c5ea146c118e8e2a582ceaaab0a35e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154442
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-07-17 10:09:04 +02:00