Add a way to search with an offset in findInVector() and then we can
avoid strstr() which assumes a null-terminated input, which may not be
the case.
READ of size 55 at 0x606000068a56 thread T8 (docbroker_001)
#0 0x55d0d6718a5a in StrstrCheck(void*, char*, char const*, char const*) /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:652:5
#1 0x55d0d6718882 in __interceptor_strstr /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:669:5
#2 0x55d0d71872c9 in ClientSession::postProcessCopyPayload(std::shared_ptr<Message> const&)::$_4::operator()(std::vector<char, std::allocator<char>>&) const /home/vmiklos/git/collaboraonline/online-23.05-san/wsd/ClientSession.cpp:1631:31
During unit-uno-command.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id42669d912bab4746d9f7d99a192c4c3f1d175f7
Prevents to overflow when the range name is long in conditinal format dialog
Reproducer steps to see long dialog:
1. Create a conditional format where the range is very long (inserted manually)
2. Home > Conditional formatting
3. Create
4. Scroll and paste the following in the Cell Range > Range:
`N3:AL4,N25:AA25,AC25:AL25,X11:AL11,N6:P7,Q5:AL10,Q12:AL13,N5:N7,O5:P5,N14:AL19,N11:P13,A8:C11,N8:P10,C20:J20,O20:AL20,A20:A27,D27,D10,T21:AL24,A3:K7,A12:K19,H8:K10,H27:K27,A28:K89,N26:AL89,M5,D11:K11,Q11:V11,L3:L89,N21:S22,N24:S24,M23:S23,B21:K26`
5. The title never gets truncated and the dialog is too wide
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ib845bc84a85d90dec87115cdcd10ae8704163081
- Trying to open context menu from a sheet tab also
changes the active tab. This occurs when right click
on a sheet tab (or long tap on mobile or tablet)
- moveLeft and moveRight of inactive tabs are
implemented.
- added _moveSheetLR and _moveOrCopySheet functions.
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I5b25a8cb363b8e04fd6dcec1f500e7ff2982b678
/usr/bin/../lib64/gcc/x86_64-suse-linux/12/../../../../include/c++/12/bits/stl_vector.h:1124:9: runtime error: reference binding to null pointer of type 'char'
#0 0x557ce8c06055 in std::vector<char, std::allocator<char>>::operator[](unsigned long) /usr/bin/../lib64/gcc/x86_64-suse-linux/12/../../../../include/c++/12/bits/stl_vector.h:1124:2
#1 0x557ce8f16e3f in FileUtil::readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int) /home/vmiklos/git/collaboraonline/online-23.05-san/test/../common/FileUtil.cpp:449:37
While running toplevel 'make'. Both 'st.st_size' and 'off' were 0, so
this is an edge case.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I4899bffa48a761c84b6ee7d42776453b641ff5a7
make it bold with large text :-)
and move the exact figures back down to the bottom left
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I950ce3db288d63aef201f0a6274f778f2f05bc14
in practice presumably img can't be null, seeing as currently hasContent
would then be true, then we always deref on calling this._applyDelta
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I48d2466c0a12e4f7084d57a55a963cea469cf2fa
As pointed out at
<https://github.com/CollaboraOnline/online/pull/8041#discussion_r1457933092>,
it's not valid to have a markup like <div><html>...</html></div>.
The old markup was <html><head><meta ...></head>...</html> and that got
stripped away.
Fix the problem by going with <html><body><div ...>...</div></body></html>
which survives browser sanitize and also is a valid HTML.
Both the browser side and the wsd side is updated to go with this
inside-body markup. This also allows simplifying setTextSelectionHTML(),
because the valid HTML means the browser automatically strips the
<style> element whtn converting to plain text. Also remove a leftover
debug code in ClientSession::preProcessSetClipboardPayload() that I
forgot to remove.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Icb0b26a37320ae98237222b450a861ebcb2f0c43
The "logging.html" end point was intended to capture
unhandled javascript exceptions from client side,
only corner cases, when websocket is disconnected or
very early errors before websocket is created.
So add a token to restrict access.
Change-Id: I64b7d7f3b3ddd83f044fea21dc07285b4465b3be
Signed-off-by: Henry Castro <hcastro@collabora.com>
The variable initialization does not depend on
the conditional M4 macro expansion.
Change-Id: I39f0079ea668768724e0ca3175070e66dc858b0b
Signed-off-by: Henry Castro <hcastro@collabora.com>
The iOS app add event listeners is not a
conditional M4 macro expansion, so
move into the global.js file.
Change-Id: I3adb767cc191a73f0d9197af692e22dd72c6ab46
Signed-off-by: Henry Castro <hcastro@collabora.com>
'logServer' to save logging data to server side.
Change-Id: I7e5fd0d0f3aefaade1f34b98f9004af2579ba2bd
Signed-off-by: Henry Castro <hcastro@collabora.com>
Use "fetch()" function to save logging client data
to server side.
Change-Id: I8b6a94b7ad7ae02ca00666759e3695867df4d372
Signed-off-by: Henry Castro <hcastro@collabora.com>
CXXLD unittest
/usr/bin/ld: ../kit/unittest-Kit.o: in function
`Document::updateEditorSpeeds(int, int)':
/opt/shared/work/libreoffice/repo-online/online-cl/test/../kit/Kit.cpp:1488:(.text._ZN8Document18updateEditorSpeedsEii[_ZN8Document18updateEditorSpeedsEii]+0x2d9):
undefined reference to `ChildSession::getSpeed()'
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: If95662647d33f80dd98013b6bc81be897dd6ffc5
cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js's
'Insert hyperlink.' testcase failed with:
assert expected **<p>** to have text **text text1link**, but the text was **@page { size: 8.5in 11in; margin: 0.79in }\t\tp { line-height: 115%; margin-bottom: 0.1in; background: transparent }\ttext text1link**
We typically ignore styles on import (and keep the ones in the document
already), so fix the problem by extracting part of stripHTML() into a
new stripStyle() and use that in setTextSelectionHTML(), which restores
the old behavior when it comes to the plain text version of our current
selection.
The old clipboard marker didn't have this problem, but that got removed
entirely with the new clipboard read HTML sanitize, which is even worse.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id07bf8bc7b1701e53415bde3cf8773411d830e9c
Seeing:
short-circuit, internal paste, new style? true
on the console with this, which will work even after our HTML gets
stripped with the new-style clipboard API.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I74b14a4415fa026cf24909323d23f760997bd392
Tested with an extended version of unit-copy-paste, which will appear in
the next commit.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib15b7918fe678c594e2c345cfca27ba2f1c8b516
The HTML we produce on copy has to go via a sanitize process on paste
once we start using the new clipboard API at
<https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read>.
The trouble is that at least Chrome simply strips away all <meta> HTML
tags, we can no longer recognize our own HTML output, preventing us from
doing a better internal paste.
Fix this by switching to a markup with survives the cleanup: a <div>
around the <html>...</html> fragment.
This just introduces the new markup, doesn't replace the old markup yet.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I75b00d00064ce452a57185c62f4d99a6d052d867