Age | Commit message (Collapse) | Author |
|
Let's see where it actually will be needed. Sal is a "picky" place for
new API, even inside LIBO_INTERNAL_ONLY.
Change-Id: Ia0c5ee8cfc6ee526c5ad34d2f8aab0b14b5f805b
|
|
LibreOffice code, when used in a program through LibreOfficeKit, needs to be
aware of that in certain crucial spots, to avoid behaviour and functionality
that makes no sense in a LibreOfficeKit scenario. As LibreOfficeKit uses a
normal LibreOffice installation to perform its job, this can't be a
compile-time choice. Also, none of the existing run-time "headlessness" modes
fully match what is needed.
Change-Id: Iaccf7f958c549f019b508854800519f54dcadb11
|
|
Change-Id: Id28046eb318cd3b2ed0b813fd266617547cf6ee2
|
|
This fixes up 3d403f2af2e5b7d26254d45590764f279450fab6, by not
removing public API.
Change-Id: I60a4b7284661238bdf32a1600f27a7e507c5374a
|
|
This was unused since the earlier cleanup.
Change-Id: Ia56641c4242037a0ce501e43939b8dc862499f0e
|
|
We cannot call osl_setCommandArgs twice, however there is currently
no way to determine whether or not this has already been done. This is
necessary e.g. for LibreOfficeKit where we may also be using UNO
separately (and also for unit tests where LO is already set-up prior
to the unit test running, and therefore we can't set up osl again
from within LOK).
Change-Id: Id1f357ef604eb2b6b7814c9a04ac6933a39fd3eb
|
|
...so that utl::TempFile can pass osl_File_OpenFlag_Private and doesn't have to
resort to umask (the calls to umask around Directory::create had somewhat
erroneously been removed recently with 1d72a0262c4570631d0aa8f98e34e21fb9d6ae42
"Related fdo#60338: Create missing temp file dir with user's original umask,"
mistaking this for creation of intermediate directories in the hierarchy).
On Windows, the flags argument to osl_createDirectoryWithFlags is ignored
completely for now.
Change-Id: Iac56a5049d579be729a3f338aa62105123edb6cb
|
|
...introduced with a64db11b6ca1c0c99937cd99129758dbbe575ac2 "Add some non-public
API to be used by SvFileStream" and e541105b45d5da8df296883111194e3a0297a2e7
"Use osl API to access files in the SvFileStream code" but subsequently
identified as dead code with ab02fa6552fb098990e74f2787cf02b01c0e532b
"callcatcher: update list," 05a8216d03b5db559e01dd1808f2805df31c970a
"STAR_ENABLE_FILE_LOCKING was a secret," and
1d3483ed279982278b2f9fb1bab63485523e48c5 "Remove some unused code from
unusedcode.easy."
Change-Id: I9c8584890270a87e58b8d8021080ffe54bc97b93
|
|
Change-Id: I36734b0e5e1c0b15ed4f0845450b444b23579ffe
|
|
Change-Id: I248d002d2ed0e61f97a35ea0d329c64832252ad7
|
|
OpenCL devices require this else we would get a performance hit.
Change-Id: I6b1db6320fa84f933b6446022a0fd02ba267bf21
|
|
8f8bc0dcf3bc253ae49159d52db049767f476ced "Move string hash function into String
class" had introduced a new getHash64 that, besides returning sal_uInt64 instead
of just sal_Int32, didn't do sampling of only a handful of characters, but
always computed the hash over all characters (as the usage in SfxItemSet and
SdPage appears to require for either performance or approximated correctness).
However, it would be advantageous to keep the stable URE interface as small as
possible. Now, O(1) sampling was apparently considered state of the art when
the rtl string classes were first created, closely copying java.lang.String,
which at that time demanded sampling for hashCode(), too---but never sampling
more than 15 characters, with the obvious (in hindsight, at least) performance
catastrophes, so they changed it to O(n) somewhere along the way.
Based on that, this commit changes the existing hash functions to not do
sampling any more, and removes the newly introduced -64 variants again. (Where
the extended value range of sal_uInt64 compared to sal_Int32 was hopefully not
vital to the existing uses.)
The old implementation used sampling only for strings of length >= 256, so I did
a "make check" build with an instrumented hash function that flagged all uses
with inputs of length >= 256, and grepped workdir/{Cppunit,Junit,Python}Test for
hits. Of the 2849 hits encountered, 2845 where in the range from 256 to 295
characters, and only the remaining four where of 2472 characters. Those four
were from CppunitTest_sc_subsequent_filters_test, importing long text into a
cell, causing ScDocumentImport::setStringCell to call
svl::SharedStringPool::intern, which internally uses an unordered_set. These
results appear to justify the change.
Change-Id: I78fcc3b0f07389bdf36a21701b95a1ff0a0d970f
|
|
Change-Id: Ibebf394d69ed4845d91176727f291187ba35ed34
|
|
hashCode() seems to do sampling while creating the hash.
hashCode64() will not.
Change-Id: Id30f5a2a774cf5244dbc00da9649e95a532484be
|
|
...which has become necessary since bd60d41176da540b01d7583cfe00637431967f39
"Handle oveflow in O(U)String::toInt() functions" reduces values in the range
(SAL_MAX_INT32 .. SAL_MAX_UINT32] to zero, but some calls of toInt32(16) relied
on getting a correct (unsigned) value for the whole input range ["0" ..
"FFFFFFFF"] (see libreoffice-4-1 commit 9bf6c83367cedb7be81bf67f30d2147d26c7a8c3
"Revert overflow checks in O[U]String::toInt{32,64} again").
Audited all uses of toInt32/64 with non-decimal radix. (There is still a TODO
comment in oox/source/helper/attributelist.cxx, and
stoc/source/typeconv/convert.cxx will still need some love and test code.)
Change-Id: Iadaca1c0e41dab553687d0ce41c20c10cd657a95
|
|
Change-Id: Ic908cb5cc9169ab1baae2c1c52070adfb9afba39
|
|
Change-Id: I2051e161219d424d2c2b69faf6f939cfe21fa5f7
Reviewed-on: https://gerrit.libreoffice.org/1980
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
|
|
- add sal_uInt64 valueOf helper to handle its full value range
- group deprecated valueOf() together
- forward to the number() taking the largest type instead of repeating
the same code every time
- various doc improvements:
- add missing @since
- do not refer to non-existent number() overloads in docs
- "use number" - "huh, of course I use a number?"
- "code your own" - my own function? why?
- + or += operators are not, strictly speaking, replacements for valueOf()
Change-Id: Ib138a06c4ac4365cfffc534e6ab115d55180a70d
|
|
No point in hidding something useful like this in some helper lib.
Change-Id: I7332d7f6bd428378cd19e7e95ad130771a541140
|
|
Ensure there will be enough extra space in a string, to be used for string
appending. A bit like rtl_(u)String_newConcat(), but without the function
actually appending anything. Unlike the stringbuffer variant this does
not allocate any extra.
Change-Id: Ic6f84bf014a713f9912c81d8f1405c593978822d
|
|
There will be no 3.7.
Change-Id: Ib2808aa259baaa7eac42c7ec7a640105fc8c07a1
|
|
We don't want to change sal SONAME just yet.
Change-Id: I3a9de9a53a4ba845c00a26450e281534ca5d97f6
|
|
osl::semaphore was not portable & thusly long-deprecated. Also
killing further unused clients of that code in salhelper.
Change-Id: Ie1c1924e06e8ce3be33fd1dc2c6933f2de8b5217
|
|
Patch contributed by Herbert Duerr:
#i118662# remove berkeleyDB from module xmlhelp (author=orwitt)
http://svn.apache.org/viewvc?view=revision&revision=1213188
#i119141# remove ISCII converter for now
http://svn.apache.org/viewvc?view=revision&revision=1306246
make exceptions for cppunittester verbose
http://svn.apache.org/viewvc?view=revision&revision=1174831
Patches contributed by Pedro Giffuni:
Avoid some uses of non portable #!/bin/bash in shell scripts.
http://svn.apache.org/viewvc?view=revision&revision=1235297
Patch contributed by Oliver-Rainer Wittmann
88652: applied patch, remove unicows deps
http://svn.apache.org/viewvc?view=revision&revision=1177585
drop OS/2 code, remove in-line assembler ARM atomics,
and obsolete armarch header.
|
|
This method will be needed for forthcoming String->OUStringBuffer
conversions.
Change-Id: I001099baaca5cd402aebcd15c031d9060286a8f9
|
|
Change-Id: Ib5da7703bf48713093bc6a3380facafd0013e039
|
|
Change-Id: I03bb4db5931932280e368012cbaee6bef2854dd6
|
|
...as sal_textenc lib is not part of stable URE interface.
Change-Id: I5aeacd7668cca36f900aede4012d508217f3ab46
|
|
Unfortunately this --enable-dbg-util only problem (caused by
_GLIBCXX_DEUBG) resurfaced, perhaps because of new std::string based
logging in sal; adapt all map files to export the unique symbol.
|
|
Avoid ref/unref pair in makeStringAndClear, hook into the
stringbuffer-like 'String' class to expose it's conversion to
immutable strings, and fixup misc. missing instrumentation.
|
|
|
|
|
|
Drop the recently introduced rtl_uString_newFromAscii_WithLength()
and replace it with this one. The name fits better and it'll be also
a distinct function that specifically includes embedded \0's
(because that's what OUString supports and if a string literal
explicitly includes it, it makes sense to copy it as such).
|
|
|
|
|
|
Added:
* rtl::OString::matchL
* rtl::OString::endsWith
* rtl::OString::endsWithL
* rtl::OString::indexOfL
* rtl::OString::replaceFirst
* rtl::OString::replaceAll
* rtl::OString::getToken
* rtl::OUString::endsWith
* rtl::OUString::replaceFirst
* rtl::OUString::replaceFirstAsciiL
* rtl::OUString::replaceFirstAsciiLAsciiL
* rtl::OUString::replaceAll
* rtl::OUString::replaceAllAsciiL
* rtl::OUString::replaceAllAsciiLAsciiL
* rtl::OUString::getToken
plus underlying C functions where necessary
Deprecated:
* comphelper::string::remove
* comphelper::string::getToken
Removed:
* comphelper::string::searchAndReplaceAsciiL
* comphelper::string::searchAndReplaceAllAsciiWithAscii
* comphelper::string::searchAndReplaceAsciiI
* comphelper::string::replace
* comphelper::string::matchL
* comphelper::string::matchIgnoreAsciiCaseL
* comphelper::string::indexOfL
Also fixed some apparent misuses of RTL_CONSTASCII_USTRINGPARAM ->
RTL_CONSTASCII_STRINGPARAM.
|
|
|
|
also expose in-memory file method for unit testing.
|
|
Windows impl. still pending.
|
|
|
|
A temporary tweak to restore build-ability; the oslDirectory
change needs a little more thought & public exposure, but rsc
no longer crashes during compile ...
|
|
Having SvFileStream call the file opening etc functions here, instead
of calling open() directly itself, means we won't have to duplicate
the Android .apk hooks there, too.
|
|
|
|
|
|
|
|
|
|
On Android, when an app is installed, arbitrary files bundled in the
app won't be unpacked into actual separate files in the file
system. They will exist only as archive entries in the .apk file
(which is a zip archive).
The SDK tooling puts such files under the /assets folder in the
.apk. The LibreOffice bootstrapping code for Android maps the .apk
file into memory.
osl_openFile() knows about the /assets special case, and uses a
separate abstraction for such memory-mapped files.
Obviously, when producing an .apk, one needs to make sure these
bundled files are not compressed, if one wants to be able to use them
directly from the memory-mapped .apk file. We do that in our test and
sample Android projects.
When mapping such files under /assets , just return a pointer to the
file's location inside the mapped .apk archive.
We can't use the old osl_unmapFile() on such mapped files, as that
would unexpectedly unmap fairly arbitrary pages of the .apk mapping,
wreaking havoc on later use of the same pages.
So, introduce a new osl_unmapMappedFile() function that takes also the
oslFileHandle originally passed to osl_mapFile(). Use this instead in
the few places where the code actually called osl_unmapFile(). Make
sure osl_mapFile() is nonexistent on Android.
|
|
|
|
|
|
|