Commit graph

10334 commits

Author SHA1 Message Date
Petr Mladek
1a2549dcdd Revert "Remove License/Credits menu items"
GPLv3 has to be easily accessible. We should not hide it under too many
mouse clicks.

This reverts commit f4c567f8d4.
2012-06-19 14:56:53 +02:00
Stefan Knorr (astron)
f4c567f8d4 Remove License/Credits menu items
The About dialog now houses these functions.

Change-Id: I7f751027564897a063d2910644c69680d471b6d9

Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
2012-06-18 16:34:44 +02:00
Norbert Thiebaud
0ce74a3baa targeted clean-up
Change-Id: I57d56ece9fd59a93d5081a394c3fe8d212290198
2012-06-16 21:00:10 -05:00
Norbert Thiebaud
4651069697 revert gmk4
Change-Id: I0c1f0495358bba6889d48d8bc500f880f7d5179c
2012-06-16 21:00:10 -05:00
Thomas Arnhold
e06d6e3956 hrc cleanup: Remove completely unused RIDs
These RID definitions aren't used at any other point. So remove
them. Unused START and END definitions were commented out for
documentation purpose.

All definitions in basctl/source/basicide/tbxctl.hrc were unused,
so I removed this file.

Change-Id: I4713188a12b9da912b2a91b85ea4e54ca1aeb994
2012-06-15 08:22:09 +02:00
Thomas Arnhold
f8de2166d4 Remove dead code
Change-Id: I65fe534a712ddcdd01b1f393a8244f603e891dc8
2012-06-15 08:22:08 +02:00
Michael Meeks
577cf8ff67 re-base on ALv2 code. 2012-06-14 17:41:07 +01:00
Caolán McNamara
6191fa0847 reduce use of UniString ctor from null-terminated unicodearray
Change-Id: I98361309ada084d8f78517ce88f210d785f59cc0
2012-06-13 11:20:23 +01:00
Caolán McNamara
8f5629fd5a remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
2012-06-11 14:46:46 +01:00
Caolán McNamara
2106d8e648 callcatcher: update unused code
Change-Id: Id5f730fc447b11000b266954f9e7f5287bad02f4
2012-06-11 14:46:45 +01:00
Norbert Thiebaud
aa563ff19f remove unused .mk
Change-Id: I909a659e8ebfae35ca42680a54fa62dbd726adb5
2012-06-08 23:35:56 -05:00
Thomas Arnhold
3770bbbdba Remove superfluous empty lines on top
More than two lines are removed for readability.

Change-Id: Ibff6cf68d7c512e240a54065b54a225bb23a782b
2012-06-09 04:57:58 +02:00
Stephan Bergmann
a519cacd61 -Werror,-Wself-assign (Clang)
Change-Id: I92f1271ad36e4ae1221182a3a446f36cf770e003
2012-06-06 14:07:37 +02:00
Noel Grandin
0fcd1a73f0 fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method URLTransformer::create

Change-Id: I3fd2e838497bcfd8fc949615c0e7d60a6ea47118
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
2012-06-06 10:53:34 +02:00
Noel Grandin
d08578912f fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new SimpleFileAccess::create method

Change-Id: Ie5b0696fe2228a9033b19969245a53c21a61aa14
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
2012-06-06 10:01:22 +02:00
Lionel Elie Mamane
43f9468d35 bCheck is guaranteed by the for loop condition
Change-Id: Ia54eaa5cb1aa8bb4a052cea25396b07f048ff74c
2012-06-04 23:43:41 +02:00
Michael Stahl
1ca20c89c0 KeySet.cxx: fix boost include; also...
... BOOST_STATIC_ASSERT_MSG was added in boost 1.46, while the internal
boost is still at version 1.44, so use BOOST_STATIC_ASSERT instead.

Change-Id: I14f8e48e31956b34a1a907cd2c4e454a5715889b
2012-06-04 20:07:26 +02:00
Lionel Elie Mamane
e581bef6df i#102625 avoid fetching same row twice in different queries
We do a "SELECT * FROM table" just to fetch the primary key columns;
so reuse the same XResultSet to fetch all columns.
Else, we immediately issue a "SELECT * FROM table WHERE
primary_key=current_value" to read the other columns, which is
wasteful and particularly silly.

Commit 1ae17f5b03 already tried
to do that, but was essentially reverted piecewise because
it caused fdo#47520, fdo#48345, fdo#50372.

Commit c08067d6da94743d53217cbc26cffae00a22dc3a thought it did that,
but actually reverted commit 1ae17f5b03.

This implementation fetches the whole current row and caches it in memory;
only one row is cached: when the current row changes, the cache contains
the new current row.

This could be problematic (wrt to memory consumption) if the current
row is big (e.g. with BLOBs) and nobody is interested in the data
anyway (as would often be the case with BLOBs). Note that because of
our "SELECT *", the driver most probably has it in memory already
anyway, so we don't make the situation that much worse.

This could be incrementally improved with a heuristic of not
preemptively caching binary data (and also not LONGVARCHAR / TEXT /
MEMO / ...); a getFOO on these columns would issue a specific "SELECT
column FROM table WHERE primary_key=current_value" each time.

The *real* complete fix to all these issues would be to not do "SELECT
*" at all. Use "SELECT pkey_col1, pkey_col2, ..." when we are only
interested in the key columns. As to data, somehow figure out which
columns were ar interested in and "SELECT" only these (and maybe only
those with "small datatype"?). Interesting columns could be determined
by our caller (creator) as an argument to our constructor, or some
heuristic (no binary data, no "big" unbound data).
Also be extra smart and use *(m_aKeyIter) when getFOO is called
on a column included in it (and don't include it in any subsequent
SELECT).

However, there are several pitfalls.

One is buggy drivers that give use column names of columns that we
cannot fetch :-| Using "SELECT *" works around that because the driver
there *obviously* gives us only fetchable columns in the result.

Another one is the very restrictive nature of some database access
technologies. Take for example ODBC:

 - Data can be fetched only *once* (with the SQLGetData interface;
   bound columns offer a way around that, but that's viable only for
   constant-length data, not variable-length data).

   This could be addressed by an intelligent & lazy cache.

 - Data must be fetched in increasing order of column number
   (again, this is about SQLGetData).

   This is a harder issue. The current solution has the nice advantage
   of completely isolating the rest of LibO from these restrictions.

   I don't currently see how to cleanly avoid (potentially
   unnecessarily) caching column 4 if we are asked for column 3 then
   column 5, just in case we are asked for column 4 later on, unless
   we issue a specific "SELECT column4" later. But the latter would be
   quite expensive in terms of app-to-database roudtripe times :-( and
   thus creates another performance issue.

Change-Id: I999b3f8f0b8a215acb390ffefc839235346e8353
2012-06-04 19:22:48 +02:00
Lionel Elie Mamane
60f5a9d372 Need to refresh row after moving to bookmark!
Change-Id: Ia8d12d02829087309e248506a7d3b0f94b5a425e
2012-06-04 19:22:48 +02:00
Lionel Elie Mamane
d147ade334 Cleanup m_xSet in destructor
Change-Id: I3d7023fcb1857da1ef107a8af0d373b9ca464f03
2012-06-04 19:22:48 +02:00
Lionel Elie Mamane
5e6a233e7b typos in comments
Change-Id: I1dbb1990033602d7909ecdee72b8b699cce44cab
2012-06-04 19:22:45 +02:00
Lionel Elie Mamane
df31ed33b7 Remove wrong optimisation
fixup of d4ae29a37873843c20fe7d5f5f071f8fb201fed9
after the call to m_pCacheSet->absolute_checked, the data *is* used,
so we cannot anymore exempt m_pCacheSet from giving correct data.

Change-Id: I7d3644ca08ce43cb030a80984605a1f8a8a64211
2012-06-04 19:22:45 +02:00
Norbert Thiebaud
b6dc9a8fb8 targeted string re-work
Change-Id: I90c9037b10a288d5d2e36f056c3632c796957fb4
2012-06-02 12:58:05 -05:00
Norbert Thiebaud
cf04745f7a targeted string re-work
Change-Id: I08114529cc6be6148a4f9ee3c89aafaafada77fe
2012-06-02 12:58:04 -05:00
Lionel Elie Mamane
24ea39d726 OKeySet::refreshRow: Invalidate m_xRow/m_xSet when BeforeFirst or AfterLast
Change-Id: I0f48c099eddc077b2a89e3b7fab66b5da55b57c8
2012-06-01 17:03:13 +02:00
Lionel Elie Mamane
e7e21a6fea organise & comment code better
Continuation of commits to fix fdo#48345

Change-Id: Ie28f6a55cd8715a7180f5d88fe23c5b310440744
2012-06-01 17:03:01 +02:00
Lionel Elie Mamane
3c436c2b0c dbaccess::OKeySet::wasNull(): OSL_ENSURE we have a m_xRow
Change-Id: I087d2893d853f431d27c592ba26bdc16e0a9cb84
2012-06-01 17:02:44 +02:00
Lionel Elie Mamane
228c360e7d fdo#47520 use the already retrieved row instead of driver row
This avoids asking the driver for the same data twice.
This is particularly important for ODBC data sources, because when asking for (VAR)CHAR data the second time, one gets no data (and status SQL_NO_DATA) because of the "retrieve in parts" semantics of these datatypes.

Change-Id: I96f2df9927fda72ccf19f78ec5c561f5626c003f
2012-06-01 17:02:10 +02:00
Lionel Elie Mamane
76a74b72db fdo#50372: crash when refresh of last already-known row unexpectedly fails
Instead, try to do the least unreasonable thing:
Fetch a new row
If that fails because no new row to fetch, at least we are properly positioned after last row. Calling code may not expect that and get confused, but that is the best we can do.

Change-Id: Ib7248e99ae3deee8344e9386cac2c9440e8bccd8
2012-06-01 17:01:52 +02:00
Takeshi Abe
d95d58af08 nuke unused namespace
Change-Id: Ic00cdfce4172af0a2f0aa1aa33ef5e386d407976
2012-06-01 01:04:50 +09:00
Michael Meeks
b1ca0f2472 targetted SAL_N_ELEMENTS reversion.
Change-Id: I58636bc87bc17ff2b35621ad554bd05f5c1dab20
2012-05-31 13:09:03 +01:00
Michael Meeks
a0bbb2a1af targetted SAL_N_ELEMENTS reversion.
Change-Id: I181c5b5dd24836ff0398aa5ed03915c2c7c55183
2012-05-31 13:09:03 +01:00
Takeshi Abe
bb9f730458 nuke unused typedef
Change-Id: I8848d0e687c3b19be1a8bc1f41c2a0c94e13bbbf
2012-05-31 01:56:28 +09:00
Matúš Kukan
5b7efe2a7e remove unused makefile 2012-05-29 07:24:43 +02:00
Matúš Kukan
5eff0b6c58 improve odbc headers handling 2012-05-29 07:24:42 +02:00
Julien Nabet
dcd5136b80 Fix typos
Change-Id: I39d54e3f635be6cb7a42fc9a0f7055619c885950
2012-05-28 14:51:14 +02:00
Takeshi Abe
4469eb2068 removed unused member fields
Change-Id: If89fd07ad78bca303a9bf8484f08cba08afffe8d
2012-05-24 22:29:39 +09:00
Caolán McNamara
a16b4676a5 convert ResStringArray to rtl::OUString
Change-Id: I51b86a10caa5da6e12583c2b22404b0d9282b13d
2012-05-24 09:47:40 +01:00
Takeshi Abe
5f2ef2b270 removed unused #defines
Change-Id: I2aeba0342e46c3a4bd50f49b8a43ebb125269dfa
2012-05-21 22:08:18 +09:00
Takeshi Abe
5e3a4ecb0a catch by const reference
Change-Id: I80a26483c4ecd099a1cfe76bdac1e97b947ef104
2012-05-17 22:44:43 +09:00
Takeshi Abe
9902f0ee3d removed unused const rtl::OUString
Change-Id: I7c3409ac39e690fcf2f7e4085bf6857e6bd182fb
2012-05-17 22:44:43 +09:00
Caolán McNamara
5dcf536b69 merge the 5 ConstAsciiString duplicate classes together
a) merge them together and move it into comphelper
b) turn it into a POD rather than having vast amounts
of destructors registered into the cxa_atexit chain

Change-Id: I04d3b9d7804f8e233013c916df9d617a0f84f96a
2012-05-17 14:03:26 +01:00
Takeshi Abe
b2022330c0 removed unused constant rtl::OUString
Change-Id: I173275e0f8faa852500d108f65636080f79636c6
2012-05-16 23:28:22 +09:00
Caolán McNamara
df34ccb01d remove unneeded include of boost/bind.hpp
Change-Id: I5a254459a491b9547530d8e312260dceed21f25c
2012-05-16 15:05:36 +01:00
Lionel Elie Mamane
2ffe693d7e simplify/clarify code 2012-05-15 18:52:21 +02:00
Lionel Elie Mamane
8fca982829 fdo#48345 need to refresh row also when not m_bRowCountFinal 2012-05-15 18:52:12 +02:00
Caolán McNamara
c182a75241 convert GetComment family to rtl::OUString
Change-Id: I563ab83a24ca4f839892548b350486e83dd071d3
2012-05-14 14:34:09 +01:00
Lionel Elie Mamane
3c64839656 fdo#45580 crash on "connect to existing database" wizard 2012-05-08 21:48:34 +01:00
Caolán McNamara
8a0685d49f make ResId::toString a non-static member
Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb
2012-04-30 11:22:09 +01:00
Julien Nabet
e34d9be24e Prefix ++/-- operators for non-primitive types
Change-Id: I827e539c65a7463709af6425d39ccaaedaa73a8d
2012-04-29 16:35:32 +02:00