100 Commits
Author SHA1 Message Date
Hossein 3cb281d3d0 tdf#173779 Add command label for tooltips with HELP_DEBUG=1
Previously, when setting HELP_DEBUG=1, the tooltips lacked the label
(description) for the commands in extended tip mode.

The problem was that, if the extended help content was empty, then the
ToolBox::RequestHelp() function added appropriate description. But, with
the help debug mode on, the tooltip was no longer empty. It containted
seperator "-------------" and the UNO command.

This patch adds the description when the extra help content is empty and
solves the issue. The result contains mnemonic characters like ~ which
can be suitable for debugging. These characters are removed with the
call to MnemonicGenerator::EraseAllMnemonicChars in ToolBox::RequestHelp
in a normal LibreOffice session without setting HELP_DEBUG.

Keyboard shortcuts are displayed in normal mode, but not in the extended
tips mode. This issue can be later fixed by adding the keyboard shortcut
to the tooltips when HELP_DEBUG=1 is set.

Change-Id: Iead828ece855fa3e712919ef62353dbca9db1d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211577
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-09-30 09:46:31 +02:00
Hossein ddb95685dd Revert "Remove the Java OfficeBean example from the SDK"
This reverts commit 05ba63c6fc.

Reason for revert: The goal is to re-introduce the example with
AWT/Swing instead of applet in a subsequent patch, while preserving git
history.

Change-Id: I1210eea93149aefb5ad0f57216b2fbdaad9c224f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199755
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-08-16 13:14:31 +02:00
Hossein 191c23dc4e Improve restartdialog.ui by using a single label
Previously, multiple labels were defined for restartdialog.ui, one for
each reason! This patch modifies the ui file, leaves only one label and
sets its text for each reason of restart.

The patch is written in a way to make the changes minimal and keep the
behavior unchanged, and also keep the strings translateable with the
context preserved.

Change-Id: I3168beed6170e3bf8d3f24aa111de07177991bfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209010
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-08-07 08:54:29 +02:00
Hossein 132bd1cb9b Fix build issue with VS 2026 18.7.0
As described in the dev mailing list, LibreOffice build fails at the
configuration stage, starting from VS 2026 version 18.7.0.

LibreOffice build errors with Visual Studio 2026 version 18.7.0
https://lists.freedesktop.org/archives/libreoffice/2026-June/094681.html

The root cause of the issue is that clang-cl.exe is re-located in that
version and configure.ac searches in the old places, and does not find
it. The new patch contains an extra 'x64', or the architecture.

Here, $WIN_BUILD_ARCH is used as the architecture.

Change-Id: Ib3e3f518735df5045241f52a2ce86184e47fc87b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208447
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2026-07-23 08:54:21 +02:00
Hossein 71e1af3358 tdf#165585 Fix SDK lacking cross platform .NET binding files
In the past, LibreOffice cross platform .NET support could correctly
build binding files, but these files were not shipped. This patch fixes
the issue, and ships these files, as described below:

$ ls instdir/sdk/dotnet/
LibreOffice.Bindings.0.1.0.nupkg
nuget.config

$ ls instdir/program/dotnet
net_basetypes.dll
net_bridge.runtimeconfig.json
net_uretypes.dll
net_bridge.dll
net_oootypes.dll

Change-Id: I947aafbf45436855dfdb7ab5f3268f42b8a66511
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208294
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-07-22 16:01:49 +02:00
Hossein 65f1b7351d tdf#169711 Enable headless mode on macOS builds
As now headless mode is possible on macOS, let's enable it in the distro
configs, so that final builds make use of this option.

Change-Id: I5c46775c597bced62a84b3f018d14305f3caa634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200535
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-04-30 13:12:52 +02:00
Hossein 228c03d878 Make odk unoapploader C code build with GCC 15.2
With GCC 15.2, compiler produces this error message:

[LOC] top level modules: odk
odk/source/unoapploader/unx/unoapploader.c: In function ‘createCommandName’:
odk/source/unoapploader/unx/unoapploader.c:285:13: error: assignment discards
‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
  285 |         sep = strrchr( prgname, SEPARATOR );
      |             ^
cc1: all warnings being treated as errors

By defining sep as "const char*" instead of "char*", the problem goes away.

Change-Id: If1d628dba8bb4ec657b916fa61927b250d3039c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202942
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-03-30 17:41:16 +02:00
4d3a291b5d Add Qt6 support for Windows
This patch makes it possible to build LibreOffice with Qt6 VCL plugin on
Windows.

In the configuration stage, it is required to add --enable-qt6 to the
configuration options, and also set the QT6DIR to the place where Qt6 is
installed:

export QT6DIR=/cygdrive/c/qt/6.10.2/msvc2022_64

When building with --enable-headless in addition, Cairo
based rendering is used by default, but the QFont based rendering
can explicitly be enabled by setting environment variable
SAL_VCL_QT_USE_QFONT=1 when starting LibreOffice, as is the case on
Linux.
When using the QFont based rendering, two asserts related
to logic related to alpha/transparency support not fully being implemented
for that rendering path yet are triggered (in QtVirtualDevice::SetSize
and QtGraphicsBackend::getBitmap). They can be commented for
further experiments. That also matches the behavior seens on
Linux.

For a debug build of Qt, the file names of the libraries include
an additional "d" in fron of the ".lib" file extension, e.g. a file
name of "Qt6Widgetsd.lib" instead of just "Qt6Widgets.lib",
so support both variants in configure.

This is partially based on a previous commits from jmux for Qt5 in 2018.
One may see the old patches using:

$ git checkout remotes/origin/feature/qt5-win+mac

A subsequent patch is planned to add Qt6 support for macOS.

Co-authored-by: Jan-Marek Glogowski <glogow@fbihome.de>
Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: I42a3059c738fa95464fa49ae4aab1c9f686fee46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199615
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-03-29 01:08:40 +01:00
Hossein 2a72ad755d tdf#170954 Ship LibreOfficeKit headers / examples on macOS
This reverts commit 20ee295dd11fcad8ba72439e6ad28f61ed740958, such that
LibreOfficeKit headers and examples are usable on macOS again.

After 5d4a689293 and
857a760f31 among other related patches,
LibreOfficeKit became usable on macOS. The build issues are fixed in
d6773eccb3.

Change-Id: Ifaac9c3652bf4b4f53b41997015f00b9083628a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199965
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-02-23 20:49:54 +01:00
Hossein 00dfdd0154 tdf#170269 Use C++20 std::ranges::all_of instead of a loop
Used C++20 std::ranges::all_of() instead of a loop to simplify the code.
Also, it seemed that sort() was not necesary, so I removed that.

Change-Id: I244c862252881683d50cfe9bc140b7b6b5dfa82f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196851
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-01-20 14:44:32 +01:00
Hossein def4e04876 tdf#145759 Use DWMWA_USE_IMMERSIVE_DARK_MODE
Previously, magic number 20 was used for switching to dark mode on
Windows. On the other hand, DWMWA_USE_IMMERSIVE_DARK_MODE is defined for
that purpose since Windows 11 22000. Prior to that, it was an
undocumented constant:

DWMWINDOWATTRIBUTE enumeration (dwmapi.h)
https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute

WinForms Dark title bar on Windows 10
https://stackoverflow.com/a/62811758

More informationa bout dark mode for win32 applications can be found in:

Support Dark and Light themes in Win32 apps
https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/ui/apply-windows-themes

Change-Id: I96169ae87f4f42d6b0092128c527ba0e72f7529e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195910
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-12-22 15:24:17 +01:00
Hossein f25dbabaec Show the link to a single commit instead of complete history in About
Due to the issues discussed in below change, deep links are currently
blocked on git.libreoffice.org:
https://gerrit.libreoffice.org/c/core/+/188429

Therefore, it is not possible to use the link provided in "Help >
About", as it leads to error "Secure Connection Failed". This patch uses
/commit instead of /history to show a single commit instead of complete
history.

Change-Id: Ie52e7e6a52fda3578ab955dcbf8d569a22c0009d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196087
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-12-22 15:09:20 +01:00
Hossein d6773eccb3 Fix cairo / pixman build for headless macOS
The library .dylib file path was not found when building cairo for
macOS. Now it is possible to build cairo for macOS.

Built library files for cario and pixman are adjusted using the tool
install_name_tool, and also solenv/bin/macosx-change-install-names.pl
perl script which also uses install_name_tool indirectly.

From now on, macOS no longer uses the name 'libcairo' for built library
file, and it will use 'libcairo-lo' like the other platforms. This removes
the need for handling macOS differently from the other platforms.

To use headless mode, these options should be added to autogen.input:

--enable-headless
--without-system-fontconfig
--without-system-freetype

Change-Id: I1895ba651a07b1dbd8488fa973ec1d90c24de63b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194931
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-12-05 17:50:24 +01:00
Hossein 8e3b362808 Use new screenshot set for flatpak page
There are 2 sets of screenshots for LibreOffice applications and they
are recently updated. Let's use the first set for flatpak page, as they
are the preferred ones.

Also, a new screenshot for Math is added.

These are the 6 final screenshots:

https://hub.libreoffice.org/screenshots/writer-01.png
https://hub.libreoffice.org/screenshots/calc-01.png
https://hub.libreoffice.org/screenshots/impress-01.png
https://hub.libreoffice.org/screenshots/draw-01.png
https://hub.libreoffice.org/screenshots/base-01.png
https://hub.libreoffice.org/screenshots/math-01.png

They will be used here:

Flathub > LibreOffice
https://flathub.org/en/apps/org.libreoffice.LibreOffice

The second set, which is not currently used are:

https://hub.libreoffice.org/screenshots/writer-02.png
https://hub.libreoffice.org/screenshots/calc-02.png
https://hub.libreoffice.org/screenshots/impress-02.png
https://hub.libreoffice.org/screenshots/draw-02.png
https://hub.libreoffice.org/screenshots/base-02.png
https://hub.libreoffice.org/screenshots/math-02.png

These are re-used from the new test LibreOffice website.

Change-Id: I0bb6719a33e520323c00155c2fa5cc5fc8f96b07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194266
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-11-21 09:08:21 +01:00
Hossein d2def868cb Add VS 2026 support
This patch modifies configure.ac in a way that LibreOffice compiles
with Visual Studio 2026.

The option --with-visual-studio=2026 should be used in the configuration
file autogen.input in order to use VS 2026.

Change-Id: I5bd0b5629264c0cb6ec3846954eded2505f06a4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193934
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-13 21:25:25 +01:00
Hossein 577f902198 Avoid using local variable that hides a class member
rBHelper was a local variable with the same name of a member variable of
the class ODatabaseMetaDataResultSet. With this patch, we avoid this
name duplication.

The above duplication was causing build problem with the latest VS 2026
compiler:

error C2220: the following warning is treated as an error
warning C4458: declaration of 'rBHelper' hides class member

Change-Id: Id70c690c3b09611aefab720aef1f8c8c1dd46829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193965
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-13 21:24:18 +01:00
Hossein ac28bf8af5 tdf#169400 Limit runGraphicsRenderTest() to debug builds
Invoking runGraphicsRenderTest() at first startup, after splash screen
progress bar reaches 100% causes significant hiccup in the application
startup. The user may think the application hanged, and that causes bad
first impression.

This patch limits this startup test to DBG_UTIL builds only.

Change-Id: I2b7ad6f229a1bf6288ba370f5f65591bd47f156a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193847
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2025-11-13 15:19:53 +01:00
Hossein dc71c56c14 Fix hsqldb compiler errors with JDK 25
With JDK 25, I get 10 errors like this:

   [javac] workdir/UnpackedTarball/hsqldb/src/org/hsqldb/jdbc/jdbcParameterMetaData.java:54: error: jdbcParameterMetaData is not abstract and does not override abstract method isWrapperFor(Class<?>) in Wrapper
    [javac] public class jdbcParameterMetaData implements ParameterMetaData {
    [javac]        ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 10 errors
    [javac] 13 warnings

BUILD FAILED
workdir/UnpackedTarball/hsqldb/build/build.xml:353: Compile failed; see the compiler error output for details.

With this patch, code inside //#ifdef JAVA6 /* ... */ //#endif JAVA6
is re-enabled which resolves the build issue.

The issue was happening before with JDK 21. But, at that time patch
541eacf801 was enough to make the build
pass.

Change-Id: I73a8054d4382b8337fadafe579ca8cd24d644c89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182472
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-12 19:40:30 +01:00
Hossein 7a764a792f Fix clang build breakage with multiple clang version installations
On some Linux distros, this command outputs multiple directories:

$($LLVM_CONFIG --version|awk -F. {'print $1'})

Therfore, in this patch, we extract major version first.

Change-Id: I0ed8249880c6d6057c4ada6cd9887d49c690f39a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193447
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-11-05 10:58:32 +01:00
Hossein e46c6e6695 Fix CLANGSYSINCLUDE check to match newer clang versions
In older versions of clang, the path used was using full version, for
example 12.0.1, but now we only use major version, which is 18.

This change is generic and should be working for both cases.

Discussion can be found in the patch to update linux_clang_dbgutil_64 to
clang 18.1.8:
https://gerrit.libreoffice.org/c/lode/+/182317/comments/57f1490c_72bbd109

Change-Id: I67614b9ed88ff73c0a15b13b350c9cb4a79906b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193256
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-03 18:44:57 +01:00
Hossein 5e210c6598 tdf#165608 Use DOTNET variable instead of dotnet command
This is useful on platforms like macOS, or otherwise in case of setting
custom dotnet path.

Change-Id: Id4ab9368b69013e0b89f02e6e5535bd94bf31575
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190783
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-09-11 11:56:52 +02:00
Hossein 9064363550 tdf#165608 Fix .NET test bound to specific version
Previously, .NET test was bound to specific .NET version, net8.0. Now,
it is extracted from 'dotnet --version' command.

The test can be run with:

$ make DotnetTest

Change-Id: I764ff2ebe487c95049e6acdc15738bcb6434e8eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190782
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
2025-09-10 23:52:15 +02:00
Hossein a6b38c4ce7 tdf#165608 Fix .NET examples bound to specific version
Previously, .NET SDK examples were bound specifically to .NET 8 target
version, or "net8.0". Now, the major/minor version of .NET SDK is
extracted from the output of invoking 'dotnet --version' command to
create the project file for .NET SDK examples.

For example:

$ dotnet --version
9.0.123

Then, the target will be 'net9.0', as is expected:

$ echo net$(dotnet --version | cut -d. -f1-2)
net9.0

Change-Id: Ibea3cfa0b9b68394dab6efdf4b5c0c34f7b4e882
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190774
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-09-10 21:25:22 +02:00
Hossein 4fe73837a0 tdf#168139 Avoid assertion failure on X11 with Skia/Vulkan
Using X11 backend (gen), LibreOffice produces assertion failure on a
debug build when running with Skia/Vulkan. That is because of missing
implementation for handling transparency on that platform.

I turned the assert/TODO into a warning to avoid assertion failure.
This is supposed to be only for X11, and is tested on Linux.

Change-Id: Iea7ac732123446843aaa71748c10bc17e305fc8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190291
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-08-28 11:05:25 +02:00
Hossein 6cbadf8bf1 Use o3tl::convert instead of manual conversion
The new code uses the o3tl::convert to do the conversion, as it provides
a mechanism to do the conversion among different units in LibreOffice.

The old code used 35.27777778 as the conversion factor to convert points
to 10 microns.

1 point = 1/72 inch
1 inch  = 25.4 mm = 25400 microns
factor  = 25400/(72*10) ≈ 35.27777778

Please note that for values bigger than or equal 24999964, the result
can have small difference compared to the old result. For this value,
the new conversion gives 881943174, but the old formula gives 881943175
which is slightly inaccurate, off by 1. In this case, the new conversion
using o3tl::convert() is more accurate.

Change-Id: Ifcda6f9ad2f3f4d0f623ca157edbd0b4f44041fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189970
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-08-21 21:28:29 +02:00
Hossein 1a2523aa52 tdf#80662 Fix display of JDK version number / path
Previously, JDK version number and path were displayed as RTL in right
to left mode of LibreOffice, in "Tools > Options > Advanced". The RTL UI
can be activated by setting:

SAL_RTL_ENABLED=1

The fix uses an LRM and PDF Unicode characters around the text:
https://en.wikipedia.org/wiki/Bidirectional_text

This patch also fixes the display of JDK path, which had the same issue
that was visible in the bug doc.

Change-Id: I80b25821defd43355e5b271d0348dd70ef520440
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187813
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-07-14 22:29:05 +02:00
Hossein a72fc05f49 tdf#165780 BASIC IDE code completion without experimental
As code completion is always available in Tools > Options, and it is
there for a long time, it is no longer relevant to make it visible only
when experimental features are enabled.

Change-Id: I4e80daa92b07745c1bca065c8239df283c69b883
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183171
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Jenkins
2025-07-14 22:28:20 +02:00
Hossein 6274a47543 tdf#143305 Remove SID collision in .hrc file
There was some SID collisions in the below file which should have been
avoided:

* include/svx/svxids.hrc

The collision occured over the offset of 450:

 $ git grep -n "SID_SVX_START + 450"
 svxids.hrc:385:#define SID_EDIT_DIAGRAM        ( SID_SVX_START + 450 )
 svxids.hrc:542:#define SID_SB_STARBASEOPTIONS  ( SID_SVX_START + 450 )

 $ git blame -L 542,542 include/svx/svxids.hrc
 cb05db521e (Vladimir Glazounov 2007-04-11 15:30:44 +0000 542)

 $ git blame -L 385,385 include/svx/svxids.hrc
 cfb68712a4 (Armin Le Grand (Allotropia) 2022-03-02 11:52:14 +0100 385)

As described in 1b4997d7a84d1, it is possible to use grep to make sure
no collision is remaining:

 $ git grep -h "SID_SVX_START[ ]*+" *.hrc | grep -Ev '^\s*\/\/' \
     |awk -F\( {'print $2'} | awk -F\) {'print $1'}             \
     |awk '{gsub(/^ +| +$/,"")}1'|sort|uniq -c|grep -v "      1"

If there are any results, it means occurrence of some collision.

Change-Id: I252c582bac7d92e98e56c2834715e1766244aa52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183446
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-03-28 14:52:02 +01:00
Hossein 9299d425f3 Simplify string definition
With Unicode literals, the code is now much simpler. This patch also
corrects the text, which means 1 2 3 in Arabic.

Change-Id: I59a6a3afcddde416f73e74287319750cf4111048
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182826
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2025-03-12 15:37:26 +01:00
Hossein 04b54d560d Prevent vcl app crash without translations
Previously, vcl app with gen UI backend was always crashing when no
translation files where available. This patch fixes that for gen UI
backend.

This crash happens in minvcl example, when changing one of the LibreOffice
ui files to a minimal Glade .ui file that contains the used UI elements.

One can run the minweld example with gen ui backend with:

$ export SAL_USE_VCLPLUGIN=gen
$ ./bin/run minweld

Change-Id: Ia3bf7671577b6b8013cae9b54a5469213bf65601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178750
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
2024-12-25 15:01:25 +01:00
Hossein 1163713bca Improve LOK tilebench README.md for joining test
The previous command was not working, because of the lack of absolute
path and also the wrong path to the test document. This should be fixed
now.

Change-Id: I2230041e17e4b6b33cfd44e5f15a5fce086a5f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176764
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2024-11-19 15:18:10 +01:00
Hossein 2fbb7e0472 Cleanup notebookbar.ui for draw
Fix duplicate IDs found by glade-previewer

Change-Id: I5331d5ebdc226bb370d2fd6d6f00c2315952f5ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176625
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
2024-11-15 15:37:36 +01:00
Hossein dbce105be9 Cleanup notebookbar.ui for sc
While trying to load notebookbar.ui for sc I found that there are issues
with the .ui file itself:

* Duplicate IDs, created in 608e1452c5
* Typo in the attribute names, created with the manual edits in
    04ed7cbe53

This patch fixes above problems.

Now, one can preview the notebookbar.ui for sc with:

$ export GLADE_CATALOG_SEARCH_PATH=$PWD/instdir/share/glade
$ glade-previewer -f sc/uiconfig/scalc/ui/notebookbar.ui

Change-Id: I83be23f4a2a24a04f4fa8b627c138bc42bdf6916
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176619
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2024-11-15 11:26:11 +01:00
Hossein f1c1a1b809 Add minimal vcl weld example application
The "minweld" is a minimal standalone vcl application that uses the
LibreOffice vcl weld framework to display the "tip of the day" dialog on
the screen. Upon clicking on the "Next Tip", a counter is incremented
and the text label containing its value is displayed/updated in the
center of the dialog box.

One can run the application by invoking:

    ./bin/run minweld

This example uses cui/ui/tipofthedaydialog.ui for the UI, but only uses
a few elements of it.

Change-Id: If304c60ddb262182cf23438ed1f83dba85e66391
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176610
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
2024-11-15 10:01:45 +01:00
Hossein bb0e5aa979 tdf#163291 Fix AdditionsDialog in start center
Previously, AdditionsDialog was not working while in start center. Also,
there were a lot of code duplicates. This patch fixes these issues.

The UNO command .uno:AdditionsDialog was incorrectly implemented as
application specific. There were multiple duplicate conditions for
checking SID_ADDITIONS_DIALOG in each and every application. Now, this
is only done in sfx2/source/appl/appserv.cxx in a single point.

The AdditionsDialog can now be opened while in start center in different
places of "Tools > Options" for icons, dictionaries, etc. Also, this
LibreOffice BASIC code snippet opens it:

Sub Main()
    oDispatch = CreateUnoService("com.sun.star.frame.DispatchHelper")
    Dim args(0) As New com.sun.star.beans.PropertyValue
    oDispatch.executeDispatch(StarDesktop.ActiveFrame,
        ".uno:AdditionsDialog", "", 0, args)
End Sub

Change-Id: Ifb7e466449008b9bb6e5b678da2e54f58bc101e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174469
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
2024-10-04 13:04:38 +02:00
Hossein 7c2d17141c Fix dotnet build issues on WSL Linux build
In wsl, Windows path is also added to the WSL shell path. Therefore,
dotnet.exe from Windows is also found, if it is searched for, causing
build issues.

To avoid the build problem, and in general, to avoid using Windows
builds from outside the WSL container, search for dotnet.exe is only
done on Windows builds.

Change-Id: I2c8c412f08008b24faf50d00dc166ad7a3c09b23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172175
Tested-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-30 17:49:49 +02:00
Hossein 67afda8955 No LibreOfficeKit headers and examples for macOS
LibreOfficeKit has issues in macOS, as discussed in LibreOffice
development mailing List and also in tdf#145127.

LibreOfficeKit unrunnable on macOS
https://lists.freedesktop.org/archives/libreoffice/2024-July/092256.html

Therefore, let's not ship the LibreOfficeKit headers and examples with
LibreOffice Community for macOS. If the above issue is solved, then it
will be possible to ship those again later.

Change-Id: I5ba62ee84432a09732d96a5d86eb0a1bf866671f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171095
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-03 10:04:51 +02:00
Hossein abf2f24e5b Add lokconvert odk example
This exmaple converts a file to PDF using LibreOfficeKit library.

Change-Id: Idc4afafc9541986617f0cc4d46cd89e25ae12051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169998
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-07-16 02:00:18 +02:00
Hossein b7a5d0e566 tdf#149256 Ship LibreOfficeKit headers in packages
Add LibreOfficeKitGtk.h

Change-Id: Ia575b9b9cb46ce4225d9030bf01453c5b3359325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169623
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Hossein <hossein@libreoffice.org>
2024-07-02 12:10:28 +02:00
Hossein 830ba03622 Fix unwanted code behavior change in sc/
While changing the code to use std::optional instead of bool, some
unwanted code behavior changes were introduced in this commit:

commit fbe8071e4f
Date:   Sat Oct 15 14:20:31 2022 +0200

    refactor functions: return optional instead of bool

Part of those unwanted changes are fixed in this commit:

commit 243e811abc
Date:   Wed Jun 5 10:14:49 2024 +0100

    cid#1603200 Uninitialized scalar variable

    cid#1603199 Uninitialized scalar variable

This commit undoes changes in the above (second) commit, and tries to fix
the problems by making the code look closer to what it was before the
first commit.

Change-Id: I47d692a5cf46abad582d7f162e2180e6c26b7e5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169037
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-07-01 11:23:28 +02:00
Hossein 1305edfbc2 tdf#149256 Ship LibreOfficeKit headers in packages
With LibreOfficeKit (LOK) headers in place, it would be possible to
create C++ applications that can access LibreOffice functionality
without building LibreOffice, only by installing SDK and build tools.

Change-Id: I8efc8ac1cec7b3b89e4d7eb2c8d15afeb595672c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134863
Tested-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-06-23 19:57:30 +02:00
Hossein 0e2409e5e3 tdf#156717 Fix "LibreOffice Community" in PDF metadata
These settings are available to set the brand when building LibreOffice:

1) Community flavor: yes / no
This is set via --disable-community-flavor, that defines
HAVE_FEATURE_COMMUNITY_FLAVOR, which is used in cui/source/dialogs/about.cxx.

2) Product name: A string (set via --with-product-name='name')
This defines PRODUCTNAME, which is used in many places in the code.

Not every LibreOffice build is a "LibreOffice Community" flavor. This
patch fixes this issue by using community brand only when variable
HAVE_FEATURE_COMMUNITY_FLAVOR is set.

Change-Id: Ib74450f380fed7c24222f88e389ddb5363bda3c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168676
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Jenkins
2024-06-13 22:37:37 +02:00
Hossein 12447b7c70 Fix odk examples build on 32 bit systems
It is required to cast integer literals to sal_Int32 when passing them
to Any().

Change-Id: I377f88fc3441d8e4bc7afdb2411c1fd140853134
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167739
Tested-by: Jenkins
Reviewed-by: René Engelhard <rene@debian.org>
Tested-by: René Engelhard <rene@debian.org>
2024-05-16 17:14:22 +02:00
Hossein a2265e8faa Use UNO_QUERY_THROW instead of UNO_QUERY
Previously, in SDK examples, de-referencing was done unconditionally
after obtaining a reference using UNO_QUERY. Now, we use UNO_QUERY_THROW
instead, to make sure cases where exceptions may occure can be handled
correctly.

Change-Id: Ic73ba3cfcad914dabb7ae3736ad1ae2bd6cc15bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164682
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-13 00:57:06 +01:00
Hossein c1f097854f tdf#160162 Fix hyperlink update in Draw
Changing the links to keep them up-to-date was previously done only when
the name "Slide" was used for the pages, just like Impress, as Draw and
Impress share code. Now, the term "Page" is used instead of "Slide"
since 942d1d2ea5 in Draw. This change,
fixes the above issue by also using the correct string consntant.

The patch is tested for Draw and Impress to make sure both are working
correctly now.

Change-Id: I55b4f56bd499d05f87f475d4c6cb3423247bf8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164716
Tested-by: Jenkins
Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-13 00:39:16 +01:00
Hossein d30891d6ad tdf#143122 Port HelloTextTableShape example to C++
Port DevelopersGuide/FirstSteps/HelloTextTableShape Java SDK example to
C++ and add a GNU Makefile for the build.

Change-Id: I8798406c24ec6c566fb6494f7202f6a2a984a25c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164635
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-11 00:25:38 +01:00
Hossein 93c5a2513c Enable commented part in HelloTextTableShape.java
Commented code in the HelloTextTableShape.java example demonstrates the
use of bookmarks. This part is now enabled.

Change-Id: Iace525be0d53b01bed8b5a6a123384a678d1d761
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164636
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-11 00:14:32 +01:00
Hossein 8f7d4f1da3 Check Windows SDK version
Because of a regression in Windows SDK version 10.0.19xxxx which
is now fixed in 10.0.20348, it is good to check that the
required SDK version is installed:

More information
https://developercommunity.visualstudio.com/t/std:c17-generates-warning-compiling-Win/1249671

It is important to know that both Windows 10 and Windows 11 SDK should
work.

Change-Id: Ia42843cac4f94c4db9ef429714f1b9d46ba3fd09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163770
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-27 10:49:29 +01:00
Hossein 07203b8ed8 tdf#158426 Limit field columns for data form to 32
Previously, maximum number of field columns for data form was 256, which
was too much. But, even with that value, nothing was happening when
exceeding that threshold. With this patch, the limit is decreased to 32,
and if the user goes beyond this limit by selecting more columns, an
error message is displayed. This change is done to prevent LibreOffice
hang when excessive number of filed columns are selected and using data
form is requested.

Change-Id: Ib6189b5b3beffb26a3fd8ba8cd06e4ae213f77da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162488
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-29 13:19:40 +01:00
Hossein 0d37cbb937 Normalize include syntax in include/LibreOfficeKit
Changed #include <LibreOfficeKit/...> to #include "..." in the header
folder include/LibreOfficeKit/.

The reason is described in:

C[++]: Normalizing include syntax ("" vs <>)
https://lists.freedesktop.org/archives/libreoffice/2017-November/078778.html

Change-Id: I8ccbbde38eb649428f99e39b6f0529dffc3e4206
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161809
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-24 06:03:11 +01:00
Hossein 97337f5395 Fix sw_complex JUnitTest not running
Call to gb_JunitTest_add_classes was missing in the gbuild makefile
sw/JunitTest_sw_complex.mk, and now it sholud be fixed. Before that
the sw/qa/complex/indeterminateState/CheckIndeterminateState.java was
compiled, but it was not run due to the missing class name
(complex.indeterminateState.CheckIndeterminateState) from the java
command which was used to invoke the test.

The test can be run with:

$ make JunitTest_sw_complex

Change-Id: I85823336d7f3ad2fde47442b5d1c5d2f3003299b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162263
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-21 00:21:33 +01:00
Hossein b9a36edc6d Add a minimal Python extension
This is a minimal Python extension. It is possible to run main.py from:

1. Inside a LibreOffice extension
2. Inside LibreOffice, and also via APSO
3. Outside LibreOffice, as an external process, and also in a Python IDE

The provided Python script is very useful for debugging extensions as an
example. That is because it is possible to debug it in an IDE before
packaging it as a LibreOffice extension.

Python file is checked with:

$ flake8 --ignore E501 main.py

Change-Id: I24d9aefdfda29264bf6b5f9403a40fae35e610f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159938
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-16 10:54:20 +01:00
Hossein 1ec3ef4db8 Update comment to match function parameters
One parameter of SfxStyleSheetBasePool::Make function was changed in
0035573ee7, but that change was not
reflected in the comment. It is now updated.

Change-Id: I89f7c1a6e0424d11acddf1f94d3af370af691b36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161611
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-05 23:30:47 +01:00
Hossein 42edec63fb Cleanup make files for Java/C++ SDK examples
This fixes some minor issues with the make files for Java/C++ SDK
examples in DevelopersGuide/FirstSteps.

For Java examples, an exatra "-f Example_Java.mk" was a leftover from a
previous change.

For C++ examples, 'make clean' was not working correctly, because of a
leftover from a previous change.

Both should be fixed now.

Change-Id: Id936824675a9bfd43674ca526bc97a998ed9daf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159777
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-11-21 13:31:36 +01:00
Hossein ae61f6aa2b tdf#143122 Port FirstLoadComponent example to C++
Port DevelopersGuide/FirstSteps/FirstLoadComponent Java SDK example to
C++ and add a GNU Makefile for the build.

Change-Id: I24da0422014e42f844cae21863d54301dd902f0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159740
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-11-21 00:50:15 +01:00
Hossein bc5c767e9a Separate folders for DevelopersGuide/FirstSteps
This patch creates separate folders for 3 different SDK examples in
DevelopersGuide/FirstSteps:

1. FirstUnoContact
2. FirstLoadComponent
3. HelloTextTableShape

Each one of these are ported to 4 languages: Java, C++, BASIC, Python.
The Java Makefile in the top folder is now separated into 3 different
Makefiles for Java programs.

Change-Id: Ifb2003be2aafb4caec4810eb21fbb4708b9a0628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159591
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-11-20 14:59:10 +01:00
Hossein e94cbd7dbf Remove obsolete comments in basctl
First comment was last updated with USHORT -> sal_uInt16 in
a2242be9c3 but with the newer commit
68ec95b3f8 there is no remaining sal_uInt16
left, and thus the comment is no longer relevant.

Second comment was added in 1fac87f847,
but with changes in 444c242c51 it is no
longer relevant.

Third comment was also last updated with USHORT -> sal_uInt16 in
a2242be9c3 but with the newer commit
444c242c51 it is no longer relevant.

Change-Id: I9ed383f15a5b403740c0b8bcdd153d04bb1a2b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158111
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-18 17:41:52 +02:00
Hossein e0bedd3f73 Revert "tdf#155470 DOCX export: fix RTL numbers changed to LTR"
This reverts commit 40ed8dd3a5.

Reason for revert: tdf#157598 problem with LTR documents

Change-Id: I6f25913df4e308be660070e1eeca81f08c0547ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157547
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-10-05 10:14:59 +02:00
Hossein a34dcd0325 Prepend instdir/program to the PATH in bin/run
To avoid problems described in 21cf443235,
do not change directory.

Change-Id: I56590c4728a6505c089a5bc06bed2a31a0cd0362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156973
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-20 14:23:33 +02:00
Hossein 930f0aa232 tdf#157273 Port DevelopersGuide/FirstSteps examples to BASIC
These 3 examples from the chapter 1 of the DevGuide are ported to BASIC:

1) FirstUnoContact
2) FirstLoadComponent
3) HelloTextTableShape

More details can be found in the LibreOffice DevGuide:

LibreOffice Developer's Guide: Chapter 1 - First Steps
https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps

Change-Id: I577ad81d76cec06102f00b2646b004caa5f7b401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156976
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-16 15:08:31 +02:00
Hossein 36163d269b Make svptest VCL example build on all platforms
Previously, svptest VCL example was not built on all paltforms. Now,
svptest is built on Windows and elsewhere. To run, one can invoke:

 ./bin/run svptest

Change-Id: I915a4ef9748e2248d2d209969d1fef079ee06cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156972
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-15 23:48:49 +02:00
Hossein 140fe3080d Make sure bin/run script finds the correct dlls
On Windows/Cygwin, if you put "C:\Program Files\LibreOffice\program"
in PATH, bin/run will have trouble finding correct vcllo.dll and other
LibreOffice .dll files inside instdir/program. Because the script uses
the absolute path of the executable, it is enough to use instdir/program
as the current working directory.

The symptom was that in the above case it was not possible to run the
workbenches like vcldemo, minvcl, etc. The error was:

$ ./bin/run minvcl

minvcl.exe - Entry Point Not Found | The procedure entry point
?RasterFromBitmap@SKImages@@... could not be located in the dynamic
link library vcllo.dll

$ ldd ./lode/dev/core/workdir/LinkTarget/Executable/minvcl.exe
	...
        comphelper.dll => not found
        fwklo.dll => not found
        i18nlangtag.dll => /cygdrive/c/Program Files/LibreOffice/program/i18nlangtag.dll (?)
        sal3.dll => /cygdrive/c/Program Files/LibreOffice/program/sal3.dll (?)
        vcllo.dll => not found
        MSVCP140D.dll => /cygdrive/c/WINDOWS/SYSTEM32/MSVCP140D.dll (?)
        VCRUNTIME140D.dll => /cygdrive/c/WINDOWS/SYSTEM32/VCRUNTIME140D.dll (?)
        VCRUNTIME140_1D.dll => /cygdrive/c/WINDOWS/SYSTEM32/VCRUNTIME140_1D.dll (?)
        ucrtbased.dll => /cygdrive/c/WINDOWS/SYSTEM32/ucrtbased.dll (?)

Change-Id: I02b6d9aca1062b22a91d5a1f9bce0cf7238a896a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156902
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-15 21:24:09 +02:00
Hossein 65325f9c2f Rename .cpp examples to .cxx
The files are renamed, and the associated lines in Makefiles and
elsewhere are also changed.

Change-Id: Ieec38055690e03afd8982320ee0836904a3f41eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156670
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-09 01:20:46 +02:00
Hossein 7dc3be651b tdf#143123 Port DevelopersGuide/FirstSteps/FirstLoadComponent to Python
Porting FirstSteps/FirstLoadComponent.java to Python is done. More
information on this example can be found on LibreOffice DevGuide:

LibreOffice Developer's Guide: Chapter 1 - First Steps - First Contact
https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps

This is the last of the 3 examples in the first chapter which are ported
to Python.

Change-Id: Iac0682943d4286168bbdadf792423670f41bdee6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156686
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-08 10:16:06 +02:00
Hossein 7a643f40b4 Simplify condition in a loop over a single element
The loop was over an array which has only one element, so the
condition should also work directly with its only element.

Change-Id: I5b87cf03d90e9da67ac3ff72b593be0ff5fa322c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129677
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-09-07 10:09:14 +02:00
Hossein 218b73d937 tdf#154271 Fix automatic cursor/screen jump in Calc
Previously, when using ctrl+end, the screen/cursor jump was done to the
middle of the screen. In this way, the available space of the screen was
not optimally used.

In this patch, the jump is adjusted to move the cursor to the end of the
screen, and the visible/usable space will be all of the screen.

In this patch, previous behavior for showing the search results and
other purposes other than pressing ctrl+end to jump to the last cell are
preserved, and in those cases, the selected cell will be in the middle
of the screen, as before.

Also, in the situations that the jump is done from a cell lower or right
of the last cell (in other words, further than the last cell), the
behavior is preserved.

Change-Id: I25f308f84f096ec271c23df75998ddeea32119ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156266
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-06 16:27:11 +02:00
Hossein 345b214c37 tdf#149069 Revert "ridljar: check UnoClassLoader used for NativeLibraryLoader"
This reverts commit 97b61ea329. It checked
that the NativeLibraryLoader is an instance of the class
com.sun.star.lib.unoloader.UnoClassLoader. If this is not the case, a
warning was displayed. This was for java_uno bridge to work.

On the other hand, as the comment in the code implies, "not a problem
if this is using Java remote bridge or (in a) unit test". But, in the
code there was no check for that. As a result, this warning is displayed
in many places like the simple examples that want to connect to the
LibreOffice process via Java API.

Change-Id: I056ed372ad071573051024a63e51afd6b4425ce5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156302
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-01 00:02:44 +02:00
Hossein 40ed8dd3a5 tdf#155470 DOCX export: fix RTL numbers changed to LTR
When using numerals in "context" mode in "Tools > Options", in
"Language Settings > Complext Text Layout > General Options > Numerals",
the actual display of the numbers is dependant on the direction and
the language of those numbers.

Previously, when exporting the DOCX in LO the RTL direction was lost,
and because of that, the numerals were shown incorrectly after saving
in LibreOffice, and loading again.

This patch adds <w:rtl/> where <w:lang> contains an RTL language.
For example, before <w:lang w:bidi="fa-IR"/> inside <w:rPr>, it always
adds <w:rtl/>.

It is worth noting that this is not always the case, as there are
situations that <w:rtl/> is not present in <w:rPr> with an RTL language
like <w:lang w:bidi="fa-IR"/> and <w:rtl/> should not be in the output.
This patch does not handle that case, because currently loading such a
text is not done correctly in LO, and the LTR numbers inside RTL
environment are shown just like RTL numbers. To fix it, first loading
and displaying of that should be fixed.

A test is added to check the export of the sample file, which can be
invoked with:

 make CppunitTest_sw_ooxmlexport CPPUNIT_TEST_NAME=testTdf155470

Change-Id: I8fc54916fcd3295010c5c81ccb632bc6082ffaa2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155721
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-21 14:26:51 +02:00
Hossein 0c9f095a01 tdf#155446 Fix problem with ccache on Windows
This patch fixes the recent problem with building LibreOffice with ccache
on Windows which was caused by the lack of double quotation mark between
ccache.exe and path to the MSVC compiler.

Change-Id: I1a714513ccb8cd674895d0c887013ea862d3b544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152277
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-09 10:15:16 +02:00
Hossein a99a63287f tdf#156560 Fix assertion failure editing RTL header
Clicking on an RTL header previously lead to assertion failure, but now
it is checked if the SwFrame pointer is null. If so, an empty vector is
returned.

It should be noted that the rendering of the rtl header in the
attachment 188689 is still wrong as the text and image are misplaced.

A test is added to the patch, and can be run using:

 make CppunitTest_sw_uiwriter8 CPPUNIT_TEST_NAME=testTdf156560

Change-Id: I9e8f66895b4ef9369300c9d7c03d22a2085a1d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155159
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-03 11:41:27 +02:00
Hossein f58dc86c9c tdf#156268 Add UITest for Calc ### display crash
UITest loads a minimal .fods example to check if Calc crashes with that.
The example file does not crash without UI, as it needs the ###
indication to be painted on the screen. Calc does not crash with the
CppUnitTest, tested using testImportCrash() to load the file in a test
added to sc/qa/unit/subsequent_filters_test4.cxx. Also, PDF export works
without problem. But, UITest leads to crash without the fix in place.

The UITest can be run using:

 make UITest_calc_tests9 UITEST_TEST_NAME=tdf156268.Tdf156268.test_tdf156268

Change-Id: I9712d70f057cfc11f10fd98caadbf6e10ee67d5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154977
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-07-27 10:41:26 +02:00
Hossein 4ea4ce78d1 Remove leftover debug code
This fprintf was leftover from 1653bb9bff
which came up with attachment 94167 from tdf#75059 in terminal output
with just opening and closing in the official 7.5.1.2 binaries.

Change-Id: Ib04b5f6dd3426e97a14b3c6f38b68481f1bf85b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154518
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-07-17 18:38:08 +02:00
Hossein f9f7cfc080 tdf#122970 Fix direct cursor leaving screen trail
Previously, an old method using RasterOp::Xor rendering (see tdf#38844)
was used to draw the extra triangle left or right of the mouse pointer
in direct cursor mode. Now, instead of drawing it manually, we change
the cursor type to somewhat similar pointer type.

There is no perfect match for the previous mouse pointer shape, so now
instead of left triangle, PointerStyle::AutoScrollW is used. Also instead
of right triangle, PointerStyle::AutoScrollE is used.

Change-Id: Iadb955f9fcee0978a190e0b8920186a2579f3a4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153099
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-06-20 01:03:55 +02:00
Hossein af27b57521 Rename function to SetMetricValueAndSave
Rename the function, remove prefix and suffix

Change-Id: Iaca0541d15a9162f11f8461892bf4c4454c9d674
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151843
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-06-04 23:56:55 +02:00
Hossein c01639c556 Simplify the code by introducing a new function
There were a lot of repetitions in the code of the function
SvxConnectionPage::Reset(). This patch Simplifies this function by
introducing SvxConnectionPage::lcl_SetMetricValueAndSave() to do the
repetetive instructions.

Change-Id: I337ccf2281fd8d1bd9b1948beb6d31b2306eb339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151820
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-05-16 13:44:00 +02:00
Hossein fdd7304485 Drop boost dependency for writerfilter
The last usage of boost in writerfilter was <boost/lexical_cast.hpp>.
This is now implemented using rtl::math::stringToDouble(). To avoid
behavior change in case it does not find any suitable characters to
convert, it is checked that the index of the last parsed character to
be zero, as lexical_cast throwing bad_lexical_cast exception in this
case but stringToDouble reports rtl_math_ConversionStatus_Ok.

OUString::toDouble() is not enough here, as it does not provide suitable
error handling mechanism beyond IEEE 754 special values and 0 as output.

stringToDouble() should be able to handle 16-bit char strings, as it
takes std::u16string_view type string as input, and also uses sal_Unicode
as the data type for the separators.

The boost library is no longer in use in writerfilter. But, right now it
is not possible to remove the remainings from the makefiles and includes,
because of the dependencies that still use boost.

Change-Id: Iae4b83106fcbdded71e7d9e5f70376ab408e9b5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139279
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-08 09:36:59 +02:00
Hossein 894bb1128c tdf#150457 Port UITest to CppunitTest
The UITest for tdf#150457 is now ported to CppunitTest. The new test can
be run by:

 make CPPUNIT_TEST_NAME=testTdf150457 -sr CppunitTest_sw_uiwriter3

Without the fix d05c176cc0 in place,
running the test leads to a segfault.

Change-Id: I1d633cadf9f5579cdf3e1e59641108eadc7b7073
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151330
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-05-04 15:17:35 +02:00
Hossein 57f46a5a64 tdf#152246 Test position of RTL elements in PDF
This test checks the position of RTL/LTR elements in the exported PDF
files. Without the fix in place, the test fails because the RTL elements
will position as LTR, and the "Rect" element will be something else:

double equality assertion failed
- Expected: 303.349
- Actual  : 56.699
- Delta   : 1e-06

The Sample DOCX file contains both RTL and LTR content controls for testing.

One may run the test with:

 make CPPUNIT_TEST_NAME=testTdf152246 -sr CppunitTest_vcl_pdfexport

For an overview on PDF fill-in forms, please refer to:

James C. King, Introduction to the Insides of PDF, pages 81-85
https://www.adobe.com/technology/pdfs/presentations/KingPDFTutorial.pdf

Change-Id: I6c15b49bffb1aef6f137f7bb518a291f4d88b888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151228
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-05-01 13:00:48 +02:00
Hossein 8434b85543 Add .cache (Qt Creator) and gdbtrace.log (gdb)
Change-Id: I80ebe9270bcb895ea95d2fd679417dd4f2b22165
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151047
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-04-28 21:54:20 +02:00
Hossein 1466e2a58f tdf#152246 Fix RTL content control field position
With this patch, the horizonal position of the content control fields
are corrected. Previously, they were calculated just like the fields in
the LTR paragraphs. To implement this, I've used the
GetTextFrame()->SwitchLTRtoRTL method.

The remaining issue is that The exported fileds in the PDF are still LTR
themselves. For example, the combo box will still be LTR.

It should be pointed that handling vertical text is still an issue that
should be addressed later. If you rotate the paragraph with content
control field, the output does not obey, which is incorrect.

Change-Id: I927d14f9ca90434b4397dcf175dbb9531dda0c7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150515
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-26 11:09:10 +02:00
Hossein 573863d78a tdf#153533 Fix chart2_import test failure on HiDPI display
The test checks that the text shape width is smaller than the chart
wall. This test fails on HiDPI displays. For example:

--------------------
lode/dev/core/chart2/qa/extras/chart2import.cxx(2207) : error : Assertion
Test name: Chart2ImportTest::testFixedSizeBarChartVeryLongLabel
double equality assertion failed
- Expected: 4800
- Actual  : 4632
- Delta   : 100

Failures !!!
Run: 85   Failure total: 1   Failures: 1   Errors: 0
--------------------

Now, instead of testing the
exact value of the text shape width, I have used CPPUNIT_ASSERT_LESS()
to make sure that the above condition holds:

 CPPUNIT_ASSERT_LESS(xChartWall->getSize().Width, xXAxis->getSize().Width)

This is done in two different tests:

* Chart2ImportTest::testFixedSizeBarChartVeryLongLabel()
* Chart2ImportTest::testAutomaticSizeBarChartVeryLongLabel()

Both tests are among those that can be invoked with:

  cd chart2 && make CppunitTest_chart2_import

Change-Id: Ifb28fcf91da451aecdadff7a95aa810ef16fc510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146815
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-02-24 22:58:08 +00:00
Hossein b1f0c23720 tdf#153476 Disable MS telemetry in VsDevCmd.bat
MS telemetry inside VsDevCmd.bat causes problems for the autogen.sh
script which uses it to find the Visual Studio C/C++ standard library
via the environment variables that show the UCRT path and version.

VsDevCmd.bat is the "Developer Command Prompt for Visual Studio".

The telemtry is disabled by:

  set VSCMD_SKIP_SENDTELEMETRY=1

This change resolves the problems described in tdf#153476.

Change-Id: I8b77a2ca0c3577b3ba490723ab7901f463562578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146677
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-09 07:06:57 +00:00
Hossein 5fa078413e Make minvcl and svdemo VCL examples build on Windows
Previously, minvcl and svdemo VCL examples were not built on Windows.
With this patch, both of the minvcl.exe and svdemo.exe are built on
Windows. To run, one can invoke:

  ./bin/run minvcl
and:
  ./bin/run svdemo

Change-Id: I43bfb314b41c662250615486a3ca783fc6d82600
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146264
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-28 13:08:27 +00:00
Hossein 10c340c2b5 Add exception handling to minvcl, minify code
Improve minvcl example:

* Add exception handling
* Minify code by removing custom Window

Change-Id: I1f1dc10c05812b4cfad7d38e09d7ecd26bec35b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143650
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-28 09:00:04 +00:00
Hossein 196930bae2 Revert "tdf#114441 Convert use of sal_uLong to better integer types"
This partially reverts 3cc818c38e. In this
patch sal_uLong was converted to better data types. In part of the patch
the order of the calls, GetVisibleSize() ~> SetLineSize ~> SetPageSize()
was changed so that the GetVisibleSize() is invoked inside the parameter
passing to SetPageSize() to avoid creating a temporary variable.

As sberg mentioned, it was needed that the call to SetLineSize() did
not have side effects that changes the result of the GetVisibleSize().
But it was hard to prove so, even if it seemed logically sound. Thus,
I am reverting the above commit partially.

In the revert, I've used tools::Long for nVisSize instead of sal_uLong.

Change-Id: Iba8d2da2675c237e9ab1c30918defce13ea71d7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144617
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-28 16:17:54 +00:00
Hossein c6837f8ebe Fix title for nlpsolver/README.md
The nlpsolver module is "Solver for Nonlinear Programming", which was
mistakenly called "New Linear Programming", and this is now fixed.

The change will appear within a week in:

https://docs.libreoffice.org/nlpsolver.html

Change-Id: I05b14d1e4056d8d0797728905886edef867f29e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144408
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-12-19 09:42:02 +00:00
Hossein 31d5103899 tdf#152061 Fix bitmap image scaling
In the regression introduced by c2c37eadf3
the bitmap image scale was calculated incorrectly. Upon resizing the
image a bit, this problem went away, and the image was shown with much
better quality compared to what it was before the above commit. It
turned out that the problem happened when the scale was less than 1, and
it was happening inside "if ( nScaleX < 1.0 || nScaleY < 1.0 ) {...}".

The part that was calculating aPosAry.mnSrcWidth and aPosAry.mnSrcHeight
was wrong, because it was setting the same height and width without
considering the fScale. The bitmap was scaled using Bitmap::Scale()
parameter which was newly multipled by fScale in the above commit. To
fix the problem, these two values are now multipled by fScale.

Change-Id: I8c77d2db3b05da54f1999d3915a70e3b7cc8106f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142754
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-16 11:17:29 +01:00
Hossein 2d7db6981e tdf#152012 Fix assert fail on opening date picker
This patch fixes tdf#152012 which caused an assertion failure on opening
date picker field in a DOCX file

The assertion was:

include/o3tl/span.hxx:83: constexpr o3tl::span<T>::value_type& o3tl::
span<T>::operator[](o3tl::span<T>::size_type) const [with T = const
int; o3tl::span<T>::reference = const int&; o3tl::span<T>::size_type
= long unsigned int]: Assertion `pos < size()' failed.

And the backtrace was:

1  __pthread_kill_implementation           pthread_kill.c:44
2  __pthread_kill_internal                 pthread_kill.c:78
3  __GI___pthread_kill                     pthread_kill.c:89
4  __GI_raise                              raise.c:26
5  __GI_abort                              abort.c:79
6  __assert_fail_base                      assert.c:92
7  __GI___assert_fail                      assert.c:101
8  o3tl::span<int const>::operator[]       span.hxx:83
9  OutputDevice::ImplLayout                text.cxx:1396
10 OutputDevice::DrawTextArray             text.cxx:948
11 Calendar::ImplDraw                      calendar.cxx:71
12 Calendar::Paint                         calendar.cxx:1133

The problem was caused by an out of bound access to a vector of integers
which was created for rendering calendar header consisting of the first
letters of 7 days of week, when you clicked on the down arrow on the
date field.

The function OutputDevice::DrawTextArray() takes an 'rStr' string to
draw, and 'pDXAry' array for the exact position of the the individual
characters. It also takes 'nIndex' as the first index, and 'nLen' as the
length of the array. 'nLen' has the default value of -1. In this case,
the length is calculated from the size of the string passed to the
function. This works well if the one who uses the function makes sure
that the size of the array and the length of string are equal.

Previously, for the 7 days of the week, a 7 letter string "smtwtfs"
(depending on the week start day this can be different, but length is
always 7) was sent to this method without providing the length, thus
the string length: 7 was used. In this case, positions of the letters
were calculated and used from other array named mnDayOfWeekAry[7].
mnDayOfWeekAry[k+1] was used as the position of letter k (k=0..5).
In this case, there was 7 letters for 7 days, and only 6 positions
provided by the array. This caused assertion failure in span.hxx:83
when trying to accesss mnDayOfWeekAry[7] via o3tl::span<T>::operator[].

Value of mnDayOfWeekAry[0] was used in other calculations, therefore to
fix this problem, mnDayOfWeekAry was extended from 7 to 8, and the last
position was set to the end of drawing rectangle.

The other thing that is done in this patch to avoid this problem in the
future is removing the default value from the function prototype, so
that the use should always be done by providing the length of array and
starting index. After removing these defaults, it became necessary to
provide empty arrays for 'pKashidaAry' which provides the kashida
positions, if needed.

With this fix in place, the assertion failure no longer happens.

A UI test is added to make sure the crash will not happen again. The
test can be run by invoking:

 cd sw && make -srj1 UITest_writer_tests5 \
  UITEST_TEST_NAME="DateFormFieldPropertiesDialog.dateFormFieldDialog.test_date_picker_drop_down" \
  SAL_USE_VCLPLUGIN=gen

Change-Id: I347afb358fbc4956524f7f0a0abc3a221bf42992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142642
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-14 12:08:08 +01:00
Hossein acf7a851e8 Revert "tdf#145538 Use range based for loops"
This reverts commit 64469bb1a7.

To keep the compatibility with C++98, we need to revert the previous patch.

Quoting sberg:
"This code happens to not normally be processed (see ure/source/uretest/README)
and is meant to be compilable with the 3rd-party UNO compiler baselines (i.e.,
just C++98, which implies no range base for loops)."

Change-Id: I1355a29af24299a99a23dfcd1dd473894d7c9e0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142302
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-07 08:20:46 +01:00
Hossein d1707bc312 tdf#149718 Fix crash on insert chart for tables with merged cells
Previously inserting charts for tables with merged cells lead to crash.
This was because a wrong assumption in unochart.cxx, specifically
SwChartDataProvider::Impl_createDataSource() that every row has the same
number of columns. Therefore the code was using the number of columns in
the first row as the number of columns for all the rows, which is wrong.

For example, inserting a chart for the second column of this table leads
to a crash:

    [                      ]
    [    1     ][     2    ]

In this way, an assertion failure was created because the number of
columns where counted from the first row, which has merged cells, and
therefore fewer number of columns compared to the last column of the
selected part.

To solve tdf#149718, now we use the maximum number of columns calculated
across all the rows. In this way, the remainder of the function does not
need a fix, although a cleanup for the whole function can be interesting
and help avoid using tiny extra memory space.

A UITest is provided to avoid this bug in the future. To run the test:

    cd sw && make -srj1 UITest_sw_chart \
    UITEST_TEST_NAME="tdf149718.tdf149718.test_chart_from_table_with_merged_cells" \
    SAL_USE_VCLPLUGIN=gen

Change-Id: I3c1000d7f177417e98d3a8ceae7886824c1053a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140092
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-10-10 18:27:03 +02:00
Hossein d3050ff4a1 Use Markdown instead of reStructuredText
Use Markdown markup instead of reStructuredText for
uitest/packaging/README.rst

Change from reStructuredText to Markdown in setup.py is done according
to this guide:

Making a PyPI-friendly README
https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/

Change-Id: I12cbde53518d7ceadec034827d8cb00380df1547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138555
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-09-26 00:26:05 +02:00
Hossein e8c0a88d64 tdf#139627 Test justified Arabic/Persian text to avoid gaps/big overlaps
With the patches 3901e02..62ff105 from Khaled, many problems with the
justified Arabic/Persian text which were related to Kashida are fixed.
Here, we add a test for tdf#139627 which converts the example file to
the PDF format, then checks the width and the position of the characters
in the output to make sure:

* The characters are present in the PDF file in the correct order
* The characters are joined together
* The diacritic mark is positioned correctly
* The overlapping of the tatweel character is not more than 10% of the
  first character

Sample odt file uses "Noto Arabic Sans" font, which is available via
LibreOffice on all platforms.

One may run the test with:

    make CPPUNIT_TEST_NAME=testTdf139627 -sr CppunitTest_vcl_pdfexport

Change-Id: I7a826a1b43ee842978decb0cf9a5e2a3b7219982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138328
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-31 21:17:19 +02:00
Hossein d05c176cc0 tdf#150457 Fix crash on hovering removed footnote reference
The regression was caused by 402f36efb215338ad545caa65d39fb8a39685ea1.
Before that, 0aa0fda640 changed the cursor
jumping behavior to fix tdf#81226. The goal was to make LibreOffice
behave as described in the description of the issue:

"When your cursor is on the last line but not at the end of it, simply
press the down arrow to go at the end of the file (end of that line)."

The same behavior was achieved for pressing down on the last line.

The above patches allowed removing the footnotes and their numbers
(except the first number) while the reference were still present. Then,
on hovering a removed footnote reference, a crash was happening. It
should be noted that even with this patch, removing the first reference
number was not possible.

This fix limits this behavior to anywhere other than inside a footnote.
In this way, it prevents crashing.

With this fix, the behavior of the cursor goes back to what it was
before 0aa0fda640. The user will not be
able to select all the footnotes at once. Also, removing footnote number
will not be possible.

It is worth noting that not being able to select all the footnotes at
once prevents the user from changing the characteristics of the
footnotes all at the same time. Also, not being able to remove the
footnote numbers, prevents the user from having footnotes with custom
numbers written manually. Both of these actions are possible in MS Word.
The other difference is that by going up, one can go out of the footnote
section in MS Word, but this is not the case for LibreOffice.

A UI test is added to make sure the crash will not happen again. The
test can be run by:

 cd sw && make -srj1 UITest_writer_tests2 \
  UITEST_TEST_NAME="deleteFootnotes.tdf150457.test_delete_footnotes" \
  SAL_USE_VCLPLUGIN=gen

Change-Id: I1ce7d2189355f6763b6f31219e00516ff7a8164e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138562
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-27 00:53:55 +02:00
Hossein 482264a7c2 Remove extra output from "bin/run -l" on Windows
The previous output contained extra file names other than executables,
but now we limit the output to *.bat and *.exe files.

Change-Id: Ie785d1e4388780b290f6580d02af635279080412
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138556
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-20 12:12:19 +02:00
Hossein a6c50882fd Fix "bin/run -l" to work correctly on Windows
On Windows, the script did not run correctly because of the "return"s.
Here, we use "exit" instead.

Also, there were many files with the same name but with different
extensions in the output. Now, we only print out the names using grep,
awk and sort utilities.

In addition, a description for bin/run is added to bin/README.md

Change-Id: Ifb106c89199ebc5a9debf6caef80bd1edf143b20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138514
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-19 12:21:16 +02:00
Hossein 67615c8461 Improve vcl scheduler documentation
* Fixed a heading problem
* Marked variables, functions and identifiers as fixed width
* Added several related links

Change-Id: If5e56c1e2a474fcfa52601ccda7911bf9e80c913
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137636
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-30 20:34:50 +02:00
Hossein c2746a6656 Add help and list executables options for bin/run script
bin/run script is described as:

"simple wrapper script to run non-installed executables from workdir".

When the bin/run script was used without parameters, it was generating
error as it could not run the folder workdir/LinkTarget/Executable.
Now, we print usage instructions in this case, or when help is
requested with -h, -help or --help.

Also, now user can get the list of executables with -l, -list or --list.

In normal execution, the script's name is also printed. For example:

$ ./bin/run minvcl
Setting env variables and running workdir/LinkTarget/Executable/minvcl
...

Change-Id: I5c62c300d5247f55d1d1cfd095cecffc979d494b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137626
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-30 06:35:50 +02:00
Hossein e2b7f59c74 tdf#147868 Disable add sheet when structure is protected
Using "Tools > Protect Spreadsheet Structure...", it is possible to
protect the structure of a spreadsheet document. Without this patch in
place, the [+] (add new sheet) button is clickable but it does not work.
This is confusing for the user, so it was decided that the button should
be disabled when the structure is protected.

This patch disables the [+] button just after the structure is protected
using the above toggle menu option. The menu option becomes checked, and
the [+] button gets disabled immediately. After choosing the same toggle
menu option again, the check mark goes away, and the [+] button becomes
enabled immediately.

In this patch, GetDocument().IsDocEditable() is used to check if the
document structure is protected. The argument for this choice is that
the same function is used when renaming a sheet with
ScDocFunc::RenameTable().

Change-Id: If812d94841d3efd98d7ef898cc1f4b2f1387130b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137365
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-24 15:53:39 +02:00
Hossein d0e50ba13b Add information on Java baseline in README.md
As discussed in the ESC, although LibreOffice can be built with the
Java Development Kit (JDK) version 9, the JDK 9 is no longer
supported by the JVM vendors including Oracle, Red Hat and others.
Thus, it is asserted here that JDK 11 or later should be used to build
LibreOffice.

For further information on the supported versions of JDK, and its
lifcycle, see these articles:

Oracle Java SE Support Roadmap (Updated March 22, 2022)
https://www.oracle.com/java/technologies/java-se-support-roadmap.html

OpenJDK Life Cycle and Support Policy (Updated November 22 2021)
https://access.redhat.com/articles/1299013

It should be noted that JDK 8 is still supported, but it is not usable
for building LibreOffice.

It is also documented that without Java one may lose many features that
are described in the TDF wiki article Development/Java:
https://wiki.documentfoundation.org/Development/Java

Change-Id: Id001c341a221b0fe5c07c7129956a824261d32c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135557
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-06-10 08:21:57 +02:00
Hossein b6e0ae1b1b Add Makefile for the FirstUnoContact C++ SDK example
Add Makefile for the DevelopersGuide/FirstUnoContact C++ SDK example.
The example now can be built using the same process for other C++
exmaples.

The DevelopersGuide examples will be categorized into several
directories, according to the language:

basic cxx java python

This requires that all examples ported to each of these languages.

Change-Id: I95c5c324fef66664836b5e07bf34c98117e6b478
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134596
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-05-25 09:02:29 +02:00