Commit Graph

162 Commits

Author SHA1 Message Date
104a7bab58 -Werror,-Wdeprecated-register
Change-Id: I1ec3d7845477cfb5bc6a3d7f70ddabef12583e1b
2013-06-20 10:54:20 +02:00
008147e805 mingw64: use the sal formatting strings in store
Change-Id: Id6b8f4ed6df14bd80a7937001ec1cfb98acd7f52
2013-06-10 14:03:35 +02:00
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
937b63af33 use startsWith() instead of compareToAscii()
brain damage...

Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff
2013-03-11 11:07:09 +01:00
e4b99f5d44 Use BOOST_STATIC_ASSERT
Change-Id: Ib9dc2541c3bf72ddd6094331297a91352138e5af
2013-03-09 12:49:26 +01:00
36a2db3722 Replace usage of rtl_*Memory with equivalent from string.h
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159
Reviewed-on: https://gerrit.libreoffice.org/734
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-10-01 18:48:05 +00:00
195f17ee40 migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomic
Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0
Reviewed-on: https://gerrit.libreoffice.org/632
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-17 14:26:12 +00:00
b42094b2b0 remove use of SAL_MIN() macro
Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
2012-09-14 03:49:21 -05:00
4c4d748767 Remove some more include guards
Change-Id: I7c62d086cb593744785abecae7a107686a4d65ce
2012-06-29 09:25:10 +02:00
e18655e475 re-base on ALv2 code. 2012-06-27 19:30:33 +01:00
b9042fad7c re-base on ALv2 code.
Change-Id: I6c145e984c885c7e06caa1c27bfb354ea49ad9ce
2012-06-21 15:00:05 +01:00
d76c3f3abd gbuild conversion: store module
Change-Id: Idbab17b87d042079a8fa6ded7a7424a745761b2f
2012-05-07 06:55:30 +02:00
a0d6c5dd9b WaE: MSVC2008 C4530 exception handler without unwind semantics 2012-04-24 11:56:49 +01:00
5cfea7f885 Make default zero-initialization explicit
...to match style used for other data members.
2012-03-23 17:37:33 +01:00
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
6e67c03dc0 Enable -Wnon-virtual-dtor for GCC 4.6
...which has the necessary features to support it.

Change a lot of classes to either contain a protected non-virtual dtor
(which is backwards compatible, so even works for cppumaker-generated
UNO headers) or a public virtual one.

cppuhelper/propertysetmixin.hxx still needs to disable the warning, as
the relevant class has a non-virtual dtor but friends, which would still
cause GCC to warn.

Includes a patch for libcmis, intended to be upstreamed.
2012-03-14 13:32:02 +01:00
51b85a38b0 Simplification 2012-01-31 08:51:33 +01:00
7c704c78d3 Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones.  To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
2012-01-21 15:21:16 +01:00
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
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
06483141ed remove include of pch header from store 2011-11-27 13:23:56 -06:00
be6a8677a6 OSL_TRACE: Remove trailing newlines
Done with perl regex:
s/(\n\s*OSL_TRACE\(\s*\"[^\n]+?)\s*(\\n)+(\"[^\n]*\)\;\n)/$1$3/gs;

- removed trailing whitespaces and (multiple) newlines
2011-09-21 09:28:39 +02:00
6f94c644c3 [cppchecker] suppression of unread Variable 2011-09-06 22:40:50 +02:00
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
95012b599b Remove RCS information 2011-02-01 18:22:56 +01:00
219fe91ce2 Update from sibling repository. 2010-11-25 16:04:27 +01:00
bb4f6eede9 #i115784# store: fix memory errors uncovered by valgrind and other tools. 2010-11-25 14:18:45 +01:00
c189268e0a remove non-compiled code 2010-10-18 16:25:47 +01:00
0196e3b7eb use SAL_N_ELEMENTS macro 2010-10-17 00:04:57 -05:00
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
bcdb4cc866 more removed include guards using fixguard.py 2010-10-05 18:12:52 +02:00
334bef4563 remove include guards using fixguard.py 2010-10-05 18:12:51 +02:00
0ecedc1be8 Update from master repository (DEV300_m76). 2010-04-09 16:11:26 +02:00
2812fa1b8e Update from master repository (DEV300_m75). 2010-03-22 17:02:50 +01:00
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
6d03994e21 mhu22: resync to master repository (DEV300_m73). 2010-03-04 19:36:24 +01:00
709ee7e9b0 mhu22: #i105430# #i108349# Fixed registry:ORegKey reference counting to avoid redundant closeKey()/flush() calls. 2010-03-04 15:19:41 +01:00
eb4c085971 #i108349# Added missing statement (compiler warning). 2010-01-18 16:09:06 +01:00
a064da5efa Update from master repository (to m67). 2009-12-09 19:54:38 +01:00
98e1ea0d79 #i71568# #i108349# Fixed copyright header. 2009-12-09 19:34:40 +01:00
4fc9020033 Fixed copyright header. 2009-12-09 19:34:40 +01:00
28f980a359 Fixed copyright headers. 2009-11-13 16:09:43 +01:00
00075d74ee #i71568# #i108349# Simplified block (page) allocation. 2009-11-13 16:03:20 +01:00
eda892d102 #i71568# Simplified block (page) allocation. 2009-11-13 16:03:20 +01:00
5243a9ef4e #i71568# #i108349# Remove unnecessary flush(), more cleanup. 2009-11-10 15:55:03 +01:00
cb64816b16 #i71568# Remove unnecessary flush(), more cleanup. 2009-11-10 15:55:03 +01:00
c386a69ea7 cmcfixes66: #i106675# silence gcc's memset warning on 0 len when the len really is 0 2009-11-06 11:12:51 +00:00
d886d389f1 #i71568# #i108349# Remove unused StateBlock code. 2009-11-02 19:09:43 +01:00
acad6899db #i71568# Remove unused StateBlock code. 2009-11-02 19:09:43 +01:00
aa4b05bffb #i71568# #i108349# Remove unused range locking code. 2009-10-29 16:00:34 +01:00