summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2001-04-17 18:33:00 +0000
committerNiklas Nebel <nn@openoffice.org>2001-04-17 18:33:00 +0000
commit4503229770cedcfc7aebc354b20cb294eb089579 (patch)
tree5f9c57effb4ed7490980c7b021dcd6edabeae965 /sc
parent98f0c1463073568b5db511c85a2e53f47aff01c9 (diff)
WIDs for uno property maps
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/unowids.hxx119
1 files changed, 119 insertions, 0 deletions
diff --git a/sc/inc/unowids.hxx b/sc/inc/unowids.hxx
new file mode 100644
index 000000000000..0219413e5c90
--- /dev/null
+++ b/sc/inc/unowids.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * $RCSfile: unowids.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: nn $ $Date: 2001-04-17 19:33:00 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef SC_UNOWIDS_HXX
+#define SC_UNOWIDS_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+#ifndef SC_ITEMS_HXX
+#include "scitems.hxx"
+#endif
+
+
+// WIDs for uno property maps,
+// never stored in files
+
+#define SC_WID_UNO_START 1200
+
+#define SC_WID_UNO_CELLSTYL ( SC_WID_UNO_START + 0 )
+#define SC_WID_UNO_CHCOLHDR ( SC_WID_UNO_START + 1 )
+#define SC_WID_UNO_CHROWHDR ( SC_WID_UNO_START + 2 )
+#define SC_WID_UNO_CONDFMT ( SC_WID_UNO_START + 3 )
+#define SC_WID_UNO_CONDLOC ( SC_WID_UNO_START + 4 )
+#define SC_WID_UNO_CONDXML ( SC_WID_UNO_START + 5 )
+#define SC_WID_UNO_TBLBORD ( SC_WID_UNO_START + 6 )
+#define SC_WID_UNO_VALIDAT ( SC_WID_UNO_START + 7 )
+#define SC_WID_UNO_VALILOC ( SC_WID_UNO_START + 8 )
+#define SC_WID_UNO_VALIXML ( SC_WID_UNO_START + 9 )
+#define SC_WID_UNO_POS ( SC_WID_UNO_START + 10 )
+#define SC_WID_UNO_SIZE ( SC_WID_UNO_START + 11 )
+#define SC_WID_UNO_FORMLOC ( SC_WID_UNO_START + 12 )
+#define SC_WID_UNO_FORMRT ( SC_WID_UNO_START + 13 )
+#define SC_WID_UNO_PAGESTL ( SC_WID_UNO_START + 14 )
+#define SC_WID_UNO_CELLVIS ( SC_WID_UNO_START + 15 )
+#define SC_WID_UNO_LINKDISPBIT ( SC_WID_UNO_START + 16 )
+#define SC_WID_UNO_LINKDISPNAME ( SC_WID_UNO_START + 17 )
+#define SC_WID_UNO_CELLWID ( SC_WID_UNO_START + 18 )
+#define SC_WID_UNO_OWIDTH ( SC_WID_UNO_START + 19 )
+#define SC_WID_UNO_NEWPAGE ( SC_WID_UNO_START + 20 )
+#define SC_WID_UNO_MANPAGE ( SC_WID_UNO_START + 21 )
+#define SC_WID_UNO_CELLHGT ( SC_WID_UNO_START + 22 )
+#define SC_WID_UNO_CELLFILT ( SC_WID_UNO_START + 23 )
+#define SC_WID_UNO_OHEIGHT ( SC_WID_UNO_START + 24 )
+
+#define SC_WID_UNO_END ( SC_WID_UNO_START + 24 )
+
+
+inline BOOL IsScUnoWid( USHORT nWid )
+{
+ return nWid >= SC_WID_UNO_START && nWid <= SC_WID_UNO_END;
+}
+
+inline BOOL IsScItemWid( USHORT nWid )
+{
+ return nWid >= ATTR_STARTINDEX && nWid <= ATTR_ENDINDEX; // incl. page
+}
+
+#endif
+
arched 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> 2018-07-06dbahsql: refactor, around parseColumnpartTamas Bunth Change-Id: I663da1474d3f1c3bde8a3d3c041e8fd0fe4c7d43 Reviewed-on: https://gerrit.libreoffice.org/56459 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-07-06tdf#117867 dbahsql: Migrate default valuesTamas Bunth 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> 2018-06-11tdf#117115 dbahsql: respect escaped '\'Tamas Bunth Change-Id: Id408f7a98011d806f01b6c63ae67008c4dba4b0d Reviewed-on: https://gerrit.libreoffice.org/55595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-05-25tdf#117115 dbahsql: respect unicode in columnsTamas Bunth Change-Id: I6a1dcba0afda88eaf083f0d4c73c1e74b0c78f56 Reviewed-on: https://gerrit.libreoffice.org/54297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-05-24tdf#117670: migration Firebird, deal with multiword columnJulien Nabet by changing parsing process a bit Change-Id: I77c06ba218e9bc0d241dbff10f76860d0ca5ed44 Reviewed-on: https://gerrit.libreoffice.org/54542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2018-05-14tdf#117092 dbahsql: handle multiple primary keysTamas Bunth 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> 2018-05-12tdf#117301 dbahsql: add FLOAT typeTamas Bunth Change-Id: I2a7227c40d8df6347c014cf720369384b92e3970 Reviewed-on: https://gerrit.libreoffice.org/53898 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-05-07tdf#117299 dbahsql: add varchar_ignorecase typeTamas Bunth Change-Id: I1dc904fe1b9146c978086861ef96f5141794bf09 Reviewed-on: https://gerrit.libreoffice.org/53901 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-04-29tdf#117300 dbahsql: Add REAL typeTamas Bunth Change-Id: I5a63633f8efa2307c75e8018a8fae13f154254ce Reviewed-on: https://gerrit.libreoffice.org/53585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-04-15tdf#116982 dbahsql: fix autoincrementationTamas Bunth 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> 2018-03-10Modernize a bit more dbaccessJulien Nabet mainly by using for-range loops but also by simplifying some simple algo Change-Id: If04cd78e62f80f9575e24f3d50ff1e427454da79 Reviewed-on: https://gerrit.libreoffice.org/51019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2018-03-07dbahsql: add BINARY and VARBINARY importTamas Bunth Change-Id: Ibb4d5f8dda16dc7779b7a7b818a8bd2c49cbf283 Reviewed-on: https://gerrit.libreoffice.org/50844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> 2018-01-27Add HSQLDB schema importTamas Bunth It can be enabled by initializing the DBACCESS_HSQL_MIGRATION variable. Create new library "dbahsql" which is responsible for migrating the embedded hsql database to any database covered by sdbc. The hsqldb schema is stored in a file named "script" in form of SQL statements. The SQL statements used by DBMS's differ mostly by the defined types. Because of that, only the create statements need to be parsed, alter statements will work (with a little luck) without actually modifying it. User / security settings which can occur in the script file (e.g. GRANT statements) are dropped. Statements starting with SET are also dropped (they are hsql specific stuff) Change-Id: I6a22942e8a9a76765f80e50f0ad68f4d72e1ff9d Reviewed-on: https://gerrit.libreoffice.org/48260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>