Tag: cws_src680_hsqlcsv
User: fs      
Date: 2006/09/20 01:47:07

Modified:
   dba/connectivity/source/drivers/hsqldb/HConnection.cxx

Log:
 #i69526# ColorMode added to XTableUIProvider::getTableIcon

File Changes:

Directory: /dba/connectivity/source/drivers/hsqldb/
===================================================

File [changed]: HConnection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HConnection.cxx?r1=1.5.66.5&r2=1.5.66.6
Delta lines:  +14 -9
--------------------
--- HConnection.cxx     19 Sep 2006 13:58:52 -0000      1.5.66.5
+++ HConnection.cxx     20 Sep 2006 08:47:04 -0000      1.5.66.6
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: HConnection.cxx,v $
  *
- *  $Revision: 1.5.66.5 $
+ *  $Revision: 1.5.66.6 $
  *
- *  last change: $Author: fs $ $Date: 2006/09/19 13:58:52 $
+ *  last change: $Author: fs $ $Date: 2006/09/20 08:47:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -59,6 +59,9 @@
 #ifndef _COM_SUN_STAR_GRAPHIC_XGRAPHICPROVIDER_HPP_
 #include <com/sun/star/graphic/XGraphicProvider.hpp>
 #endif
+#ifndef _COM_SUN_STAR_GRAPHIC_GRAPHICCOLORMODE_HPP_
+#include <com/sun/star/graphic/GraphicColorMode.hpp>
+#endif
 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
 #include <com/sun/star/beans/PropertyValue.hpp>
 #endif
@@ -118,6 +121,7 @@
 using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
 using ::com::sun::star::beans::PropertyValue;
 /** === end UNO using === **/
+namespace GraphicColorMode = ::com::sun::star::graphic::GraphicColorMode;
 
 namespace connectivity { namespace hsqldb
 {
@@ -238,7 +242,7 @@
     }
 
     // -------------------------------------------------------------------
-    Reference< XGraphic > SAL_CALL OHsqlConnection::getTableIcon( const 
::rtl::OUString& _TableName ) throw (RuntimeException)
+    Reference< XGraphic > SAL_CALL OHsqlConnection::getTableIcon( const 
::rtl::OUString& _TableName, ::sal_Int32 _ColorMode ) throw (RuntimeException)
     {
         MethodGuard aGuard( *this );
 
@@ -246,7 +250,7 @@
         if ( !impl_isTextTable_nothrow( _TableName ) )
             return NULL;
 
-        return impl_getTextTableIcon_nothrow();
+        return impl_getTextTableIcon_nothrow( _ColorMode );
     }
 
     // -------------------------------------------------------------------
@@ -405,7 +409,7 @@
     }
 
     // -------------------------------------------------------------------
-    Reference< XGraphic > OHsqlConnection::impl_getTextTableIcon_nothrow()
+    Reference< XGraphic > OHsqlConnection::impl_getTextTableIcon_nothrow( 
::sal_Int32 _ColorMode )
     {
         Reference< XGraphic > xGraphic;
         try
@@ -418,12 +422,13 @@
             // assemble the image URL
             ::rtl::OUStringBuffer aImageURL;
             aImageURL.appendAscii( "private:graphicrepository/" );  // load 
the graphic from the global graphic repository
-            aImageURL.appendAscii( "res/" );                       // the 
relative path within the images.zip
+            aImageURL.appendAscii( "database/" );                   // the 
relative path within the images.zip
+            if ( _ColorMode == GraphicColorMode::NORMAL )
             aImageURL.appendAscii( LINKED_TEXT_TABLE_IMAGE_RESOURCE );
+            else
+                aImageURL.appendAscii( LINKED_TEXT_TABLE_IMAGE_RESOURCE_HC );
                                                                     // the 
name of the graphic to use
             ::rtl::OUString sImageURL( aImageURL.makeStringAndClear() );
-
-            // TODO: high-contrast mode?
 
             // ask the provider to obtain a graphic
             Sequence< PropertyValue > aMediaProperties( 1 );




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to