The SvtViewOptions class is used to store the state
of windows/dialogs.
So far, SvtViewOptions::SetWindowState and
SvtViewOptions::GetWindowState are string-based
and the callers are responsible for (de)serializing
the vcl::WindowData to/from string.
This will be changed to become the responsibility
of SvtViewOptions in an upcoming commit.
Since unotools is below vcl in the module
dependency chain, it cannot make use of vcl,
i.e. vcl::WindowData couldn't be used there.
Therefore, move SvtViewOptions from unotools
to svtools, which is above vcl in the module
dependencies.
(svtools/README.md summarizes the purpose of the
module as "Tools on the Top of VCL", which seems
an appropriate place for helper code to manage
the state/options for dialogs, tab pages,...)
Change-Id: If849224c35c7ac895659ddb7c17e6d17061d61a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Adjust these 2 remaining checks to be consistent with what
commit 811769f009
Date: Tue Mar 31 22:10:42 2026 +0200
Consistently use __EMSCRIPTEN__ instead of EMSCRIPTEN macro
switched to elsewhere.
Change-Id: Ib9fe8c73eee6bf5314ff96ab7ebddd50615c2efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205314
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
...as emsdk 5.0.3 deprecated the predefined EMSCRIPTEN macro (see
<https://github.com/emscripten-core/emscripten/commit/506052bd8b4e23ded7f2351c62ca3b24d40c8cf3>
"Warn about usage of deprecated EMSCRIPTEN macro. NFC (#26381)"), causing
failures like
> In file included from static/source/unoembindhelpers/PrimaryBindings.cxx:29:
> In file included from include/sfx2/viewsh.hxx:35:
> In file included from include/editeng/outliner.hxx:32:
> In file included from include/tools/color.hxx:26:
> include/osl/endian.h:66:15: error: macro 'EMSCRIPTEN' has been marked as deprecated: use __EMSCRIPTEN__ instead [-Werror,-Wdeprecated-pragma]
> 66 | #elif defined EMSCRIPTEN
> | ^
> /home/sberg/emsdk/5.0.4/emsdk/emscripten/main/cache/sysroot/include/emscripten/emscripten.h:35:66: note: macro marked 'deprecated' here
> 35 | #pragma clang deprecated(EMSCRIPTEN, "use __EMSCRIPTEN__ instead")
> | ^
To avoid confusion, also suppress the -D$(OS) in
solenv/gbuild/platform/unxgcc.mk that would unnecessarily keep defining
EMSCRIPTEN.
Change-Id: Ic1f187cf1c6417cd95d4092e9cea01a665bd1b2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/34
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50291c2ed83bdb49bb827a4a12905d94b8c42035)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
and
cid#1691453 Variable copied when it could be moved
cid#1691456 Variable copied when it could be moved
cid#1691457 Variable copied when it could be moved
cid#1691449 Variable copied when it could be moved
Change-Id: I7d72e19a177f818dafb7350995cc602c2dd9f52e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203566
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Sets default numbering format of subdocuments to be 012_ABC rather than
previous ABC12, which allows for formatting.
1. Introduces a class `PaddedSequentialTokens` to "pad" the number
with leading zeroes
2. Introduces a function `concatFunc` in parameters to customize
format of numbered subdocuments
Change-Id: I95aaf552189a5e1b9bdf7a178cbc3a83c8ab8e16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187939
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
utl::MediaDescriptor was just a SequenceAsHashMap with a few added
methods. It made it more difficult to assign a SequenceAsHashMap to
MediaDescriptor, without real upsides. In many places, the class was
used not as media descriptor, but just as helper to create sequences.
This change puts the string constants and the former methods into a
namespace utl::MediaDescriptor.
It would be also good to drop comphelper::NamedValueCollection, which
is basically a twin of comphelper::SequenceAsHashMap (TODO).
Change-Id: Ia9b69c5a2ad153ecc654944c419c1880252ed86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195163
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
and
cid#1659754 Variable copied when it could be moved
cid#1659755 Variable copied when it could be moved
cid#1659756 Variable copied when it could be moved
cid#1659766 Variable copied when it could be moved
cid#1659767 Variable copied when it could be moved
cid#1659769 Variable copied when it could be moved
cid#1659770 Variable copied when it could be moved
cid#1659777 Variable copied when it could be moved
cid#1659787 Variable copied when it could be moved
cid#1659790 Variable copied when it could be moved
cid#1659793 Variable copied when it could be moved
cid#1659802 Variable copied when it could be moved
cid#1659818 Variable copied when it could be moved
cid#1659822 Variable copied when it could be moved
cid#1659824 Variable copied when it could be moved
cid#1659825 Variable copied when it could be moved
cid#1659826 Variable copied when it could be moved
cid#1659842 Variable copied when it could be moved
cid#1659849 Variable copied when it could be moved
cid#1659850 Variable copied when it could be moved
Change-Id: I70729aaf6e229518a9a50ac18311286ab5b05b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189348
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
This fixes a 7.5 regression from
commit ab0adac692
Fix everything using XCharacterClassification::getStringType()...
Prior to erack's commit, all of the character-type-flags were grouped
together. So it could be a mix of UPPER, LOWER, and TITLE_CASE.
IsUpper returned true if there was at least one UPPER and no LOWER.
return (nFlags & KCharacterType::UPPER)
&& !(nFlags & KCharacterType::LOWER);
Since it was a group of flags, any characters that were non-case
(like a fullstop) did not affect the result of IsUpper.
But when it was changed in 7.5 to
return aCC.isUpper( rText, nPos, nLen );
now every character needed to be considered to be upper-case,
even if it was a non-case character.
So this patch changes the logic back to the original state
(more or less).
The fly in the ointment are any Unicode characters
that would be considered to be TITLE_CASE.
Previously they were ignored (i.e. they didn't affect the outcome),
but now I consider them to be non-uppercase.
That seems to me to be the intent here anyway,
so probably this implementation "fixes a bug"
when a word consisted of a mixture of UPPER and TITLE_CASE chars.
See the first patchset where I added a dummy parameter
to ensure that this was still the only place
using erack's new function.
This proves it is safe to change the logic back,
since this is the only place IsUpper is called.
Change-Id: I7cf1d68bc3eb0a1a468da9e67ab54d1148f097aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187934
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
It's unclear to me what these
//==== internal =========================================================
comments are trying to say.
(What does it mean if the public ctor of a class that
gets called from outside that class is "internal"?)
If those were intended to say what methods are internal to a class
then access specifiers (private, protected, public) would be the proper
way to specify what is internal to a class (but that doesn't seem to
be the semantic used here).
If "internal" is meant to indicate that these are LibreOffice-internal
(not available for third-party code in extensions or
macros), then there is no need to explicitly mention that, because
all a11y class implementations are internal only, no instances are
created directly by calling ctors from third party code.)
Change-Id: I118c7e0bee77cda68e67f0a3bfe134aeaaa86d73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186746
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
separately from all private info files during save.
The new expert config option name is: RemoveEditingTimeOnSaving
(There wasn't any UI element added for this expert config option.)
Change-Id: Iab69d062d161ef6aee1c3eb87ada1c16f8b4fd41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184789
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
cache LocaleDataWrapper because otherwise we spend quite a bit of
time doing function-pointer-symbol lookups.
Change-Id: Ic1bd07dabac95a2e1bdad70cffbc2b4cabdc62ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183221
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Currently the document themes are hardcoded and the new ones will
be only used in the current document. This is the first of the
series to make document theme user defined and stored in the user
and shared folders (just like other resources). This change adds
the configuration of the folder which will be used to search for
the document themes. By default the folders are located in the user
and shared profile folders.
Change-Id: I1388983804d012cd7f8575dfc96830451821f56e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180379
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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
I think I managed to disable this when I converted it to
use the shared plugin infrastructure.
So fix that, and then make it much smarter to avoid various
false positives.
Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
we can just take a "const &".
(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)
Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Switch css::accessibility::AccessibleRelationType
from integer constants to an enum.
This provides more type safety and improves the debugging
experience, e.g. GDB now prints
com::sun::star::accessibility::AccessibleRelationType::AccessibleRelationType_CONTENT_FLOWS_TO
instead of just "2" when printing the value of a
corresponding variable, so it's no longer necessary
to manually look up what constant has that integer
value to know what relation this refers to.
offapi/com/sun/star/accessibility/AccessibleRelationType.idl
had this comment:
> <p>We are using constants instead of a more typesafe enum. The reason
> for this is that IDL enums may not be extended. Therefore, in order to
> include future extensions to the set of roles we have to use constants
> here.</p>
However, the a11y UNO API is internal (not published),
so that shouldn't be a concern.
Change-Id: I44a7d56cb085dc24effb24fcd34bb222b78ef4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176153
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
we already declare the same thing in various places,
and I intend to be using this some more, so it makes
sense to only declare it in one place
Change-Id: Ifea6b589e992dd9f6cd8f2301f837e71397481c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This ctor is meant to set the value of nTime directly; and that value
is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK.
But in some places, this ctor was misused for setting of nanoseconds,
which would only accidentally work for values less than one second.
All places that initialized tools::Time with 0, now use EMPTY.
This makes the ctor private; and for the very few cases where really
the encoded value of nTime is stored / restored, fromEncodedTime is
introduced.
Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>