[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - connectivity/source svx/inc svx/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Jan 8 18:23:35 PST 2010


 connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx |   16 ++++++---
 connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx         |    1 
 svx/inc/svx/svdograf.hxx                                            |    1 
 svx/source/svdraw/svdograf.cxx                                      |   17 ++++------
 svx/source/table/svdotable.cxx                                      |    2 -
 5 files changed, 22 insertions(+), 15 deletions(-)

New commits:
commit 2e721139bbe2cd057d3596b50ef97d34dc190942
Author: Oliver Bolte <obo at openoffice.org>
Date:   Fri Jan 8 15:25:58 2010 +0000

    CWS-TOOLING: integrate CWS impress185
    2010-01-07 15:15:46 +0100 aw  r277880 : #i107966# Removed wrong '5'
    2010-01-07 13:31:24 +0100 aw  r277879 : #i107839# Added a NbcSetGraphic to SvxGraphicLink and use it in SvxGraphicLink::DataChanged to avoid unwanted ModelChange
    2010-01-07 12:53:09 +0100 cl  r277878 : reverted previous patch
    2009-12-28 16:03:56 +0100 cl  r277837 : #i107966# check if there really is a handle to avoid a reported crash
    2009-12-28 16:02:47 +0100 cl  r277836 : #i107965# report rectangles with 0 or negative width or height as empty

diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx
index 8a81917..0d74a07 100644
--- a/svx/inc/svx/svdograf.hxx
+++ b/svx/inc/svx/svdograf.hxx
@@ -144,6 +144,7 @@ public:
     void					SetGraphicObject( const GraphicObject& rGrfObj );
     const GraphicObject&	GetGraphicObject( bool bForceSwapIn = false) const;
 
+    void					NbcSetGraphic(const Graphic& rGrf);
     void					SetGraphic(const Graphic& rGrf);
     const Graphic&			GetGraphic() const;
 
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 67d02ac..28ccf8e 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -133,14 +133,8 @@ void SdrGraphicLink::DataChanged( const String& rMimeType,
         Graphic aGraphic;
         if( SvxLinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic ))
         {
-            GraphicType eOldGraphicType = pGrafObj->GetGraphicType();  // kein Hereinswappen
-            const sal_Bool bIsChanged = pModel->IsChanged();
-
-            pGrafObj->SetGraphic( aGraphic );
-            if( GRAPHIC_NONE != eOldGraphicType )
-                pGrafObj->SetChanged();
-            else
-                pModel->SetChanged( bIsChanged );
+               pGrafObj->NbcSetGraphic( aGraphic );
+            pGrafObj->ActionChanged();
         }
         else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) !=
                     SvxLinkManager::RegisterStatusInfoId() )
@@ -303,11 +297,16 @@ const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const
 
 // -----------------------------------------------------------------------------
 
-void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf )
 {
     pGraphic->SetGraphic( rGrf );
     pGraphic->SetUserData();
     mbIsPreview = sal_False;
+}
+
+void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+{
+    NbcSetGraphic(rGrf);
     SetChanged();
     BroadcastObjectChange();
 }
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index d639b3e..947ecc2 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2575,7 +2575,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag
     basegfx::B2DPolyPolygon aRetval;
     const SdrHdl* pHdl = rDrag.GetHdl();
 
-    if(HDL_USER == pHdl->GetKind())
+    if( pHdl && (HDL_USER == pHdl->GetKind()) )
     {
         const TableEdgeHdl* pEdgeHdl = dynamic_cast< const TableEdgeHdl* >( pHdl );
 
commit 6f43b973e70a27ae33f42ed846d4aa0cea323a29
Author: Oliver Bolte <obo at openoffice.org>
Date:   Fri Jan 8 09:22:30 2010 +0000

    CWS-TOOLING: integrate CWS dba32k
    2010-01-07 10:56:59 +0100 fs  r277873 : #i108123# getDataSourcePrefixFromMediaType: care for types where the config says 'no extension', but the actual file contains an extension
    2010-01-05 18:11:23 +0100 pl  r277862 : #i108068# always release solar mutex before calling into UNO
    2010-01-05 12:47:51 +0100 oj  r277856 : #i107793# set props in endDoc
    2010-01-05 09:59:29 +0100 fs  r277852 : #i10000#
    2010-01-05 08:51:21 +0100 oj  r277851 : #i107794# fix for WChar
    2010-01-04 14:58:14 +0100 fs  r277849 : #i108019#
    2010-01-04 14:57:49 +0100 fs  r277848 : #i108040#
    2010-01-04 13:56:14 +0100 fs  r277843 : #i107917# do not access xDataSource for reading, but use getDataSource()
    2010-01-04 12:08:25 +0100 fs  r277841 : #i107845# when composing the new filter, *first* use the old filter, then the new one - order matters
    2010-01-04 11:57:05 +0100 fs  r277840 : manual CWS creation: create CWS dba32k from OOO320_m8 tag

diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 773b9c0..20e705b 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -283,7 +283,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co
         aDate.day = 0;
         aDate.month = 0;
         aDate.year = 0;
-        OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,&aDate,sizeof aDate);
+        OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_DATE : SQL_C_TYPE_DATE,m_bWasNull,**this,&aDate,sizeof aDate);
         return Date(aDate.day,aDate.month,aDate.year);
     }
     else
@@ -434,7 +434,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
     columnIndex = mapColumn(columnIndex);
     ::rtl::OUString aVal;
     if(columnIndex <= m_nDriverColumnCount)
-        aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,(SWORD)SQL_C_WCHAR,m_bWasNull,**this,m_nTextEncoding);
+        aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,impl_getColumnType_nothrow(columnIndex),m_bWasNull,**this,m_nTextEncoding);
     else
         m_bWasNull = sal_True;
 
@@ -454,7 +454,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
     columnIndex = mapColumn(columnIndex);
     TIME_STRUCT aTime={0,0,0};
     if(columnIndex <= m_nDriverColumnCount)
-        OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
+        OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIME : SQL_C_TYPE_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
     else
         m_bWasNull = sal_True;
     return Time(0,aTime.second,aTime.minute,aTime.hour);
@@ -472,7 +472,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
     columnIndex = mapColumn(columnIndex);
     TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0};
     if(columnIndex <= m_nDriverColumnCount)
-        OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
+        OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
     else
         m_bWasNull = sal_True;
     return DateTime((sal_uInt16)aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
@@ -1316,5 +1316,11 @@ void ODatabaseMetaDataResultSet::checkColumnCount()
 }
 // -----------------------------------------------------------------------------
 
-
+SWORD ODatabaseMetaDataResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex)
+{
+    ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex);
+    if ( aFind == m_aODBCColumnTypes.end() )
+        aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pConnection,m_aStatementHandle,*this,columnIndex))).first;
+    return aFind->second;
+}
 
diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
index 5078eb3..d0134d5 100644
--- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
+++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
@@ -100,6 +100,7 @@ namespace connectivity
             sal_Int32 getFetchDirection()		const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
             sal_Int32 getFetchSize()			const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
             ::rtl::OUString getCursorName()		const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+            SWORD                               impl_getColumnType_nothrow(sal_Int32 column);
 
             sal_Int32 mapColumn (sal_Int32	column);
 


More information about the ooo-build-commit mailing list