Commits

vg  committed f48702d

CWS-TOOLING: integrate CWS dba32d
2009-06-30 08:58:13 +0200 fs r273488 : merging latest changes from CWS dba32c
2009-06-29 11:40:42 +0200 oj r273459 : #i101652# fix token handling
2009-06-26 09:27:30 +0200 oj r273394 : #i101994# wrong condition checked
2009-06-22 12:09:04 +0200 fs r273210 : merging latest changes from CWS dba32c
2009-06-18 11:01:06 +0200 fs r273108 : merge latest changes from CWS dba32c
2009-06-17 14:19:33 +0200 oj r273072 : handle images at the correct position
2009-06-17 13:37:19 +0200 oj r273067 : compile error
2009-06-17 13:35:58 +0200 oj r273066 : #i102201# handle images
2009-06-17 13:27:21 +0200 oj r273065 : #i80917# disable checkbox for internal copy
2009-06-17 13:25:38 +0200 oj r273064 : #i80917# disable checkbox for internal copy
2009-06-15 12:59:16 +0200 fs r272978 : merging latest changes from CWS dba32c
2009-06-15 10:45:58 +0200 fs r272967 : CWS-TOOLING: rebase CWS dba32d to trunk@272827 (milestone: DEV300:m50)
2009-06-15 08:41:05 +0200 fs r272960 : merging changes from CWS dba32c (resulting from rebasing dba32c to m50)
2009-06-03 12:22:32 +0200 fs r272554 : merging latest changes from CWS dba32c
2009-06-03 11:11:27 +0200 fs r272549 : #i100818# special treatment for DataAwareness not needed anymore
2009-06-03 11:07:01 +0200 fs r272548 : #i10000# removed package declaration
2009-06-03 09:21:03 +0200 oj r272537 : #i93465# save window states
2009-06-03 08:56:25 +0200 oj r272535 : solve compiler warnings
2009-06-03 08:55:02 +0200 oj r272534 : #i102295# export shapes i the first cell
2009-06-03 07:35:18 +0200 oj r272533 : #i101994# check for - and + prefix
2009-06-03 06:51:38 +0200 oj r272531 : #i101463# use uncomposed table name
2009-06-03 06:33:06 +0200 oj r272530 : #i102019# word corrected
2009-06-02 14:58:28 +0200 fs r272507 : #i102443# call initializeParser from LoadFinished
2009-06-02 14:30:10 +0200 oj r272504 : #i102019# introduce static ints
2009-06-02 13:51:02 +0200 oj r272501 : #i102439# wrong method used
2009-06-02 13:44:09 +0200 fs r272500 : #i102440# when tampering with Order/GroupBy, reset the cached columns
2009-06-02 10:53:01 +0200 fs r272487 : #i102234# preserve the original filter when using a 0=1 filter
2009-06-02 10:21:21 +0200 oj r272486 : #i100535# handle time values as float
2009-06-02 10:19:07 +0200 fs r272485 : merging latest changes from CWS dba32c
2009-05-29 16:00:15 +0200 fs r272467 : merging latest changes from dba32c
2009-05-29 15:31:25 +0200 fs r272462 : merging latest changes from dba32c
2009-05-29 10:58:03 +0200 oj r272438 : #101135# export embedded-text
2009-05-29 08:17:57 +0200 oj r272431 : #i80917# make attribute not optional
2009-05-29 08:17:32 +0200 oj r272430 : remoe unused token
2009-05-29 07:17:15 +0200 oj r272429 : #i80917# make attribute not optional
2009-05-28 12:48:14 +0200 oj r272401 : #i102201# insert images in context menu
2009-05-28 12:47:44 +0200 oj r272400 : #i80917# add new attribute to handle first line
2009-05-28 12:16:12 +0200 oj r272397 : #i96134# add / to path when it doesn't exist
2009-05-28 12:11:08 +0200 oj r272390 : #i80917# add new attribute to handle first line
2009-05-28 11:33:35 +0200 oj r272388 : #i101652# add new checkbox to handle header line as column names
2009-05-28 11:30:15 +0200 oj r272387 : #i101652# add localize
2009-05-28 11:15:53 +0200 oj r272386 : merge from dba32c
2009-05-28 09:08:25 +0200 fs r272378 : merged a build fix from CWS dba32c

  • Participants
  • Parent commits 047dd77

Comments (0)

Files changed (36)

File connectivity/source/drivers/flat/ETable.cxx

 			{
 				bNumeric = TRUE;
 				xub_StrLen nDot = 0;
+                xub_StrLen nDecimalDelCount = 0;
 				for (xub_StrLen j = 0; j < aField2.Len(); j++)
 				{
 					const sal_Unicode c = aField2.GetChar(j);
 					// nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
-					if ((!cDecimalDelimiter || c != cDecimalDelimiter) &&
-						(!cThousandDelimiter || c != cThousandDelimiter) &&
-						!aCharClass.isDigit(aField2,j))
+					if ( ( !cDecimalDelimiter  || c != cDecimalDelimiter )  &&
+						 ( !cThousandDelimiter || c != cThousandDelimiter ) &&
+						!aCharClass.isDigit(aField2,j)                      &&
+                        ( j != 0 || (c != '+' && c != '-' ) ) )
 					{
-						bNumeric = FALSE;
-						break;
+					    bNumeric = FALSE;
+					    break;
 					}
 					if (cDecimalDelimiter && c == cDecimalDelimiter)
 					{
 						nPrecision = 15; // we have an decimal value
 						nScale = 2;
-						nDot++;
-					}
+                        ++nDecimalDelCount;
+					} // if (cDecimalDelimiter && c == cDecimalDelimiter)
+                    if ( c == '.' )
+                        ++nDot;
 				}
 
-				if (nDot > 1) // if there is more than one dot it isn't a number
+				if (nDecimalDelCount > 1 || nDot > 1 ) // if there is more than one dot it isn't a number
 					bNumeric = FALSE;
 				if (bNumeric && cThousandDelimiter)
 				{

File connectivity/source/parse/sqlbison.y

 
 /* numeric functions */
 %token <pParseNode> SQL_TOKEN_ABS SQL_TOKEN_ACOS SQL_TOKEN_ASIN SQL_TOKEN_ATAN SQL_TOKEN_ATAN2 SQL_TOKEN_CEILING 
-%token <pParseNode> SQL_TOKEN_COS SQL_TOKEN_COT SQL_TOKEN_DEGREES SQL_TOKEN_EXP SQL_TOKEN_DIV SQL_TOKEN_FLOOR SQL_TOKEN_LOGF  SQL_TOKEN_LOG SQL_TOKEN_LN
+%token <pParseNode> SQL_TOKEN_COS SQL_TOKEN_COT SQL_TOKEN_DEGREES SQL_TOKEN_EXP SQL_TOKEN_FLOOR SQL_TOKEN_LOGF  SQL_TOKEN_LOG SQL_TOKEN_LN
 %token <pParseNode> SQL_TOKEN_LOG10 SQL_TOKEN_MOD SQL_TOKEN_PI SQL_TOKEN_POWER SQL_TOKEN_RADIANS SQL_TOKEN_RAND SQL_TOKEN_ROUNDMAGIC
 %token <pParseNode> SQL_TOKEN_ROUND   SQL_TOKEN_SIGN    SQL_TOKEN_SIN     SQL_TOKEN_SQRT    SQL_TOKEN_TAN SQL_TOKEN_TRUNCATE
 

File connectivity/source/parse/sqlflex.l

 [Dd][Ee][Ss][Cc]								{SQL_NEW_KEYWORD(SQL_TOKEN_DESC); return SQL_TOKEN_DESC; }
 [Dd][Ii][Ff][Ff][Ee][Rr][Ee][Nn][Cc][Ee]		{SQL_NEW_KEYWORD(SQL_TOKEN_DIFFERENCE); return SQL_TOKEN_DIFFERENCE; }
 [Dd][Ii][Ss][Tt][Ii][Nn][Cc][Tt]				{SQL_NEW_KEYWORD(SQL_TOKEN_DISTINCT); return SQL_TOKEN_DISTINCT; }
-[Dd][Ii][Vv]									{SQL_NEW_KEYWORD(SQL_TOKEN_DIV); return SQL_TOKEN_DIV; }
 [Dd][Oo][Uu][Bb][Ll][Ee]						{SQL_NEW_KEYWORD(SQL_TOKEN_DOUBLE); return SQL_TOKEN_DOUBLE; }
 [Dd][Rr][Oo][Pp]								{SQL_NEW_KEYWORD(SQL_TOKEN_DROP); return SQL_TOKEN_DROP; }
 

File dbaccess/source/core/api/SingleSelectQueryComposer.cxx

 
     // set the query
 	setQuery_Impl(aSql.makeStringAndClear());
-    // parameters may also have changed
-    clearParametersCollection();
+
+    // clear column collections which (might) have changed
+    clearColumns( ParameterColumns );
+    if ( _ePart == Order )
+        clearColumns( OrderColumns );
+    if ( _ePart == Group )
+        clearColumns( GroupByColumns );
 
     // also, since the "additive filter" change, we need to rebuild our "additive" statement
     aSql = m_aPureSelectSQL;
         bCase = m_xMetaData->supportsMixedCaseQuotedIdentifiers();
 		aSelectColumns = m_aSqlIterator.getSelectColumns();
 
-		::rtl::OUString sSql = m_aPureSelectSQL;
-		sSql += STR_WHERE;
-		sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" 0 = 1 "));
-		::rtl::OUString sGroupBy = getSQLPart(Group,m_aSqlIterator,sal_True);
+        ::rtl::OUStringBuffer aSQL;
+        aSQL.append( m_aPureSelectSQL );
+        aSQL.append( STR_WHERE );
+
+        // preserve the original WHERE clause
+        // #i102234# / 2009-06-02 / frank.schoenheit@sun.com
+        ::rtl::OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, sal_False );
+		if ( sOriginalWhereClause.getLength() )
+        {
+            aSQL.appendAscii( " ( 0 = 1 ) AND ( " );
+            aSQL.append( sOriginalWhereClause );
+            aSQL.appendAscii( " ) " );
+        }
+        else
+        {
+            aSQL.appendAscii( " ( 0 = 1 ) " );
+        }
+
+        ::rtl::OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, sal_True );
 		if ( sGroupBy.getLength() )
-			sSql += sGroupBy;
+			aSQL.append( sGroupBy );
 
+        ::rtl::OUString sSQL( aSQL.makeStringAndClear() );
         // normalize the statement so that it doesn't contain any application-level features anymore
         ::rtl::OUString sError;
-        const ::std::auto_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSql, false ) );
+        const ::std::auto_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSQL, false ) );
         DBG_ASSERT( pStatementTree.get(), "OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!" );
         if ( pStatementTree.get() )
-            if ( !pStatementTree->parseNodeToExecutableStatement( sSql, m_xConnection, m_aSqlParser, NULL ) )
+            if ( !pStatementTree->parseNodeToExecutableStatement( sSQL, m_xConnection, m_aSqlParser, NULL ) )
                 break;
 
 		Reference< XResultSetMetaData > xResultSetMeta;
         Reference< XResultSetMetaDataSupplier > xResMetaDataSup;
         try
         {
-            xPreparedStatement.set( m_xConnection->prepareStatement( sSql ), UNO_QUERY_THROW );
+            xPreparedStatement.set( m_xConnection->prepareStatement( sSQL ), UNO_QUERY_THROW );
 		    xResMetaDataSup.set( xPreparedStatement, UNO_QUERY_THROW );
             xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_QUERY_THROW );
         }
             Reference< XPropertySet > xStatementProps( xStatement, UNO_QUERY_THROW );
             try { xStatementProps->setPropertyValue( PROPERTY_ESCAPE_PROCESSING, makeAny( sal_False ) ); }
             catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
-		    xResMetaDataSup.set( xStatement->executeQuery( sSql ), UNO_QUERY_THROW );
+		    xResMetaDataSup.set( xStatement->executeQuery( sSQL ), UNO_QUERY_THROW );
             xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_QUERY_THROW );
         }
 
 	return m_aCurrentColumns[ParameterColumns];
 }
 // -----------------------------------------------------------------------------
-void OSingleSelectQueryComposer::clearParametersCollection()
+void OSingleSelectQueryComposer::clearColumns( const EColumnType _eType )
 {
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::clearParametersCollection" );
-	if ( m_aCurrentColumns[ParameterColumns] )
+    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::clearColumns" );
+    OPrivateColumns* pColumns = m_aCurrentColumns[ _eType ];
+	if ( pColumns != NULL )
 	{
-		m_aCurrentColumns[ParameterColumns]->disposing();
-		m_aColumnsCollection.push_back(m_aCurrentColumns[ParameterColumns]);
-		m_aCurrentColumns[ParameterColumns] = NULL;
+		pColumns->disposing();
+		m_aColumnsCollection.push_back( pColumns );
+		m_aCurrentColumns[ _eType ] = NULL;
 	}
 }
 // -----------------------------------------------------------------------------

File dbaccess/source/core/inc/SingleSelectQueryComposer.hxx

 		sal_Int32 getPredicateType(::connectivity::OSQLParseNode * _pPredicate) const;
 		// clears all Columns,Parameters and tables and insert it to their vectors
 		void clearCurrentCollections();
-        // clear only the parameter columns
-        void clearParametersCollection();
+        // clears the columns collection given by EColumnType
+        void clearColumns( const EColumnType _eType );
 
         /** retrieves a particular part of a statement
             @param _rIterator

File dbaccess/source/filter/xml/xmlExport.cxx

                 if ( sOrigUrl == sFileName )
                 {
                     ::svt::OFileNotation aTransformer( sFileName );
-                    AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(aTransformer.get( ::svt::OFileNotation::N_URL )));
+                    ::rtl::OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) );
+                    if ( sURL.charAt(sURL.getLength()-1) != '/' )
+                        sURL.append(sal_Unicode('/'));
+
+                    AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));
                 } // if ( sOrigUrl == sFileName )
                 else
                     AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,sOrigUrl);

File dbaccess/source/ui/browser/brwctrlr.cxx

 	// the filter or the sort criterias have changed ? -> update our parser
 	if (evt.PropertyName.equals(PROPERTY_ACTIVECOMMAND))
 	{
-        initializeParser();
         if (m_xParser.is())
 		    DO_SAFE( m_xParser->setElementaryQuery(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new query to my parser !" );
 	}
 	else if (evt.PropertyName.equals(PROPERTY_FILTER))
 	{
-        initializeParser();
-		if ( m_xParser.is() && m_xParser->getFilter() != ::comphelper::getString(evt.NewValue))
+        if ( m_xParser.is() && m_xParser->getFilter() != ::comphelper::getString(evt.NewValue))
 		{
 			DO_SAFE( m_xParser->setFilter(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" );
 		}
 	}
 	else if (evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE))
 	{
-		initializeParser();
 		if ( m_xParser.is() && m_xParser->getHavingClause() != ::comphelper::getString(evt.NewValue))
 		{
 			DO_SAFE( m_xParser->setHavingClause(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" );
 	}
 	else if (evt.PropertyName.equals(PROPERTY_ORDER))
 	{
-		initializeParser();
 		if ( m_xParser.is() && m_xParser->getOrder() != ::comphelper::getString(evt.NewValue))
 		{
 			DO_SAFE( m_xParser->setOrder(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new order to my parser !" );
 
 	Reference< XPropertySet >  xFormSet(getRowSet(), UNO_QUERY);
 
-    initializeParser();
 	const ::rtl::OUString sOldVal = bFilter ? m_xParser->getFilter() : m_xParser->getOrder();
 	const ::rtl::OUString sOldHaving = m_xParser->getHavingClause();
 	try
 			if (!xField.is())
 				break;
 
-            initializeParser();
 			const ::rtl::OUString sOldSort = m_xParser->getOrder();
 			sal_Bool bParserSuccess = sal_False;
 			HANDLE_SQL_ERRORS(
 			sal_Bool bHaving = sal_False;
 			::rtl::OUString sName;
 			xField->getPropertyValue(PROPERTY_NAME) >>= sName;
-            initializeParser();
 			Reference< XColumnsSupplier > xColumnsSupplier(m_xParser, UNO_QUERY);
 			Reference< ::com::sun::star::container::XNameAccess >  xCols = xColumnsSupplier.is() ? xColumnsSupplier->getColumns() : Reference< ::com::sun::star::container::XNameAccess > ();
 			if ( xCols.is() && xCols->hasByName(sName) )
 		getBrowserView()->getGridControl()->setDesignMode(sal_False);
 
 		// -------------------------------
+        initializeParser();
+
+		// -------------------------------
 		InvalidateAll();
 
 		m_aAsyncGetCellFocus.Call();
 	    }
         catch(Exception&)
 	    {
-		    DBG_WARNING("SbaXDataBrowserController::initializeParser: something went wrong while creating the parser !");
+            DBG_UNHANDLED_EXCEPTION();
 		    m_xParser = NULL;
 		    // no further handling, we ignore the error
 	    }
 	    bIsValid = ::cppu::any2bool(xProp->getPropertyValue(PROPERTY_ISNEW));
         if ( !bIsValid )
         {
-            initializeParser();
             bIsValid = m_xParser.is();
         }
     } // if ( !bIsValid )

File dbaccess/source/ui/control/dbtreelistbox.cxx

 #ifndef _COM_SUN_STAR_UI_XCONTEXTMENUINTERCEPTOR_HPP_
 #include <com/sun/star/ui/XContextMenuInterceptor.hpp>
 #endif
+#include <com/sun/star/frame/XFrame.hpp>
 #ifndef _COM_SUN_STAR_UTIL_URL_HPP_
 #include <com/sun/star/util/URL.hpp>
 #endif
 #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
 #include <toolkit/helper/vclunohelper.hxx>
 #endif
-
+#include <framework/imageproducer.hxx>
+#include <vcl/svapp.hxx>
 #include <memory>
 
 // .........................................................................
 {
 // .........................................................................
 
+using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 		    {
 			    lcl_adjustMenuItemIDs( *pPopup, _rCommandController );
                 continue;
-		    }
+		    } // if ( pPopup )
 
-            USHORT nCommandId = _rCommandController.registerCommandURL( aCommand );
+            const USHORT nCommandId = _rCommandController.registerCommandURL( aCommand );
 		    _rMenu.InsertItem( nCommandId, _rMenu.GetItemText( nId ), _rMenu.GetItemImage( nId ),
                 _rMenu.GetItemBits( nId ), pos );
 
             _rMenu.RemoveItem( pos+1 );
 	    }
     }
+    void lcl_insertMenuItemImages( Menu& _rMenu, IController& _rCommandController )
+    {
+        const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
+        const BOOL bHiContrast = rSettings.GetMenuColor().IsDark();
+        uno::Reference< frame::XController > xController = _rCommandController.getXController();
+        uno::Reference< frame::XFrame> xFrame;
+        if ( xController.is() )
+            xFrame = xController->getFrame();
+	    USHORT nCount = _rMenu.GetItemCount();
+	    for ( USHORT pos = 0; pos < nCount; ++pos )
+	    {
+            // do not adjust separators
+            if ( _rMenu.GetItemType( pos ) == MENUITEM_SEPARATOR )
+                continue;
+
+		    USHORT nId = _rMenu.GetItemId(pos);
+			String aCommand = _rMenu.GetItemCommand( nId );
+		    PopupMenu* pPopup = _rMenu.GetPopupMenu( nId );
+		    if ( pPopup )
+		    {
+			    lcl_insertMenuItemImages( *pPopup, _rCommandController );
+                continue;
+		    } // if ( pPopup )
+
+            if ( xFrame.is() )
+                _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,FALSE,bHiContrast));
+	    }
+    }
     // =========================================================================
     // = SelectionSupplier
     // =========================================================================
 	pContextMenu.reset( m_pContextMenuProvider->getContextMenu( *this ) );
     // disable what is not available currently
 	lcl_enableEntries( pContextMenu.get(), m_pContextMenuProvider->getCommandController() );
+	// set images
+    lcl_insertMenuItemImages( *pContextMenu, m_pContextMenuProvider->getCommandController() );
     // allow context menu interception
     ::cppu::OInterfaceContainerHelper* pInterceptors = m_pContextMenuProvider->getContextMenuInterceptors();
     if ( !pInterceptors || !pInterceptors->getLength() )
         // the interceptors only know command URLs, but our menus primarily work
         // with IDs -> we need to translate the commands to IDs
         lcl_adjustMenuItemIDs( *pModifiedMenu, m_pContextMenuProvider->getCommandController() );
-    }
+    } // if ( bModifiedMenu )
 
     return pContextMenu.release();
 }

File dbaccess/source/ui/inc/WCPage.hxx

 		RadioButton								m_aRB_Def;
 		RadioButton								m_aRB_View;
 		RadioButton								m_aRB_AppendData;
+        CheckBox								m_aCB_UseHeaderLine;
 		CheckBox								m_aCB_PrimaryColumn;
 		FixedText								m_aFT_KeyName;
 		Edit									m_edKeyName;
 		OWizNormalExtend*						m_pPage3;
 
 		BOOL									m_bPKeyAllowed;
+        BOOL                                    m_bUseHeaderAllowed;
 
 
 		DECL_LINK( AppendDataClickHdl, Button* );
 		inline BOOL IsOptionDef()			const { return m_aRB_Def.IsChecked(); }
 		inline BOOL IsOptionAppendData()	const { return m_aRB_AppendData.IsChecked(); }
 		inline BOOL IsOptionView()			const { return m_aRB_View.IsChecked(); }
+        inline BOOL UseHeaderLine()			const { return m_aCB_UseHeaderLine.IsChecked(); }
         String      GetKeyName()            const { return m_edKeyName.GetText(); }
 
 		void setCreateStyleAction();
-        void disallowViews()
+        inline void disallowViews()
         {
             m_aRB_View.Disable();
         }
+        inline void disallowUseHeaderLine()
+        {
+            m_bUseHeaderAllowed = FALSE;
+            m_aCB_UseHeaderLine.Disable();
+        }
 
         void setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _rSuggestedName );
 	};

File dbaccess/source/ui/inc/WCopyTable.hxx

         sal_Int16                       m_nOperation;
 		Wizard_Button_Style	            m_ePressed;
 		sal_Bool			            m_bCreatePrimaryKeyColumn;
+        sal_Bool                        m_bUseHeaderLine;
 
     private:
 		DECL_LINK( ImplPrevHdl	, PushButton* );
 		// when not the value is COLUMN_POSITION_NOT_FOUND == (sal_uInt32)-1
 		ODatabaseExport::TPositions	GetColumnPositions()	const { return m_vColumnPos; }
 		::std::vector<sal_Int32>	GetColumnTypes()		const { return m_vColumnTypes; }
+        sal_Bool                    UseHeaderLine()         const { return m_bUseHeaderLine; }
+        void                        setUseHeaderLine(sal_Bool _bUseHeaderLine) { m_bUseHeaderLine = _bUseHeaderLine; }
 
 		void insertColumn(sal_Int32 _nPos,OFieldDescription* _pField);
 

File dbaccess/source/ui/inc/dbu_misc.hrc

 #include "dbu_resource.hrc"
 #endif
 
-
-#define STR_HTML_TITLE						RID_STR_MISC_START
-#define STR_RTF_TITLE						RID_STR_MISC_START +  1
+// free
+// free
 #define STR_WIZ_COLUMN_SELECT_TITEL			RID_STR_MISC_START +  2
 #define STR_WIZ_TYPE_SELECT_TITEL			RID_STR_MISC_START +  3
 #define STR_WIZ_PKEY_ALREADY_DEFINED		RID_STR_MISC_START +  4

File dbaccess/source/ui/misc/DExport.cxx

 						m_bIsAutoIncrement	= aWizard.shouldCreatePrimaryKey();
 						m_vColumns			= aWizard.GetColumnPositions();
 						m_vColumnTypes		= aWizard.GetColumnTypes();
+                        m_bAppendFirstLine	= !aWizard.UseHeaderLine();
 					}
 					break;
 				default:

File dbaccess/source/ui/misc/RtfReader.cxx

 				break;
 			case RTF_TROWD:
                 {
-                    sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
                     bool bInsertRow = true;
 				    if ( !m_xTable.is() ) // erste Zeile als Header verwenden
                     {
+                        sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
+
 					    m_bError = !CreateTable(nToken);
                         bInsertRow = m_bAppendFirstLine;
                         if ( m_bAppendFirstLine )
                         {
                             rInput.Seek(nTell);
-                            bInsertRow = true;
+                            rInput.ResetError();
                         }
                     }
 				    if ( bInsertRow && !m_bError)
 				break;
 		}
 	}
-	while((nTmpToken2 = GetNextToken()) != RTF_ROW && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED);
+	while((nTmpToken2 = GetNextToken()) != RTF_TROWD && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED);
 
 	sal_Bool bOk = !m_vDestVector.empty();
 	if(bOk)

File dbaccess/source/ui/misc/WCPage.cxx

 	,m_aRB_DefData(			this, ModuleRes( RB_DEFDATA			) )
 	,m_aRB_Def(				this, ModuleRes( RB_DEF				) )
 	,m_aRB_View(			this, ModuleRes( RB_VIEW			) )
-	,m_aRB_AppendData(		this, ModuleRes( RB_APPENDDATA		) )
+    ,m_aRB_AppendData(	    this, ModuleRes( RB_APPENDDATA	    ) )
+    ,m_aCB_UseHeaderLine(	this, ModuleRes( CB_USEHEADERLINE	) )
 	,m_aCB_PrimaryColumn(	this, ModuleRes( CB_PRIMARY_COLUMN	) )
 	,m_aFT_KeyName(			this, ModuleRes( FT_KEYNAME			) )
 	,m_edKeyName(			this, ModuleRes( ET_KEYNAME			) )
 	,m_pPage2(NULL)
 	,m_pPage3(NULL)
+    ,m_bUseHeaderAllowed(TRUE)
 {
 	DBG_CTOR(OCopyTable,NULL);
 
 		if ( !m_pParent->supportsViews() )
 			m_aRB_View.Disable();
 
+        m_aCB_UseHeaderLine.Check(TRUE);
 		m_bPKeyAllowed = m_pParent->supportsPrimaryKey();
 
 		m_aCB_PrimaryColumn.Enable(m_bPKeyAllowed);
 	m_aFT_KeyName.Enable(bKey && m_aCB_PrimaryColumn.IsChecked());
 	m_edKeyName.Enable(bKey && m_aCB_PrimaryColumn.IsChecked());
 	m_aCB_PrimaryColumn.Enable(bKey);
+    m_aCB_UseHeaderLine.Enable(m_bUseHeaderAllowed && IsOptionDefData());
 
 	// set typ what to do
 	if( IsOptionDefData() )
 {
 	DBG_CHKTHIS(OCopyTable,NULL);
 	m_pParent->m_bCreatePrimaryKeyColumn	= (m_bPKeyAllowed && m_aCB_PrimaryColumn.IsEnabled()) ? m_aCB_PrimaryColumn.IsChecked() : sal_False;
-	m_pParent->m_aKeyName				= m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : String();
+	m_pParent->m_aKeyName				    = m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : String();
+    m_pParent->setUseHeaderLine( m_aCB_UseHeaderLine.IsChecked() );
 
 	// first check if the table already exists in the database
 	if(	m_pParent->getOperation() != CopyTableOperation::AppendData )
 	m_pParent->GetOKButton().Enable( TRUE );
 	m_nOldOperation = m_pParent->getOperation();
 	m_edTableName.GrabFocus();
+    m_aCB_UseHeaderLine.Check(m_pParent->UseHeaderLine());
 }
 //------------------------------------------------------------------------
 String OCopyTable::GetTitle() const 

File dbaccess/source/ui/misc/WCopyTable.cxx

         bAllowViews = false;
 
 	OCopyTable* pPage1( new OCopyTable( this ) );
+    pPage1->disallowUseHeaderLine();
     if ( !bAllowViews )
         pPage1->disallowViews();
 	pPage1->setCreateStyleAction();

File dbaccess/source/ui/misc/WizardPages.hrc

 #define RB_VIEW					3
 #define RB_APPENDDATA			4
 #define CB_PRIMARY_COLUMN		5
+#define CB_USEHEADERLINE        6
 
 #define CONTROL_CONTAINER		1
 // controls

File dbaccess/source/ui/misc/WizardPages.src

 #define BUTTON_SIZE_X	 50
 #define BUTTON_SIZE_Y	 14
 
-String STR_HTML_TITLE
-{
-	Text [ en-US ] = "Copy HTML table" ;
-};
-
-String STR_RTF_TITLE
-{
-	Text [ en-US ] = "Copy RTF table" ;
-};
-
 String STR_WIZ_COLUMN_SELECT_TITEL
 {
 	Text [ en-US ] = "Apply columns";
 		Text [ en-US ] = "Append ~data" ;
 	};
 
+    CheckBox CB_USEHEADERLINE
+	{
+        Pos                 = MAP_APPFONT ( 12, 93 ) ;
+		Size				= MAP_APPFONT ( WINDOW_SIZE_X - 18, 10 ) ;
+		Text [ en-US ] = "Use first ~line as column names" ;
+	};
+
 	CheckBox CB_PRIMARY_COLUMN
 	{
-        Pos                 = MAP_APPFONT ( 12, 93 ) ;
+        Pos                 = MAP_APPFONT ( 12, 107 ) ;
 		Size				= MAP_APPFONT ( 90 , 10 ) ;
 		Text [ en-US ] = "Crea~te primary key";
 	};
 	FixedText FT_KEYNAME
 	{
-        Pos                 = MAP_APPFONT ( 21 , 108 ) ;
+        Pos                 = MAP_APPFONT ( 21 , 122 ) ;
         Size                = MAP_APPFONT ( 39 , 8 ) ;
 		Text [ en-US ] = "Name";
 	};
 
 	Edit ET_KEYNAME
 	{
-        Pos                 = MAP_APPFONT ( 80, 106 ) ;
+        Pos                 = MAP_APPFONT ( 80, 120 ) ;
 		Size				= MAP_APPFONT ( 65 , 12 ) ;
 		TabStop				= TRUE ;
 		Border				= TRUE ;

File dbaccess/source/ui/uno/copytablewizard.cxx

         virtual void SAL_CALL setDestinationTableName( const ::rtl::OUString& _destinationTableName ) throw (RuntimeException);
         virtual Optional< ::rtl::OUString > SAL_CALL getCreatePrimaryKey() throw (RuntimeException);
         virtual void SAL_CALL setCreatePrimaryKey( const Optional< ::rtl::OUString >& _newPrimaryKey ) throw (IllegalArgumentException, RuntimeException);
+        virtual sal_Bool SAL_CALL getUseHeaderLineAsColumnNames() throw (RuntimeException);
+        virtual void SAL_CALL setUseHeaderLineAsColumnNames( sal_Bool _bUseHeaderLineAsColumnNames ) throw (RuntimeException);
         virtual void SAL_CALL addCopyTableListener( const Reference< XCopyTableListener >& Listener ) throw (RuntimeException);
         virtual void SAL_CALL removeCopyTableListener( const Reference< XCopyTableListener >& Listener ) throw (RuntimeException);
 
         sal_Int16                       m_nOperation;
         ::rtl::OUString                 m_sDestinationTable;
         Optional< ::rtl::OUString >     m_aPrimaryKeyName;
+        sal_Bool                        m_bUseHeaderLineAsColumnNames;
 
         // source
         SharedConnection                m_xSourceConnection;
     ,m_nOperation( CopyTableOperation::CopyDefinitionAndData )
     ,m_sDestinationTable()
     ,m_aPrimaryKeyName( sal_False, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" ) ))
+    ,m_bUseHeaderLineAsColumnNames( sal_True )
     ,m_xSourceConnection()
     ,m_nCommandType( CommandType::COMMAND )
     ,m_pSourceObject()
 
     m_aPrimaryKeyName = _newPrimaryKey;
 }
-
+// -----------------------------------------------------------------------------
+sal_Bool SAL_CALL CopyTableWizard::getUseHeaderLineAsColumnNames() throw (RuntimeException)
+{
+    CopyTableAccessGuard aGuard( *this );
+    return m_bUseHeaderLineAsColumnNames;
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL CopyTableWizard::setUseHeaderLineAsColumnNames( sal_Bool _bUseHeaderLineAsColumnNames ) throw (RuntimeException)
+{
+    CopyTableAccessGuard aGuard( *this );
+    m_bUseHeaderLineAsColumnNames = _bUseHeaderLineAsColumnNames;
+}
 //--------------------------------------------------------------------
 void SAL_CALL CopyTableWizard::addCopyTableListener( const Reference< XCopyTableListener >& _rxListener ) throw (RuntimeException)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "uno", "Ocke.Janssen@sun.com", "CopyTableWizard::impl_attributesToDialog_nothrow" );
     // primary key column
     _rDialog.setCreatePrimaryKey( m_aPrimaryKeyName.IsPresent, m_aPrimaryKeyName.Value );
+    _rDialog.setUseHeaderLine(m_bUseHeaderLineAsColumnNames);
 
     // everything else was passed at construction time already
 }
     m_sDestinationTable = _rDialog.getName();
 
     m_nOperation = _rDialog.getOperation();
+    m_bUseHeaderLineAsColumnNames = _rDialog.UseHeaderLine();
 }
 
 //-------------------------------------------------------------------------

File odk/examples/DevelopersGuide/Forms/ButtonOperator.java

  *************************************************************************/
 package org.openoffice.sdk.forms;
 
-
 // java base stuff
 import com.sun.star.awt.ActionEvent;
 import com.sun.star.awt.XActionListener;

File odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java

  ************************************************************************/
 package org.openoffice.sdk.forms;
 
-
 import com.sun.star.bridge.XUnoUrlResolver;
 import com.sun.star.lang.XMultiComponentFactory;
 import com.sun.star.uno.UnoRuntime;

File odk/examples/DevelopersGuide/Forms/Makefile

 ProgrammaticScriptAssignment.odt.load : $(COMP_REGISTERFLAG)
 	"$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
 
-DataAwareness.run: $(SAMPLE_CLASS_OUT)/DataAwareness.jar
-	$(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< -d OO_SDK_Demo_DB -t bugs
-
 %.run: $(SAMPLE_CLASS_OUT)/%.jar
 	$(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
 

File offapi/com/sun/star/sdb/application/XCopyTableWizard.idl

         set raises ( ::com::sun::star::lang::IllegalArgumentException );
     };
 
+    /** specifies that the first row should be used to identify column names.
+
+        <p>This attribute is ignored when the source defines the column names which isn't the case when only a part of a table should be copied
+        e.g. in the RTF format or in the HTML format.
+        </p>
+    */
+    [attribute] boolean UseHeaderLineAsColumnNames;
+
     /** adds a listener which is to be notified of progress in the copy operation
     */
     void    addCopyTableListener( [in] XCopyTableListener Listener );

File officecfg/registry/schema/org/openoffice/Office/ExtendedColorScheme.xcs

 			<info>
 				<desc>Specifies the UI name for the color or group name of the component.</desc>
 			</info>
-			<prop oor:name="DisplayName" oor:type="xs:string">
+			<prop oor:name="DisplayName" oor:type="xs:string" oor:localized="true">
 				<info>
 					<desc>Specifies the localized name that is used when presenting the entry to the user.</desc>
 				</info>
 			<info>
 				<desc>Specifies the ui strings for the component.</desc>
 			</info>
-			<prop oor:name="DisplayName" oor:type="xs:string">
+			<prop oor:name="DisplayName" oor:type="xs:string" oor:localized="true">
 				<info>
 					<desc>Specifies the localized name that is used when presenting the entry to the user.</desc>
 				</info>

File reportbuilder/java/com/sun/star/report/pentaho/configuration.properties

 com.sun.star.report.pentaho.output.default.oasis-data=allow
 com.sun.star.report.pentaho.output.tag.oasis-data.text=deny
 com.sun.star.report.pentaho.output.tag.oasis-data.currency-symbol=deny
+com.sun.star.report.pentaho.output.tag.oasis-data.embedded-text=deny
 
 com.sun.star.report.pentaho.output.namespace.oasis-draw=urn:oasis:names:tc:opendocument:xmlns:drawing:1.0
 com.sun.star.report.pentaho.output.default.oasis-draw=deny

File reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java

 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.sql.Time;
 
 import com.sun.star.report.pentaho.OfficeNamespaces;
 import com.sun.star.report.OfficeToken;
 
     public static final String VALUE_TYPE = "value-type";
     private static SimpleDateFormat dateFormat;
+    private static SimpleDateFormat timeFormat;
 
     private FormatValueUtility()
     {
     public static String applyValueForVariable(final Object value, final AttributeMap variableSection)
     {
         String ret = null;
-        if (value instanceof Date)
+        if (value instanceof Time)
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "time");
+            ret = formatTime((Time) value);
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "time-value", ret);
+        }
+        else if (value instanceof java.sql.Date )
         {
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "date");
             ret = formatDate((Date) value);
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", ret);
         }
+        else if (value instanceof Date)
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
+            ret = HSSFDateUtil.getExcelDate((Date)value,false,2).toString();
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", ret);
+        }
         else if (value instanceof Number)
         {
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
 
     public static void applyValueForCell(final Object value, final AttributeMap variableSection,final String valueType)
     {
-        if (value instanceof Date )
+        if (value instanceof Time)
         {
-            if ( "date".equals(valueType) )
-            {
-                variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value));
-            }
-            else
-            {
-                variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", String.valueOf(HSSFDateUtil.getExcelDate((Date)value)));
-            }
-            
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "time-value", formatTime((Time) value));
         }
-        else if (value instanceof Number )
+        else if (value instanceof java.sql.Date )
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value));
+        }
+        else if (value instanceof Date)
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", HSSFDateUtil.getExcelDate((Date)value,false,2).toString());
+        }
+        else if (value instanceof Number)
         {
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", String.valueOf(value));
         }
         }
         return dateFormat.format(date);
     }
+    private static synchronized String formatTime(final Date date)
+    {
+        if (timeFormat == null)
+        {
+            timeFormat = new SimpleDateFormat("'PT'HH'H'mm'M'ss'S'");
+        }
+        return timeFormat.format(date);
+    }
 
     public static DataFlags computeDataFlag(final FormattedTextElement element,
             final FlowController flowController)

File reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java

 import org.jfree.report.flow.layoutprocessor.AbstractLayoutController;
 import org.jfree.report.flow.layoutprocessor.LayoutController;
 import org.jfree.report.flow.layoutprocessor.LayoutControllerUtil;
+import org.pentaho.reporting.libraries.formula.util.HSSFDateUtil;
 import org.jfree.report.structure.Element;
 import java.util.Date;
 import java.text.SimpleDateFormat;
     String formula = FormatValueUtility.applyValueForVariable(value, variableSection);
     if ( formula == null )
         formula = "" + value;
-    if (value instanceof Date)
+    if (value instanceof java.sql.Date)
     {
         final Date date = (Date)value;
         final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy;MM;dd");
         formula = "Date(" + dateFormat.format(date) + ")";
     }
     variableSection.setAttribute(OfficeNamespaces.TEXT_NS, "formula", "ooow:" + formula);
+    
     return variableSection;
   }
 

File reportbuilder/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java

     {
         if (OfficeNamespaces.DATASTYLE_NS.equals(uri) || OfficeNamespaces.STYLE_NS.equals(uri))
         {
-            final DataStyleReadHandler xrh = new DataStyleReadHandler("text".equals(tagName) || "currency-symbol".equals(tagName));
+            final DataStyleReadHandler xrh = new DataStyleReadHandler("text".equals(tagName) || "currency-symbol".equals(tagName) || "embedded-text".equals(tagName));
             children.add(xrh);
             return xrh;
         }

File reportdesign/source/core/sdr/UndoEnv.cxx

 	    Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY );
         // OSL_ENSURE( xSimpleContainer.is(), "OXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" );
 	    if ( xSimpleContainer.is() )
-	    {
+        {
             if ( _bStartListening )
 		        xSimpleContainer->addContainerListener( this );
             else
         {
             Reference< XPropertySet > xProps( _rxObject, UNO_QUERY );
 	        if ( xProps.is() )
-	        {
+            {
                 if ( _bStartListening )
     		        xProps->addPropertyChangeListener( ::rtl::OUString(), this );
                 else

File reportdesign/source/filter/xml/xmlExport.cxx

                                     exportSection(xSection);
                             }
                         }
+                    } // if ( aColIter->xElement.is() )
+                    else if ( !bShapeHandled )
+                    {
+                        bShapeHandled = true;
+                        exportShapes(_xSection);
                     }
                     aColIter = aColIter + (aColIter->nColSpan - 1);
 				} 
         {
             ::std::auto_ptr<SvXMLElementExport> pSubDocument;
             uno::Reference< frame::XModel> xModel(xShape->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model"))),uno::UNO_QUERY);
-            if ( xModel.is() ) // special handlingfor chart object
+            if ( xModel.is() ) // special handling for chart object
             {
                 pSubDocument.reset(new SvXMLElementExport(*this,XML_NAMESPACE_REPORT, XML_SUB_DOCUMENT, sal_False, sal_False));
                 exportMasterDetailFields(xShape.get());

File reportdesign/source/ui/report/DesignView.cxx

     if ( m_pAddField )
 	{
         SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) );
-        aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) );
+        aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) );
         notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
 		::std::auto_ptr<Window> aTemp2(m_pAddField);
 		m_pAddField = NULL;
     if ( m_pReportExplorer )
     {
         SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_NAVIGATOR ) );
-        aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pReportExplorer->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) );
+        aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pReportExplorer->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) );
         notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
 		::std::auto_ptr<Window> aTemp2(m_pReportExplorer);
 		m_pReportExplorer = NULL;

File reportdesign/source/ui/report/ReportController.cxx

 #include "AddField.hxx"
 #include <toolkit/helper/vclunohelper.hxx>
 #include "DateTime.hxx"
-#include <svtools/syslocale.hxx>
-#include <vcl/svapp.hxx>
+
 #include <sfx2/filedlghelper.hxx>
 #include <tools/string.hxx>
 #include <tools/diagnose_ex.h>
 #include <com/sun/star/sdbc/SQLWarning.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 
+#include <vcl/svapp.hxx>
 #include <vcl/msgbox.hxx>
 #include <vcl/waitobj.hxx>
 
 #include <svtools/itemset.hxx>
 #include <svtools/aeitem.hxx> //CHINA001
 #include <svtools/cliplistener.hxx>
+#include <svtools/syslocale.hxx>
+#include <svtools/viewoptions.hxx>
 
 #include <vos/mutex.hxx>
 #include "PropertyForward.hxx"
 		m_pClipbordNotifier->AddRemoveListener( getView(), sal_False );
 		m_pClipbordNotifier->release();
 		m_pClipbordNotifier = NULL;
-	}
+	} // if ( getView() && m_pClipbordNotifier )
+    if ( m_pGroupsFloater )
 	{
+        SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_GROUPS_SORTING ) );
+        aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pGroupsFloater->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) );
 		::std::auto_ptr<FloatingWindow> aTemp(m_pGroupsFloater);
 		m_pGroupsFloater = NULL;
 	}
 	if ( !m_pGroupsFloater )
 	{
 		m_pGroupsFloater = new OGroupsSortingDialog(getView(),!isEditable(),this);
+        SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_GROUPS_SORTING ) );
+        if ( aDlgOpt.Exists() )
+            m_pGroupsFloater->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
 		m_pGroupsFloater->AddEventListener(LINK(this,OReportController,EventLstHdl));
 	}
 	else if ( isUiVisible() )
     sal_Bool bTime = aMap.getUnpackedValueOrDefault(PROPERTY_TIME_STATE,sal_False);
     if ( bTime )
     {
-        sFunction = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("NOW()"));
+        sFunction = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("TIMEVALUE(NOW())"));
         aMap[PROPERTY_FORMATKEY] <<= aMap.getUnpackedValueOrDefault(PROPERTY_FORMATKEYTIME,sal_Int32(0));
         createControl(aMap.getAsConstPropertyValueList(),xSection,sFunction);
     }

File reportdesign/source/ui/report/ReportControllerObserver.cxx

 	    uno::Reference< container::XContainer > xSimpleContainer( _rxContainer, uno::UNO_QUERY );
         // OSL_ENSURE( xSimpleContainer.is(), "OXReportControllerObserver::switchListening: how are we expected to be notified of changes in the container?" );
 	    if ( xSimpleContainer.is() )
-	    {
+        {
             if ( _bStartListening )
 		        xSimpleContainer->addContainerListener( this );
             else
 		        xSimpleContainer->removeContainerListener( this );
-	    }
+        }
     }
     catch( const uno::Exception& )
     {
         {
             uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY );
 	        if ( xProps.is() )
-	        {
+            {
                 if ( _bStartListening )
     		        xProps->addPropertyChangeListener( ::rtl::OUString(), this );
                 else
     	    	    xProps->removePropertyChangeListener( ::rtl::OUString(), this );
-	        }
+            }
         }
 
         uno::Reference< util::XModifyBroadcaster > xBroadcaster( _rxObject, uno::UNO_QUERY );

File svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx

 #define PRIMITIVE2D_ID_OVERLAYHATCHRECTANGLEPRIMITIVE   (PRIMITIVE2D_ID_RANGE_SVX| 18)
 #define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE  (PRIMITIVE2D_ID_RANGE_SVX| 19)
 #define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 20)
-#define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D            (PRIMITIVE2D_ID_RANGE_SVX| 16)
+#define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D            (PRIMITIVE2D_ID_RANGE_SVX| 21)
 
 //////////////////////////////////////////////////////////////////////////////
 

File testautomation/dbaccess/optional/includes/wiz_TableWizard.inc

     call fOpendatabase(ConvertPath(gOfficePath + "user/work/TT_hsqldb.odb"))
     sleep(5)  
 
-    '/// check if tehre are 22 items in the business categoriy 
+    '/// check if there are 22 items in the business categoriy 
     if not fStartTableWizard() then
         warnlog "The table wizard doesn't start. TEST STOPPED"
         goto endsub
     endif    
 
-        Kontext "TableWizard"
-        dim iCount as integer
-        iCount = Tables.GetItemCount
-        if(iCount <> 22 ) then
-            warnlog "#102019# there are not 22 table in the category business. There are " + iCount
-            CancelBtn.Click
-            call fCloseDatabase()
-            goto endsub
-        endif
-        CancelBtn.Click        
+    Kontext "TableWizard"
+    dim iCount as integer
+    iCount = Tables.GetItemCount
+    if(iCount <> 22 ) then
+        warnlog "#102019# there are not 22 table in the category business. There are " + iCount
+        CancelBtn.Click
+        call fCloseDatabase()
+        goto endsub
+    endif
+    CancelBtn.Click        
     
     for i = 1 to 22
 
     
     '/// now create all tables from the personal tables
     printlog "now create all tables from the personal tables"
-
+    
+    if not fStartTableWizard() then
+        warnlog "The table wizard doesn't start. TEST STOPPED"
+        goto endsub
+    endif  
+    
     Kontext "TableWizard"            
         Personal.Check 
         iCount = Tables.GetItemCount

File wizards/com/sun/star/wizards/db/RelationController.java

         try
         {
             CommandName oLocCommandName = new CommandName(super.getCommandMetaData(), _sreferencedtablename);
-            XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), _sreferencedtablename);
+            XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), oLocCommandName.getTableName());
             XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
             boolean bleaveLoop = false;
             Vector aMasterFieldNamesVector = new Vector();
                 {
                     sPrimaryCatalog = xRow.getString(PKTABLE_CAT);
                 }
-                if (super.getCommandMetaData().xDBMetaData.supportsCatalogsInDataManipulation())
+                if (super.getCommandMetaData().xDBMetaData.supportsSchemasInDataManipulation())
                 {
                     sPrimarySchema = xRow.getString(PKTABLE_SCHEM);
                 }
                 String sForeignColumnName = xRow.getString(FKCOLUMN_NAME);
                 if (JavaTools.isSame(getTableName(), sPrimaryTableName))
                 {
-                    if (JavaTools.isSame(getSchemaName(), sPrimarySchema))
+                    if (sPrimarySchema == null || JavaTools.isSame(getSchemaName(), sPrimarySchema))
                     {
                         if (JavaTools.isSame(getCatalogName(), sPrimaryCatalog))
                         {

File wizards/com/sun/star/wizards/table/ScenarioSelector.java

  */
 public class ScenarioSelector extends FieldSelection implements XItemListener, XFieldSelectionListener
 {
-
+    final static int PRIVATE = 0;
+    final static int BUSINESS = 1;
+    
     private XFixedText lblExplanation;
     private XFixedText lblCategories;
     private XRadioButton optBusiness;
         {
             e.printStackTrace(System.out);
         }
-        initializeCategory(0);
+        initializeCategory(BUSINESS);
     }
 
     public int getCategory()
     {
         if (optBusiness.getState())
         {
-            curcategory = 0;
+            curcategory = BUSINESS;
         }
         else
         {
-            curcategory = 1;
+            curcategory = PRIVATE;
         }
         return curcategory;
     }
     {
         if (optBusiness.getState())
         {
-            initializeCategory(0);
+            initializeCategory(BUSINESS);
         }
         else
         {
-            initializeCategory(1);
+            initializeCategory(PRIVATE);
         }
     }