Glow effect is a color-blurred outline outside of the shape. In ooxml
document it is specified with the <a:glow> element.
The commit contains the following:
- Add support for importing and exporting <a:glow> from ooxml documents.
- Assign new properties to XShape which stores glow-related attributes.
- A new 2D primitive is introduced in module 'drawinglayer' which is
responsible for representing the glow primitive which is to be rendered.
+ A glow primitive is a clone of the original shape which has been
scaled up slightly and a new color has been assigned to it. The
radius of the glow effect and the color is defined in the <a:glow>
element being imported.
- A blur algorithm is introduced in module 'vcl', which is called during
rendering the primitive.
+ The blur algorithm works on a bitmap.
+ Since the algorithm is CPU-intensive, the result is cached in the
processor and it is recalculated only if needed.
- Add support for importing and exporting glow effect to ODF format. For
that, new attributes of element <style:graphic-properties> has been
added:
+ loext:glow, which can have the values "visible" or "hidden"
+ loext:glow-radius: which holds the radius of the glow effect in cm.
+ loext:glow-color: holds the color of the glow effect
- Tests have been added to assert properties after pptx import and
export.
Change-Id: I836aeb5e0f24e2c8d5725834c8c0f98083bc82e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89125
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Add test for imporing custom label field of type "PERCENTAGE" from a
pptx document.
Change-Id: Ide6baa95d07836cafb97efc9c00ec2ab224a1d1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86109
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Add test for deprecated custom-label-field attribute of the data-point
element.
Change-Id: I9a7619898fa72900323e5b41728d2146c14203e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86103
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Support importing ooxml charts with a field of type "PERCENTAGE" as
custom label.
Change-Id: Ie8931f77e3b6199d98635422d11d776e675f6e5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86067
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Use the chart:data-label element instead of using the
loext:custom-label-field attribute.
chart:data-label stores can be a child of chart:data-point and it may
contain a text:o element for holding one or more paragraphs of custom
label text.
This commit aims to export and import chart:data-label with paragraphs
put into different text:span elements. These span elements may hold a
text:style-name attribute in order to achieve formatted text.
This structure is already in the ODF format.
Change-Id: I0bea7ce1a16af9c47b33555e18545bdaae7e95ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85659
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
OOX import supports custom label texts in chart diagrams (produced by
e.g. double clicking on a data label, and write custom text), but -
since embedded objects are exported and imported to odf right after migration -
it is not displayed in case of a Writer document.
In order to make it work, we have to support custom label text in the
odf structure. This commit only allows the import/export of pure text,
it should be improved to store and load formatted string.
A new XML token is added, which currently refers to an attribute of the
chart:data-point tag. If we want to store formatted string, something
more clever has to be done.
Change-Id: I80c4a3a0dbcf59f1dc732d795fb716da318411cb
Reviewed-on: https://gerrit.libreoffice.org/80156
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
to center when importing oox document.
Using MS Office, the default aligment of a (text) paragraph
inside a shape is centered.
Change-Id: Id9bcaaab109df65f4124f733b2cfee438e82b79b
Reviewed-on: https://gerrit.libreoffice.org/83193
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
The TextPreRotateAngle property should be set in case of a not preset
custom shape as well during ooxml import.
Also add unit test for testing the TextPreRotateAngle property.
Change-Id: Ib5b822286f8a78fe8398bf7e2014a36d7e0a24d5
Reviewed-on: https://gerrit.libreoffice.org/82643
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Add unit test for importing custom date field (<c:fld> element of type
"datetime")
Change-Id: Ifcb5641c99eeb79afe54b801750e68792880c000
Reviewed-on: https://gerrit.libreoffice.org/81682
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
This charset is backward compatible with 'normal' utf-8.
Change-Id: I4407894bf9029b9c56eb0d2530796e85bd226591
Reviewed-on: https://gerrit.libreoffice.org/78650
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Without setting this sql_mode, NULL or 0 inserted to an auto-incremented column
of a prepared statement would cause that to be auto generated.
Setting NO_AUTO_VALUE_ON_ZERO allows us to copy/paste auto-incremented
columns which may contain zero values as well.
Change-Id: I9602746371c75c82c99ff63240025e8cfb03776a
Reviewed-on: https://gerrit.libreoffice.org/78560
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Fix copy/paste functionality when trying to paste a table with auto
incremental column in it. In that case we should let the DBMS handle the
values in that column.
Change-Id: Ia40a0056402ec540f469b94694629dd6db7d4e71
Reviewed-on: https://gerrit.libreoffice.org/78298
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
In case of a MySQL direct connection the current schema in use cannot be
queried with the getUserName() method of the DatabaseMetadata interface,
because the user name and the schema name can (and usually do) differ.
Instead, we can always query for the current schema with the DATABASE()
SQL function.
Change-Id: Ibb026519e1a63e29c5a7c9b04ab64901faec0f85
Reviewed-on: https://gerrit.libreoffice.org/78297
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Test setting and querying the following data types:
TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT
Test them using prepared statements.
Change-Id: I43387034ad8c32c3731cde70a22cc8b3dd652b78
Reviewed-on: https://gerrit.libreoffice.org/76747
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Fix queries like "IsAfterLast" in result sets of prepared statements in
the mysql driver.
Cursor position is stored in the driver, since the mysql C driver does
not support the query of the cursor position.
The cursor position works the following way:
- 0 means the cursor is on "BeforeFirst". In that state calling of
getXXX() methods is user error.
- 1 means the first row is already fetched.
- n means the last fow is fetched, where n is the total number of rows
in the result set.
- Everything bigger than n is "AfterLast"
Change-Id: I131f2042606897019cc0f868dbc4151faf4850ac
Reviewed-on: https://gerrit.libreoffice.org/76549
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
There are two options related to character sets when attaching or
creating a database with the C API:
- isc_dpb_lc_ctype: Sets the character set of the connection between the
Firebird server and the Client (which is the sdbc driver in that case).
That is required in order to pass UTF 8 literals correctly.
- isc_dpb_set_db_charset: Sets the default character set of the database
itself. It has the same effect as the following SQL statement:
ALTER DATABASE SET DEFAULT CHARACTER SET <Charset>
We need to set both of them to UTF-8.
Change-Id: Ia9e5a4b87a3997c084be8abb68c2de813fbd631b
Reviewed-on: https://gerrit.libreoffice.org/75557
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
Handle numerical and decimal values separately. In order to do that
we have to indentify the exact type first. That can be achieved using
sqltype and sqlsubtype in Firebird API.
Change-Id: Ie664dead51bae5522ee53009cda1cddbe0d64b16
Reviewed-on: https://gerrit.libreoffice.org/75525
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
... for easier maintenance. This commit only introduces the
framework. Follow up commits will update the license file.
Advantages:
* single source, multiple outputs (html, txt)
* conditional text, i.e. output will not include license
terms of components that are not configured in the build
Change-Id: I0ffad41119228a0a26fd1b6ce19930ca6085adb2
Reviewed-on: https://gerrit.libreoffice.org/69396
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
No "PRIMARY KEY" keyword is needed, when composing a parsed sql which
did not contain any primary key definition.
Change-Id: Ife8b898806edba41a52d47dc04b1170606ea8aae
Reviewed-on: https://gerrit.libreoffice.org/67379
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Also add test for inserting and reading timestamp values.
Change-Id: I2ba997c438f4e33965b0fe0602e58eddeff38b01
Reviewed-on: https://gerrit.libreoffice.org/67066
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
.. should move the cursor backwards to beforeFirst position and return
false.
Change-Id: Icbb4bed0ea39ea3a0bf375d5616e3ef768fc69d9
Reviewed-on: https://gerrit.libreoffice.org/66729
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
It fixes the issue that one could not call getXXX on a result set
on which next() method was never called before.
Change-Id: I972bb9d475d192a14ba1534dcbdac81c20f211d0
Reviewed-on: https://gerrit.libreoffice.org/66404
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Comparing mysqlc terminology (INFORMATION_SCHEMA) with the description
of the XDatabaseMetadata interface:
- columns with name "REFERENCED_*" (INF_SCHEMA) should be used for primary key
attributes (sdbc terminology).
- columns without any prefix (INF_SCHEMA) should be used for primary key
attributes (sdbc)
Change-Id: Id9780fd86834441485da927f85b9446c40951fcf
Reviewed-on: https://gerrit.libreoffice.org/66213
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
..method XDatabaseMetadata::getTables() so it will return only those types
which are needed. This solves the problem that no tables appear in
"Relations.." window.
Change-Id: Ia02537c78917583f574ad788098c65a9acd43078
Reviewed-on: https://gerrit.libreoffice.org/66212
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Correct query of the foreign key constraint name is required for
dropping foreign keys.
Change-Id: Id98b0672ec5a8a06039667a06cb0afd97b3ee205
Reviewed-on: https://gerrit.libreoffice.org/65861
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
In order to allow fetching result of multiple result sets at time same
time, all the data is fetched and copied on demand from the mysql result
set. The mysql result set (MYSQL_RES) is freed afterwards.
That means we need a copy of the meta information as well. Now all the
meta data is stored in the driver for each result set, so it does not
depend on the MYSQL_RES structure anymore.
Also add test case for invoking some meta data queries before and after
fetching the result set.
Change-Id: Ie8bf993926ebe89cd362ab0b311d1f3d164b84df
Reviewed-on: https://gerrit.libreoffice.org/65717
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Result set field information should be stored correctly. It is queried
from database on demand and stored locally.
Change-Id: Ia62c62e6db32b45640b9fcd5f48c6249aecc41a2
Reviewed-on: https://gerrit.libreoffice.org/64861
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
XResultSet::next() should move cursor when called while cursor is on the
last position. It is not documented, but older versions of the mysqlc
extension are implemented that way. The cursor goes to the so called
afterlast position.
Even so, the next() call on the last position should return false.
Change-Id: I0fd145c920077151364a6a8c12e05290496b99c8
Reviewed-on: https://gerrit.libreoffice.org/63895
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Filter schema in XDatabaseMetaData::getColumns so it would show correct
results in case there are more tables with the same name in different
schemas.
Change-Id: I8a986a43a8b049db3615d7ec2585ce68ebe3340e
Reviewed-on: https://gerrit.libreoffice.org/62696
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
When reading column types from information schema, it can be mediumint
and char types as well. Mediumint should be 3 bytes long. We can use
sal_Int32 for that.
Change-Id: Id3507b1f38cabfb96800fc7743c911e36609a346
Reviewed-on: https://gerrit.libreoffice.org/62697
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
It can be used to test the mysqlc connector whenever there is an
external mysql or mariadb server running.
The test runs only when CONNECTIVITY_TEST_MYSQL_DRIVER environment variable
is set. This variable should contain the URL of the database, including
the port number and the host name.
The URL should also contain a user name password pair which can be used
to connect to the external database. The URL format is the following:
[user]/[passwd]@sdbc:mysql:mysqlc:[host]:[port]/[db_name]
README is updated and contains detailed information about the test.
Change-Id: I1bbc9369ff193a29c06de63a0f6cc975877c8da3
Reviewed-on: https://gerrit.libreoffice.org/62171
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
And also make some minor fixes so it cooperates with the new mysqlc
library.
Change-Id: I866add99a699150c6550ee7f7ff2ee947e07117c
Reviewed-on: https://gerrit.libreoffice.org/61648
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
For MYSQL connections there is an extra window which determines how to
connect to a mysql/mariadb database. This functionality is handled in
OGeneralPageWizard::approveDatasourceType.
Change-Id: Ia3c548103b694731cba47ff5390c34b072a938a0
Reviewed-on: https://gerrit.libreoffice.org/60893
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
We need to update the actual row position after using absolute or
previous.
Change-Id: Ie85f9679b7a06649a88ac8ee08436bf7f4a58a22
Reviewed-on: https://gerrit.libreoffice.org/60328
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
when calling getXXX() methods of a simple result set.
Change-Id: I9e018385bb73468ea520b03275232c0982cbcba0
Reviewed-on: https://gerrit.libreoffice.org/60095
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Additionally I erased the remains of the old mysql C++ connector.
Also update the code where the clang plugins were unhappy after moving
the mysqlc module.
Remove mysql-cpp-connector external.
Change-Id: I771cc7afacf5012fc349afb6b36828fb0fee5a66
Reviewed-on: https://gerrit.libreoffice.org/59200
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
In order to get rid of the MySQL C++ Connector, the sdbc driver should
be implemented using the MariaDB C connector instead. MariaDB
Connector/C is LGPL licensed, so later it can be used in the
connectivity module. This way mysqlc won't be an extension, so it could
be maintained easier.
Change-Id: I99c13ccf154b33b145d34b1e06eec85946dc82a0
Reviewed-on: https://gerrit.libreoffice.org/55960
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
Additional properties in SQL string like "DEFAULT" or "NOT NULL" should
be searched only after column name, because what if a column name is
"myEvilNOT NULLColumn"
Change-Id: I21f0755ba14c7267243d9999f044db4d16963387
Reviewed-on: https://gerrit.libreoffice.org/56462
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Default Value "NOW" is a special case, because Firebird likes it with
single quotes. In contrast, HSQLDB uses the keyword without quotes.
Add unit test for parsing default value "NOW"
Change-Id: I34886f8ae53e98addb52bf5e85030a03721d6a45
Reviewed-on: https://gerrit.libreoffice.org/56454
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Add proper exception handling for importing HSQL database.
If there are errors during migration, the migration process should
continue anyway. The first error should be shown to the user. All the
others can be seen as a warning.
Popping up several error messages would be just annoying for the user.
Change-Id: Ia726ad777fd798f064a8fde1c0062c5b05fe59d0
Reviewed-on: https://gerrit.libreoffice.org/54396
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
..longer than 30 characters. In that case throw SQLException which
indicates that the currently used Firebird version cannot handle table
names longer than 30 characters.
Change-Id: Ib2978feaeef22b70de9f2351042c25206a041105
Reviewed-on: https://gerrit.libreoffice.org/54398
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Set primary keys at the end of the sql statement instead of putting it
right after the column definition. This way multiple primary keys can be
defined.
Change-Id: I7956a536b0516fd8a773d4aa64ccb930ae5c715d
Reviewed-on: https://gerrit.libreoffice.org/54204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Use Migration warn dialog directly in library dba instead of popping up
window in dbu and passing down the information through XDataSource.
Change-Id: I6b8d2b55408a741662052d4af316b0c662d799f0
Reviewed-on: https://gerrit.libreoffice.org/53363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
.. databases with relations.
There might be several nodes written in data file before the actual
row, each representing an index. We have to skip these.
Change-Id: I1556a8212b509c6cb63cb98fa0e9b7b8d3483004
Reviewed-on: https://gerrit.libreoffice.org/53507
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
So there won't be any violation problems while migrating data.
If there is a constraint created in a "CREATE TABLE..." statement, then
cut it off and move it to a separate "ALTER TABLE ... ADD CONSTRAINT"
statement.
Change-Id: I7245ba8b23a6239cd3b724815a6385b9e6c17a91
Reviewed-on: https://gerrit.libreoffice.org/53508
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Fix autoincrementation issue by parsing and processing statements like
"ALTER TABLE <name> ALTER COLUMN <col_name> RESTART WITH <num>"
Change-Id: Ib175d64343d05d4b2cfc9a4cf944d0d0478adbcc
Reviewed-on: https://gerrit.libreoffice.org/52879
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Warn user with a pop-up dialog before migration.
To do that we have to know the database URL at UI level. In order to get
that I updated XDataSource interface with getConnectionURL().
The dialog offers two options: proceed with or without migration. If the
user choose "yes", we store that information in XDataSource. The
migration itself will be made in buildLowConnection().
Change-Id: I1f0d03da6352f7a0a8d989da79c4b2fe60a03ca1
Reviewed-on: https://gerrit.libreoffice.org/52876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Revert changes making HSQLDB related unit tests test Firebird migration.
They should still test the HSQLDB driver.
It reverts part of 159dd28651
Change-Id: If2b9207e95055418bd1dc1dc6e472335de311d1e
Reviewed-on: https://gerrit.libreoffice.org/52873
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Firebird uses "SELECT FIRST <num> ..." format to limit the number of
result row numbers instead of "SELECT ... LIMIT <num>"
My first approach was to improve OSQLParser and make it understand the
Firebird dialect. But it is hard because the parser has hard-coded
getChild(int) calls all over the code and all the indexes should be
updated.
Instead of this, we recognise the LIMIT keyword with the parser, remove
it and push the FIRST <num> part manually right after SELECT.
All of this should happen in case of Firebird and only when using the
query-GUI.
Change-Id: I53f3f977f77cf98b91b25a7eaa6ebb2ee8ac0951
Reviewed-on: https://gerrit.libreoffice.org/52591
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>