Commit Graph

26 Commits

Author SHA1 Message Date
Noel Grandin
bc30f938c0 use SimpleReferenceObject in stoc module
to replace hand-rolled version

Change-Id: I30635aec81313e4e0d1b67b30c8992fd63bb1f67
2014-07-10 11:04:13 +02:00
Tor Lillqvist
bc1a0a8382 WaE: C4754
VS 2013 warns: Conversion rules for arithmetic operations in the
comparison mean that one branch cannot be executed.

Change-Id: I85f6df16b0ced94677568441d87a588bed1bfb9b
2014-07-08 00:18:44 +03:00
Michaël Lefèvre
70e744b215 fdo#43157 Remove OSL_POSTCOND, prefer SAL_WARN_IF
Change-Id: Ia89a2dce799c7ba90bcd19919195bfd2c7a4a180
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-12 11:32:38 +02:00
Stephan Bergmann
b323e635ee Clean up unreferenced functions
Change-Id: I1dbb864d030b61417f6d137fc967f158e9243ed7
2014-04-04 10:05:57 +02:00
Stephan Bergmann
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Alexander Wilms
d39d80a526 Remove visual noise from store
Change-Id: I6753eb480618af747ecf4a3ae3c666257761ce70
Reviewed-on: https://gerrit.libreoffice.org/8317
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-02-27 03:51:41 -06:00
Stephan Bergmann
6f607b5385 bool improvements
Change-Id: Ibc5e3084e4bec40005779854ce7552a2eb39a7ed
2014-01-28 20:26:21 +01:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Thomas Arnhold
937b63af33 use startsWith() instead of compareToAscii()
brain damage...

Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff
2013-03-11 11:07:09 +01:00
Thomas Arnhold
4c4d748767 Remove some more include guards
Change-Id: I7c62d086cb593744785abecae7a107686a4d65ce
2012-06-29 09:25:10 +02:00
Michael Meeks
e18655e475 re-base on ALv2 code. 2012-06-27 19:30:33 +01:00
Stephan Bergmann
5cfea7f885 Make default zero-initialization explicit
...to match style used for other data members.
2012-03-23 17:37:33 +01:00
Catalin Iacob
6776cb6f9c Initialize m_hFile in FileMapping constructor.
GCC gives the following warning which breaks compilation when using --enable-werror:
lockbyte.cxx: In function 'storeError store::FileLockBytes_createInstance(rtl::Reference<store::ILockBytes>&, rtl_uString*, storeAccessMode)':
lockbyte.css:512:37: error: 'prephitmp.221' may be used uninitialized in this function [-Werror=uninitialized]
lockbyte.cxx:906:1: note: 'prephitmp.221' was declared here

It's not clear from GCC's message, but what it warns about is
FileMapping::m_hFile. This is because of the following sequence:
* xMapping.release() makes xMapping.m_value be a default constructed
  FileMapping
* the xMapping local variable in store::FileLockBytes_createInstance
  gets destructed
* ~ResourceHolder() calls ResourceHolder::reset
* ResourceHolder::reset() calls FileMapping::UnmapFile::operator()
  passing m_value as rMapping
* FileMapping::UnmapFile::operator() uses rMapping.m_hFile but
  rMapping is a default constructed FileMapping and therefore has
  m_hFile uninitialized

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>:
To me, this looks more like a compiler error.  Also note that
ResourceHolder::reset only calls FileMapping::UnmapFile::operator() if tmp !=
value, which is not the case here, as both tmp and value are default-
constructed.  And FileMapping::operator!= is carefule not to use the potentially
uninitialized m_hFile.  But always intiializing m_hFile is probably not a bad
idea, anyway.  And if it helps a certain compiler, all the better.
2012-03-23 09:00:09 +01:00
Caolán McNamara
e596df57b5 valgrind: have MappedLockBytes take complete ownership of the file handle
have MappedLockBytes take complete ownership of the file handle and
unmap it and close it on release. Otherwise xFile will close it
and MappedLockBytes will unmap it in that order, which breaks
post android requirement to have a valid file handle in unmap
2012-01-10 12:36:03 +00:00
Tor Lillqvist
e3ab0fd901 osl_unmapFile can't work for files bundled inside the .apk on Android
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.
2011-12-21 14:08:48 +02:00
Norbert Thiebaud
06483141ed remove include of pch header from store 2011-11-27 13:23:56 -06:00
Jan Holesovsky
4be7cca60b Merge commit 'ooo/DEV300_m103'
Conflicts:
	codemaker/source/bonobowrappermaker/corbaoptions.cxx
	codemaker/source/cppumaker/cppuoptions.cxx
	codemaker/source/cunomaker/cunooptions.cxx
	codemaker/source/idlmaker/idloptions.cxx
	codemaker/source/javamaker/javaoptions.cxx
	cppu/source/typelib/typelib.cxx
	idlc/source/options.cxx
	offapi/com/sun/star/util/PathSubstitution.idl
	offapi/drafts/com/sun/star/form/ListEntryEvent.idl
	offapi/drafts/com/sun/star/form/XBindableValue.idl
	offapi/drafts/com/sun/star/form/XListEntryListener.idl
	offapi/drafts/com/sun/star/form/XListEntrySink.idl
	offapi/drafts/com/sun/star/form/XListEntrySource.idl
	offapi/drafts/com/sun/star/form/XValueBinding.idl
	registry/tools/checksingleton.cxx
	registry/tools/options.hxx
	registry/tools/regcompare.cxx
	registry/tools/regmerge.cxx
	sal/cppunittester/cppunittester.cxx
	sal/osl/unx/socket.c
	sal/osl/w32/diagnose.c
	sal/prj/d.lst
	sal/rtl/source/alloc_fini.cxx
	sal/rtl/source/alloc_global.c
	sal/rtl/source/makefile.mk
2011-03-23 16:59:59 +01:00
Matthias Huetsch [mhu]
bb4f6eede9 #i115784# store: fix memory errors uncovered by valgrind and other tools. 2010-11-25 14:18:45 +01:00
Sebastian Spaeth
a715e1b3d0 Add vim/emacs modelines to all source files
Fixes #fdo30794
Based on bin/add-modelines script (originally posted in mail
1286706307.1871.1399280959@webmail.messagingengine.com)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-14 17:04:31 +02:00
Matthias Huetsch [mhu]
6d03994e21 mhu22: resync to master repository (DEV300_m73). 2010-03-04 19:36:24 +01:00
Matthias Huetsch [mhu]
709ee7e9b0 mhu22: #i105430# #i108349# Fixed registry:ORegKey reference counting to avoid redundant closeKey()/flush() calls. 2010-03-04 15:19:41 +01:00
Jens-Heiner Rechtien
7c80db2eb3 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Matthias Huetsch [mhu]
aa4b05bffb #i71568# #i108349# Remove unused range locking code. 2009-10-29 16:00:34 +01:00
Oliver Bolte
b76cb86eaa CWS-TOOLING: integrate CWS mhu20
2009-09-01 15:18:43 +0200 mhu  r275662 : #i32526# Fixed missing includes, and a wrong cast
2009-08-28 13:30:05 +0200 mhu  r275530 : #i32526# Fixed missing includes and remaining merge conflicts.
2009-08-28 13:28:45 +0200 mhu  r275529 : #i32526# osl_readLine() now implemented in sal/osl/<platform>/file.cxx
2009-08-26 19:47:53 +0200 mhu  r275445 : CWS-TOOLING: rebase CWS mhu20 to trunk@275331 (milestone: DEV300:m56)
2009-08-25 15:47:00 +0200 mhu  r275365 : #i32526# Also maintain phys. file offset.
2009-08-25 15:24:56 +0200 mhu  r275364 : #i32526# Added buffered file I/O; refactored file.cxx into multiple files.
2009-08-24 10:38:15 +0200 mhu  r275294 : #i32526# Correct OpenFlags for osl_openFile().
2009-05-25 11:07:34 +0200 mhu  r272225 : #i32526# Added support for non-seekable file handles (pipe et al.).
2009-05-25 11:01:50 +0200 mhu  r272223 : #i32526# Add osl_readLine() test, cleanup obsolete tests.
2009-05-25 10:56:14 +0200 mhu  r272221 : #i32526# Add missing include
2009-05-25 10:48:51 +0200 mhu  r272220 : #i32526# Accept OpenJDK (IcedTea6) 1.6.0_0 version string
2009-05-15 19:18:20 +0200 mhu  r271965 : #i32526# Initial osl/unx buffered file I/O implementation.
2009-05-15 17:41:57 +0200 mhu  r271959 : CWS-TOOLING: rebase CWS mhu20 to trunk@271830 (milestone: DEV300:m48)
2009-03-26 17:28:53 +0100 mhu  r270091 : CWS-TOOLING: rebase CWS mhu20 to trunk@270033 (milestone: DEV300:m45)
2009-09-09 09:38:41 +00:00
Release Engineers
ad6387ed0a #i10000# additional files for mhu17 2009-03-20 15:07:51 +00:00
Vladimir Glazounov
cbedb24048 CWS-TOOLING: integrate CWS mhu17
2009-01-23 14:08:09 +0100 mhu  r266816 : CWS-TOOLING: rebase CWS mhu17 to trunk@266428 (milestone: DEV300:m39)
2009-01-16 17:49:37 +0100 mhu  r266442 : #i98151# Migration to subversion.
2009-01-16 17:48:53 +0100 mhu  r266441 : #i98151# Migration to subversion.
2009-01-16 17:47:56 +0100 mhu  r266440 : #i98151# Migration to subversion.
2009-03-13 15:52:34 +00:00