dbaccess/source/filter/hsqldb/columndef.hxx      |    1 +
 dbaccess/source/filter/hsqldb/fbcreateparser.cxx |   11 +++++++++--
 svx/source/dialog/paraprev.cxx                   |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 29c6629a54bd5d6cb8ccbfc663b1fed36c57e616
Author: Tamas Bunth <tamas.bu...@collabora.co.uk>
Date:   Sat Apr 7 16:07:03 2018 +0200

    dbahsql: add default for autoincremented columns
    
    Change-Id: I8b4c99ed9e3701193228c58cc9e64dc87a03da71
    Reviewed-on: https://gerrit.libreoffice.org/52550
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Tamás Bunth <btom...@gmail.com>

diff --git a/dbaccess/source/filter/hsqldb/columndef.hxx 
b/dbaccess/source/filter/hsqldb/columndef.hxx
index 5b5c68f7e67a..2bdbef83cd11 100644
--- a/dbaccess/source/filter/hsqldb/columndef.hxx
+++ b/dbaccess/source/filter/hsqldb/columndef.hxx
@@ -35,6 +35,7 @@ public:
     bool isPrimaryKey() const { return m_bPrimaryKey; }
     bool isNullable() const { return m_bNullable; }
     bool isAutoIncremental() const { return m_nAutoIncrement >= 0; }
+    sal_Int32 getStartValue() const { return m_nAutoIncrement; }
     const std::vector<sal_Int32> getParams() const { return m_aParams; }
 };
 }
diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx 
b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
index 764ccaca2d69..fe23eec6635b 100644
--- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
+++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
@@ -142,9 +142,16 @@ OUString FbCreateStmtParser::compose() const
         if (!sModifier.isEmpty())
             lcl_appendWithSpace(sSql, sModifier);
 
-        // TODO autoincremental default value with "START WITH"
         if (columnIter->isAutoIncremental())
-            lcl_appendWithSpace(sSql, "GENERATED BY DEFAULT AS IDENTITY (START 
WITH 0)");
+        {
+            lcl_appendWithSpace(sSql, "GENERATED BY DEFAULT AS IDENTITY (START 
WITH ");
+
+            // start with 0:
+            // HSQLDB: first value will be 0.
+            // Firebird: first value will be 1.
+            sSql.append(columnIter->getStartValue() - 1);
+            sSql.append(")");
+        }
         else if (!columnIter->isNullable())
             lcl_appendWithSpace(sSql, "NOT NULL");
 
commit e3d3a7c373657dcc39aaefab9fedce9f2d12cb63
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu Apr 5 08:30:59 2018 +0100

    coverity#1433782 Unintended sign extension
    
    Change-Id: I804d2282094ab98d0295e57f35704fab78266b7f
    Reviewed-on: https://gerrit.libreoffice.org/52440
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index 66661c0bc3f1..418ed7ca8f70 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -85,7 +85,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& 
rRenderContext)
         if (i == 3)
         {
             rRenderContext.SetFillColor(COL_GRAY);
-            long nTop = nUpper * aLineSiz.Height() / aSize.Height();
+            auto nTop = nUpper * aLineSiz.Height() / aSize.Height();
             aPnt.AdjustY(nTop * 2 );
         }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to