2010-10-12 15:59:03 +02:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-14 17:39:53 +01:00
/*
* This file is part of the LibreOffice project .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v . 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at http : //mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice :
*
* Licensed to the Apache Software Foundation ( ASF ) under one or more
* contributor license agreements . See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership . The ASF licenses this file to you under the Apache
* License , Version 2.0 ( 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.apache.org/licenses/LICENSE-2.0 .
*/
2006-09-17 06:24:03 +00:00
2001-02-05 08:26:47 +00:00
# include "SelectionBrowseBox.hxx"
# include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
# include <com/sun/star/sdbc/DataType.hpp>
# include "QueryDesignView.hxx"
# include "querycontroller.hxx"
# include "QueryTableView.hxx"
# include "browserids.hxx"
2012-01-02 10:55:27 +00:00
# include <comphelper/extract.hxx>
# include <comphelper/stl_types.hxx>
# include <comphelper/string.hxx>
2001-02-05 08:26:47 +00:00
# include <comphelper/types.hxx>
# include "TableFieldInfo.hxx"
2002-08-19 07:01:32 +00:00
# include "dbu_qry.hrc"
2001-02-05 08:26:47 +00:00
# include "dbaccess_helpid.hrc"
# include <com/sun/star/container/XNameAccess.hpp>
# include "dbustrings.hrc"
# include "QTableWindow.hxx"
# include <vcl/msgbox.hxx>
# include "QueryDesignFieldUndoAct.hxx"
2001-03-20 07:12:13 +00:00
# include "sqlmessage.hxx"
2002-05-24 11:58:56 +00:00
# include "UITools.hxx"
2011-02-03 00:33:36 +01:00
# include <osl/diagnose.h>
2012-11-16 16:14:53 -05:00
# include "svtools/treelistentry.hxx"
2001-02-14 13:54:12 +00:00
2001-06-29 07:45:10 +00:00
using namespace : : svt ;
2001-02-05 08:26:47 +00:00
using namespace : : dbaui ;
using namespace : : connectivity ;
using namespace : : com : : sun : : star : : uno ;
using namespace : : com : : sun : : star : : sdbc ;
using namespace : : com : : sun : : star : : beans ;
using namespace : : com : : sun : : star : : container ;
using namespace : : com : : sun : : star : : util ;
2003-05-19 11:56:04 +00:00
using namespace : : com : : sun : : star : : accessibility ;
2001-02-05 08:26:47 +00:00
2012-07-02 16:02:38 +01:00
# define g_strOne rtl::OUString("1")
# define g_strZero rtl::OUString("0")
2001-02-05 08:26:47 +00:00
# define DEFAULT_QUERY_COLS 20
2002-08-19 07:01:32 +00:00
# define DEFAULT_SIZE GetTextWidth(g_strZero) * 30
# define CHECKBOX_SIZE 10
# define HANDLE_ID 0
# define HANDLE_COLUMN_WITDH 70
2012-03-20 11:01:12 +01:00
# define SORT_COLUMN_NONE 0xFFFFFFFF
2001-02-05 08:26:47 +00:00
2002-08-30 10:14:45 +00:00
// -----------------------------------------------------------------------------
namespace
{
sal_Bool isFieldNameAsterix ( const : : rtl : : OUString & _sFieldName )
{
2011-12-19 18:10:37 -02:00
sal_Bool bAsterix = ! ( ! _sFieldName . isEmpty ( ) & & _sFieldName . toChar ( ) ! = ' * ' ) ;
2006-10-12 12:43:07 +00:00
if ( ! bAsterix )
2002-08-30 10:14:45 +00:00
{
String sName = _sFieldName ;
2012-01-02 10:55:27 +00:00
xub_StrLen nTokenCount = comphelper : : string : : getTokenCount ( sName , ' . ' ) ;
2002-08-30 10:14:45 +00:00
if ( ( nTokenCount = = 2 & & sName . GetToken ( 1 , ' . ' ) . GetChar ( 0 ) = = ' * ' )
| | ( nTokenCount = = 3 & & sName . GetToken ( 2 , ' . ' ) . GetChar ( 0 ) = = ' * ' ) )
{
bAsterix = sal_True ;
}
}
return bAsterix ;
}
2003-12-01 09:38:48 +00:00
// -----------------------------------------------------------------------------
sal_Bool lcl_SupportsCoreSQLGrammar ( const Reference < XConnection > & _xConnection )
{
sal_Bool bSupportsCoreGrammar = sal_False ;
if ( _xConnection . is ( ) )
{
try
{
Reference < XDatabaseMetaData > xMetaData = _xConnection - > getMetaData ( ) ;
bSupportsCoreGrammar = xMetaData . is ( ) & & xMetaData - > supportsCoreSQLGrammar ( ) ;
}
catch ( Exception & )
{
}
}
return bSupportsCoreGrammar ;
}
2002-08-30 10:14:45 +00:00
}
2006-06-20 02:27:27 +00:00
DBG_NAME ( OSelectionBrowseBox )
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
OSelectionBrowseBox : : OSelectionBrowseBox ( Window * pParent )
2002-08-19 07:01:32 +00:00
: EditBrowseBox ( pParent , EBBF_NOROWPICTURE , WB_3DLOOK , BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION | BROWSER_HIDESELECT |
BROWSER_HIDECURSOR | BROWSER_HLINESFULL | BROWSER_VLINESFULL )
2001-02-05 08:26:47 +00:00
, m_aFunctionStrings ( ModuleRes ( STR_QUERY_FUNCTIONS ) )
2006-06-20 02:27:27 +00:00
, m_nVisibleCount ( 0 )
2012-03-20 11:01:12 +01:00
, m_nLastSortColumn ( SORT_COLUMN_NONE )
2001-02-05 08:26:47 +00:00
, m_bOrderByUnRelated ( sal_True )
, m_bGroupByUnRelated ( sal_True )
2001-04-18 12:20:48 +00:00
, m_bStopTimer ( sal_False )
2001-10-23 11:30:27 +00:00
, m_bWasEditing ( sal_False )
2004-03-15 11:43:58 +00:00
, m_bDisableErrorBox ( sal_False )
2005-09-23 11:43:59 +00:00
, m_bInUndoMode ( sal_False )
2001-02-05 08:26:47 +00:00
{
DBG_CTOR ( OSelectionBrowseBox , NULL ) ;
2010-07-10 18:21:24 +02:00
SetHelpId ( HID_CTL_QRYDGNCRIT ) ;
2001-02-05 08:26:47 +00:00
2002-08-19 07:01:32 +00:00
m_nMode = BROWSER_COLUMNSELECTION | BROWSER_HIDESELECT
| BROWSER_KEEPSELECTION | BROWSER_HIDECURSOR
| BROWSER_HLINESFULL | BROWSER_VLINESFULL
| BROWSER_HEADERBAR_NEW ;
2001-02-05 08:26:47 +00:00
2001-03-07 08:27:45 +00:00
m_pTextCell = new Edit ( & GetDataWindow ( ) , 0 ) ;
2001-06-29 07:45:10 +00:00
m_pVisibleCell = new CheckBoxControl ( & GetDataWindow ( ) ) ;
2006-07-10 14:44:07 +00:00
m_pTableCell = new ListBoxControl ( & GetDataWindow ( ) ) ; m_pTableCell - > SetDropDownLineCount ( 20 ) ;
m_pFieldCell = new ComboBoxControl ( & GetDataWindow ( ) ) ; m_pFieldCell - > SetDropDownLineCount ( 20 ) ;
2001-06-29 07:45:10 +00:00
m_pOrderCell = new ListBoxControl ( & GetDataWindow ( ) ) ;
2006-07-10 14:44:07 +00:00
m_pFunctionCell = new ListBoxControl ( & GetDataWindow ( ) ) ; m_pFunctionCell - > SetDropDownLineCount ( 20 ) ;
2001-02-05 08:26:47 +00:00
2010-07-10 18:21:24 +02:00
m_pVisibleCell - > SetHelpId ( HID_QRYDGN_ROW_VISIBLE ) ;
m_pTableCell - > SetHelpId ( HID_QRYDGN_ROW_TABLE ) ;
m_pFieldCell - > SetHelpId ( HID_QRYDGN_ROW_FIELD ) ;
m_pOrderCell - > SetHelpId ( HID_QRYDGN_ROW_ORDER ) ;
m_pFunctionCell - > SetHelpId ( HID_QRYDGN_ROW_FUNCTION ) ;
2001-02-05 08:26:47 +00:00
//////////////////////////////////////////////////////////////////////
2013-03-02 15:06:22 +01:00
// switch off triState of ::com::sun::star::form::CheckBox
2001-02-05 08:26:47 +00:00
m_pVisibleCell - > GetBox ( ) . EnableTriState ( sal_False ) ;
2012-11-22 12:26:52 +01:00
Font aTitleFont = OutputDevice : : GetDefaultFont ( DEFAULTFONT_SANS_UNICODE , Window : : GetSettings ( ) . GetLanguageTag ( ) . getLanguageType ( ) , DEFAULTFONT_FLAGS_ONLYONE ) ;
2001-02-05 08:26:47 +00:00
aTitleFont . SetSize ( Size ( 0 , 6 ) ) ;
SetTitleFont ( aTitleFont ) ;
String aTxt ( ModuleRes ( STR_QUERY_SORTTEXT ) ) ;
2012-01-02 10:55:27 +00:00
xub_StrLen nCount = comphelper : : string : : getTokenCount ( aTxt , ' ; ' ) ;
2001-02-05 08:26:47 +00:00
xub_StrLen nIdx = 0 ;
for ( ; nIdx < nCount ; nIdx + + )
m_pOrderCell - > InsertEntry ( aTxt . GetToken ( nIdx ) ) ;
for ( long i = 0 ; i < BROW_ROW_CNT ; i + + )
m_bVisibleRow . push_back ( sal_True ) ;
2013-03-02 15:06:22 +01:00
m_bVisibleRow [ BROW_FUNCTION_ROW ] = sal_False ; // first hide
2001-04-18 12:20:48 +00:00
m_timerInvalidate . SetTimeout ( 200 ) ;
m_timerInvalidate . SetTimeoutHdl ( LINK ( this , OSelectionBrowseBox , OnInvalidateTimer ) ) ;
m_timerInvalidate . Start ( ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
OSelectionBrowseBox : : ~ OSelectionBrowseBox ( )
{
DBG_DTOR ( OSelectionBrowseBox , NULL ) ;
delete m_pTextCell ;
delete m_pVisibleCell ;
delete m_pFieldCell ;
delete m_pTableCell ;
delete m_pOrderCell ;
delete m_pFunctionCell ;
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : initialize ( )
{
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2003-12-01 09:38:48 +00:00
if ( xConnection . is ( ) )
2001-02-05 08:26:47 +00:00
{
2008-06-25 11:54:03 +00:00
const IParseContext & rContext = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getParser ( ) . getContext ( ) ;
2008-08-19 08:56:31 +00:00
IParseContext : : InternationalKeyCode eFunctions [ ] = { IParseContext : : KEY_AVG , IParseContext : : KEY_COUNT , IParseContext : : KEY_MAX
, IParseContext : : KEY_MIN , IParseContext : : KEY_SUM
, IParseContext : : KEY_EVERY
, IParseContext : : KEY_ANY
, IParseContext : : KEY_SOME
, IParseContext : : KEY_STDDEV_POP
, IParseContext : : KEY_STDDEV_SAMP
, IParseContext : : KEY_VAR_SAMP
, IParseContext : : KEY_VAR_POP
, IParseContext : : KEY_COLLECT
, IParseContext : : KEY_FUSION
, IParseContext : : KEY_INTERSECTION
} ;
2005-10-24 07:32:22 +00:00
2012-01-02 10:55:27 +00:00
String sGroup = m_aFunctionStrings . GetToken ( comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) - 1 ) ;
2005-10-24 07:32:22 +00:00
m_aFunctionStrings = m_aFunctionStrings . GetToken ( 0 ) ;
2012-05-31 12:36:21 +01:00
for ( size_t i = 0 ; i < sizeof ( eFunctions ) / sizeof ( eFunctions [ 0 ] ) ; + + i )
2005-10-24 07:32:22 +00:00
{
m_aFunctionStrings + = String ( RTL_CONSTASCII_USTRINGPARAM ( " ; " ) ) ;
2011-12-13 23:13:22 +00:00
m_aFunctionStrings + = rtl : : OStringToOUString ( rContext . getIntlKeywordAscii ( eFunctions [ i ] ) ,
RTL_TEXTENCODING_UTF8 ) ;
2010-11-25 01:16:20 +00:00
}
2005-10-24 07:32:22 +00:00
m_aFunctionStrings + = String ( RTL_CONSTASCII_USTRINGPARAM ( " ; " ) ) ;
m_aFunctionStrings + = sGroup ;
2012-02-09 18:47:32 +01:00
// Aggregate functions in general available only with Core SQL
// We slip in a few optionals one, too.
2003-12-01 09:38:48 +00:00
if ( lcl_SupportsCoreSQLGrammar ( xConnection ) )
{
2012-01-02 10:55:27 +00:00
xub_StrLen nCount = comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) ;
2003-12-01 09:38:48 +00:00
for ( xub_StrLen nIdx = 0 ; nIdx < nCount ; nIdx + + )
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( nIdx ) ) ;
}
2012-02-09 18:47:32 +01:00
else // else only COUNT(*) and COUNT("table".*)
2003-12-01 09:38:48 +00:00
{
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( 0 ) ) ;
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( 2 ) ) ; // 2 -> COUNT
}
try
2001-03-01 14:45:02 +00:00
{
2001-07-12 11:14:47 +00:00
Reference < XDatabaseMetaData > xMetaData = xConnection - > getMetaData ( ) ;
2003-12-01 09:38:48 +00:00
if ( xMetaData . is ( ) )
2001-07-12 11:14:47 +00:00
{
2003-12-01 09:38:48 +00:00
m_bOrderByUnRelated = xMetaData - > supportsOrderByUnrelated ( ) ;
m_bGroupByUnRelated = xMetaData - > supportsGroupByUnrelated ( ) ;
2001-07-12 11:14:47 +00:00
}
2001-03-01 14:45:02 +00:00
}
2003-12-01 09:38:48 +00:00
catch ( Exception & )
{
}
2001-02-05 08:26:47 +00:00
}
Init ( ) ;
}
//==============================================================================
OQueryDesignView * OSelectionBrowseBox : : getDesignView ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
OSL_ENSURE ( static_cast < const OQueryDesignView * > ( GetParent ( ) ) , " Parent isn't an OQueryDesignView! " ) ;
return static_cast < OQueryDesignView * > ( GetParent ( ) ) ;
}
// -----------------------------------------------------------------------------
OQueryDesignView * OSelectionBrowseBox : : getDesignView ( ) const
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
OSL_ENSURE ( static_cast < const OQueryDesignView * > ( GetParent ( ) ) , " Parent isn't an OQueryDesignView! " ) ;
return static_cast < OQueryDesignView * > ( GetParent ( ) ) ;
}
2002-08-19 07:01:32 +00:00
namespace
{
class OSelectionBrwBoxHeader : public : : svt : : EditBrowserHeader
{
2002-08-30 10:14:45 +00:00
OSelectionBrowseBox * m_pBrowseBox ;
2002-08-19 07:01:32 +00:00
protected :
virtual void Select ( ) ;
public :
2002-08-30 10:14:45 +00:00
OSelectionBrwBoxHeader ( OSelectionBrowseBox * pParent ) ;
2002-08-19 07:01:32 +00:00
} ;
2002-08-30 10:14:45 +00:00
OSelectionBrwBoxHeader : : OSelectionBrwBoxHeader ( OSelectionBrowseBox * pParent )
2002-08-19 07:01:32 +00:00
: : : svt : : EditBrowserHeader ( pParent , WB_BUTTONSTYLE | WB_DRAG )
, m_pBrowseBox ( pParent )
{
}
void OSelectionBrwBoxHeader : : Select ( )
{
EditBrowserHeader : : Select ( ) ;
2002-08-30 10:14:45 +00:00
m_pBrowseBox - > GrabFocus ( ) ;
2002-08-19 07:01:32 +00:00
BrowserMode nMode = m_pBrowseBox - > GetMode ( ) ;
if ( 0 = = m_pBrowseBox - > GetSelectColumnCount ( ) )
{
m_pBrowseBox - > DeactivateCell ( ) ;
2013-03-02 15:06:22 +01:00
// we are in the right mode if a row hase been selected row
2002-08-19 07:01:32 +00:00
if ( BROWSER_HIDESELECT = = ( nMode & BROWSER_HIDESELECT ) )
{
nMode & = ~ BROWSER_HIDESELECT ;
nMode | = BROWSER_MULTISELECTION ;
m_pBrowseBox - > SetMode ( nMode ) ;
}
}
m_pBrowseBox - > SelectColumnId ( GetCurItemId ( ) ) ;
2004-08-02 15:14:02 +00:00
m_pBrowseBox - > DeactivateCell ( ) ;
2002-08-19 07:01:32 +00:00
}
}
2001-02-05 08:26:47 +00:00
2002-08-19 07:01:32 +00:00
// -----------------------------------------------------------------------------
2006-06-20 02:27:27 +00:00
BrowserHeader * OSelectionBrowseBox : : imp_CreateHeaderBar ( BrowseBox * /*pParent*/ )
2002-08-19 07:01:32 +00:00
{
return new OSelectionBrwBoxHeader ( this ) ;
}
// -----------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : ColumnMoved ( sal_uInt16 nColId , sal_Bool _bCreateUndo )
2002-08-19 07:01:32 +00:00
{
EditBrowseBox : : ColumnMoved ( nColId ) ;
// swap the two columns
2011-01-14 15:00:11 +01:00
sal_uInt16 nNewPos = GetColumnPos ( nColId ) ;
2002-08-19 07:01:32 +00:00
OTableFields & rFields = getFields ( ) ;
2011-01-14 15:00:11 +01:00
if ( rFields . size ( ) > sal_uInt16 ( nNewPos - 1 ) )
2002-08-19 07:01:32 +00:00
{
2011-01-14 15:00:11 +01:00
sal_uInt16 nOldPos = 0 ;
2002-08-19 07:01:32 +00:00
OTableFields : : iterator aEnd = rFields . end ( ) ;
OTableFields : : iterator aIter = rFields . begin ( ) ;
for ( ; aIter ! = aEnd & & ( ( * aIter ) - > GetColumnId ( ) ! = nColId ) ; + + aIter , + + nOldPos )
;
2006-01-16 14:30:24 +00:00
OSL_ENSURE ( ( nNewPos - 1 ) ! = nOldPos & & nOldPos < rFields . size ( ) , " Old and new position are equal! " ) ;
if ( aIter ! = aEnd )
2002-08-19 07:01:32 +00:00
{
2006-01-16 14:30:24 +00:00
OTableFieldDescRef pOldEntry = rFields [ nOldPos ] ;
rFields . erase ( rFields . begin ( ) + nOldPos ) ;
rFields . insert ( rFields . begin ( ) + nNewPos - 1 , pOldEntry ) ;
// create the undo action
if ( ! m_bInUndoMode & & _bCreateUndo )
{
OTabFieldMovedUndoAct * pUndoAct = new OTabFieldMovedUndoAct ( this ) ;
pUndoAct - > SetColumnPosition ( nOldPos + 1 ) ;
pUndoAct - > SetTabFieldDescr ( pOldEntry ) ;
2002-08-19 07:01:32 +00:00
2008-06-25 11:54:03 +00:00
getDesignView ( ) - > getController ( ) . addUndoActionAndInvalidate ( pUndoAct ) ;
2010-11-25 01:16:20 +00:00
}
2002-08-19 07:01:32 +00:00
}
}
else
2011-03-12 12:04:35 +01:00
OSL_FAIL ( " Invalid column id! " ) ;
2002-08-19 07:01:32 +00:00
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : Init ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2002-08-19 07:01:32 +00:00
2001-06-29 07:45:10 +00:00
EditBrowseBox : : Init ( ) ;
2001-02-05 08:26:47 +00:00
2002-08-19 07:01:32 +00:00
// set the header bar
2006-06-20 02:27:27 +00:00
BrowserHeader * pNewHeaderBar = CreateHeaderBar ( this ) ;
pNewHeaderBar - > SetMouseTransparent ( sal_False ) ;
2002-08-19 07:01:32 +00:00
2006-06-20 02:27:27 +00:00
SetHeaderBar ( pNewHeaderBar ) ;
2002-08-19 07:01:32 +00:00
SetMode ( m_nMode ) ;
2001-02-05 08:26:47 +00:00
Font aFont ( GetDataWindow ( ) . GetFont ( ) ) ;
aFont . SetWeight ( WEIGHT_NORMAL ) ;
GetDataWindow ( ) . SetFont ( aFont ) ;
2008-12-10 13:41:25 +00:00
Size aHeight ;
const Control * pControls [ ] = { m_pTextCell , m_pVisibleCell , m_pTableCell , m_pFieldCell } ;
2012-05-31 12:36:21 +01:00
2012-05-31 12:47:35 +01:00
for ( sal_Size i = 0 ; i < sizeof ( pControls ) / sizeof ( pControls [ 0 ] ) ; + + i )
2008-12-10 13:41:25 +00:00
{
2013-01-14 10:40:11 +00:00
const Size aTemp ( pControls [ i ] - > GetOptimalSize ( ) ) ;
2008-12-10 13:41:25 +00:00
if ( aTemp . Height ( ) > aHeight . Height ( ) )
aHeight . Height ( ) = aTemp . Height ( ) ;
2010-11-25 01:16:20 +00:00
}
2008-12-10 13:41:25 +00:00
SetDataRowHeight ( aHeight . Height ( ) ) ;
2001-02-05 08:26:47 +00:00
SetTitleLines ( 1 ) ;
2013-03-02 15:06:22 +01:00
// get number of visible rows
2001-02-05 08:26:47 +00:00
for ( long i = 0 ; i < BROW_ROW_CNT ; i + + )
{
if ( m_bVisibleRow [ i ] )
m_nVisibleCount + + ;
}
RowInserted ( 0 , m_nVisibleCount , sal_False ) ;
2001-10-08 06:32:36 +00:00
try
2001-03-01 14:45:02 +00:00
{
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2001-10-08 06:32:36 +00:00
if ( xConnection . is ( ) )
{
Reference < XDatabaseMetaData > xMetaData = xConnection - > getMetaData ( ) ;
2003-12-01 09:38:48 +00:00
m_nMaxColumns = xMetaData . is ( ) ? xMetaData - > getMaxColumnsInSelect ( ) : 0 ;
2001-10-08 06:32:36 +00:00
}
else
m_nMaxColumns = 0 ;
2001-03-01 14:45:02 +00:00
}
2001-10-08 06:32:36 +00:00
catch ( const SQLException & )
{
2011-03-12 12:04:35 +01:00
OSL_FAIL ( " Catched Exception when asking for database metadata options! " ) ;
2001-03-01 14:45:02 +00:00
m_nMaxColumns = 0 ;
2001-10-08 06:32:36 +00:00
}
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2001-04-30 12:02:01 +00:00
void OSelectionBrowseBox : : PreFill ( )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
SetUpdateMode ( sal_False ) ;
if ( GetCurRow ( ) ! = 0 )
GoToRow ( 0 ) ;
2001-04-30 12:02:01 +00:00
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . clearFields ( ) ;
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
RemoveColumns ( ) ;
2002-08-19 07:01:32 +00:00
InsertHandleColumn ( HANDLE_COLUMN_WITDH ) ;
2001-02-05 08:26:47 +00:00
SetUpdateMode ( sal_True ) ;
}
2001-04-30 12:02:01 +00:00
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : ClearAll ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
SetUpdateMode ( sal_False ) ;
2001-10-05 05:49:21 +00:00
OTableFields : : reverse_iterator aIter = getFields ( ) . rbegin ( ) ;
2006-07-10 14:44:07 +00:00
for ( ; aIter ! = getFields ( ) . rend ( ) ; + + aIter )
2001-04-30 12:02:01 +00:00
{
2006-07-10 14:44:07 +00:00
if ( ! ( * aIter ) - > IsEmpty ( ) )
{
RemoveField ( ( * aIter ) - > GetColumnId ( ) ) ;
aIter = getFields ( ) . rbegin ( ) ;
}
2001-04-30 12:02:01 +00:00
}
2012-03-20 11:01:12 +01:00
m_nLastSortColumn = SORT_COLUMN_NONE ;
2001-04-30 12:02:01 +00:00
SetUpdateMode ( sal_True ) ;
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : SetReadOnly ( sal_Bool bRO )
{
if ( bRO )
{
DeactivateCell ( ) ;
m_nMode & = ~ BROWSER_HIDECURSOR ;
SetMode ( m_nMode ) ;
}
else
{
m_nMode | = BROWSER_HIDECURSOR ;
SetMode ( m_nMode ) ;
ActivateCell ( ) ;
}
}
//------------------------------------------------------------------------------
2001-06-29 07:45:10 +00:00
CellController * OSelectionBrowseBox : : GetController ( long nRow , sal_uInt16 nColId )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2008-06-25 11:54:03 +00:00
if ( nColId > getFields ( ) . size ( ) )
2006-07-10 14:44:07 +00:00
return NULL ;
2001-10-05 05:49:21 +00:00
OTableFieldDescRef pEntry = getFields ( ) [ nColId - 1 ] ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry . is ( ) , " OSelectionBrowseBox::GetController : keine FieldDescription ! " ) ;
2001-02-05 08:26:47 +00:00
2010-10-15 12:22:54 -05:00
if ( ! pEntry . is ( ) )
2001-02-05 08:26:47 +00:00
return NULL ;
2008-06-25 11:54:03 +00:00
if ( static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . isReadOnly ( ) )
2001-02-05 08:26:47 +00:00
return NULL ;
long nCellIndex = GetRealRow ( nRow ) ;
switch ( nCellIndex )
{
case BROW_FIELD_ROW :
2001-06-29 07:45:10 +00:00
return new ComboBoxCellController ( m_pFieldCell ) ;
2001-02-05 08:26:47 +00:00
case BROW_TABLE_ROW :
2001-06-29 07:45:10 +00:00
return new ListBoxCellController ( m_pTableCell ) ;
2001-02-05 08:26:47 +00:00
case BROW_VIS_ROW :
2001-06-29 07:45:10 +00:00
return new CheckBoxCellController ( m_pVisibleCell ) ;
2001-02-05 08:26:47 +00:00
case BROW_ORDER_ROW :
2001-06-29 07:45:10 +00:00
return new ListBoxCellController ( m_pOrderCell ) ;
2001-02-05 08:26:47 +00:00
case BROW_FUNCTION_ROW :
2001-06-29 07:45:10 +00:00
return new ListBoxCellController ( m_pFunctionCell ) ;
2001-02-05 08:26:47 +00:00
default :
2001-06-29 07:45:10 +00:00
return new EditCellController ( m_pTextCell ) ;
2001-02-05 08:26:47 +00:00
}
}
//------------------------------------------------------------------------------
2006-06-20 02:27:27 +00:00
void OSelectionBrowseBox : : InitController ( CellControllerRef & /*rController*/ , long nRow , sal_uInt16 nColId )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2005-12-21 12:37:05 +00:00
OSL_ENSURE ( nColId ! = BROWSER_INVALIDID , " An Invalid Id was set! " ) ;
if ( nColId = = BROWSER_INVALIDID )
return ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColId ) ;
2006-06-20 02:27:27 +00:00
if ( nPos = = 0 | | nPos = = BROWSER_INVALIDID | | nPos > getFields ( ) . size ( ) )
2005-12-21 12:37:05 +00:00
return ;
OTableFieldDescRef pEntry = getFields ( ) [ nPos - 1 ] ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry . is ( ) , " OSelectionBrowseBox::InitController : keine FieldDescription ! " ) ;
2001-02-05 08:26:47 +00:00
long nCellIndex = GetRealRow ( nRow ) ;
switch ( nCellIndex )
{
case BROW_FIELD_ROW :
{
m_pFieldCell - > Clear ( ) ;
m_pFieldCell - > SetText ( String ( ) ) ;
String aField ( pEntry - > GetField ( ) ) ;
String aTable ( pEntry - > GetAlias ( ) ) ;
getDesignView ( ) - > fillValidFields ( aTable , m_pFieldCell ) ;
2013-03-02 19:16:26 +01:00
// replace with alias.*
2001-02-05 08:26:47 +00:00
if ( ( aField . GetChar ( 0 ) = = ' * ' ) & & aTable . Len ( ) )
{
aField = aTable ;
aField . AppendAscii ( " .* " ) ;
}
m_pFieldCell - > SetText ( aField ) ;
} break ;
case BROW_TABLE_ROW :
{
m_pTableCell - > Clear ( ) ;
2001-10-05 05:49:21 +00:00
enableControl ( pEntry , m_pTableCell ) ;
2006-07-10 14:44:07 +00:00
if ( ! pEntry - > isCondition ( ) )
2001-02-05 08:26:47 +00:00
{
OJoinTableView : : OTableWindowMap * pTabWinList = getDesignView ( ) - > getTableView ( ) - > GetTabWinMap ( ) ;
if ( pTabWinList )
{
OJoinTableView : : OTableWindowMap : : iterator aIter = pTabWinList - > begin ( ) ;
2009-07-03 12:24:35 +00:00
OJoinTableView : : OTableWindowMap : : iterator aEnd = pTabWinList - > end ( ) ;
for ( ; aIter ! = aEnd ; + + aIter )
2001-02-05 08:26:47 +00:00
m_pTableCell - > InsertEntry ( static_cast < OQueryTableWindow * > ( aIter - > second ) - > GetAliasName ( ) ) ;
m_pTableCell - > InsertEntry ( String ( ModuleRes ( STR_QUERY_NOTABLE ) ) , 0 ) ;
2011-12-19 18:10:37 -02:00
if ( ! pEntry - > GetAlias ( ) . isEmpty ( ) )
2001-02-05 08:26:47 +00:00
m_pTableCell - > SelectEntry ( pEntry - > GetAlias ( ) ) ;
else
m_pTableCell - > SelectEntry ( String ( ModuleRes ( STR_QUERY_NOTABLE ) ) ) ;
}
}
} break ;
case BROW_VIS_ROW :
{
m_pVisibleCell - > GetBox ( ) . Check ( pEntry - > IsVisible ( ) ) ;
m_pVisibleCell - > GetBox ( ) . SaveValue ( ) ;
2001-10-05 05:49:21 +00:00
enableControl ( pEntry , m_pTextCell ) ;
2001-02-05 08:26:47 +00:00
if ( ! pEntry - > IsVisible ( ) & & pEntry - > GetOrderDir ( ) ! = ORDER_NONE & & ! m_bOrderByUnRelated )
{
2013-03-02 15:06:22 +01:00
// a column has to visible in order to show up in ORDER BY
2001-02-05 08:26:47 +00:00
pEntry - > SetVisible ( sal_True ) ;
m_pVisibleCell - > GetBox ( ) . Check ( pEntry - > IsVisible ( ) ) ;
m_pVisibleCell - > GetBox ( ) . SaveValue ( ) ;
m_pVisibleCell - > GetBox ( ) . Disable ( ) ;
m_pVisibleCell - > GetBox ( ) . EnableInput ( sal_False ) ;
2001-02-07 11:44:13 +00:00
String aMessage ( ModuleRes ( STR_QRY_ORDERBY_UNRELATED ) ) ;
2001-02-08 14:33:28 +00:00
OQueryDesignView * paDView = getDesignView ( ) ;
InfoBox ( paDView , aMessage ) . Execute ( ) ;
2001-02-05 08:26:47 +00:00
}
} break ;
case BROW_ORDER_ROW :
2006-10-12 12:43:07 +00:00
m_pOrderCell - > SelectEntryPos (
2011-01-14 15:00:11 +01:00
sal : : static_int_cast < sal_uInt16 > ( pEntry - > GetOrderDir ( ) ) ) ;
2001-10-05 05:49:21 +00:00
enableControl ( pEntry , m_pOrderCell ) ;
break ;
2001-02-05 08:26:47 +00:00
case BROW_COLUMNALIAS_ROW :
2001-10-05 05:49:21 +00:00
setTextCellContext ( pEntry , pEntry - > GetFieldAlias ( ) , HID_QRYDGN_ROW_ALIAS ) ;
2001-02-05 08:26:47 +00:00
break ;
case BROW_FUNCTION_ROW :
2002-08-30 10:14:45 +00:00
setFunctionCell ( pEntry ) ;
break ;
default :
2001-02-05 08:26:47 +00:00
{
2003-12-01 09:38:48 +00:00
sal_uInt16 nIdx = sal_uInt16 ( nCellIndex - BROW_CRIT1_ROW ) ;
2002-08-30 10:14:45 +00:00
setTextCellContext ( pEntry , pEntry - > GetCriteria ( nIdx ) , HID_QRYDGN_ROW_CRIT ) ;
}
}
Controller ( ) - > ClearModified ( ) ;
}
// -----------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : notifyTableFieldChanged ( const String & _sOldAlias , const String & _sAlias , sal_Bool & _bListAction , sal_uInt16 _nColumnId )
2002-08-30 10:14:45 +00:00
{
appendUndoAction ( _sOldAlias , _sAlias , BROW_TABLE_ROW , _bListAction ) ;
if ( m_bVisibleRow [ BROW_TABLE_ROW ] )
RowModified ( GetBrowseRow ( BROW_TABLE_ROW ) , _nColumnId ) ;
}
// -----------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : notifyFunctionFieldChanged ( const String & _sOldFunctionName , const String & _sFunctionName , sal_Bool & _bListAction , sal_uInt16 _nColumnId )
2002-08-30 10:14:45 +00:00
{
appendUndoAction ( _sOldFunctionName , _sFunctionName , BROW_FUNCTION_ROW , _bListAction ) ;
if ( ! m_bVisibleRow [ BROW_FUNCTION_ROW ] )
SetRowVisible ( BROW_FUNCTION_ROW , sal_True ) ;
RowModified ( GetBrowseRow ( BROW_FUNCTION_ROW ) , _nColumnId ) ;
}
// -----------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : clearEntryFunctionField ( const String & _sFieldName , OTableFieldDescRef & _pEntry , sal_Bool & _bListAction , sal_uInt16 _nColumnId )
2002-08-30 10:14:45 +00:00
{
if ( isFieldNameAsterix ( _sFieldName ) & & ( ! _pEntry - > isNoneFunction ( ) | | _pEntry - > IsGroupBy ( ) ) )
{
String sFunctionName ;
GetFunctionName ( SQL_TOKEN_COUNT , sFunctionName ) ;
String sOldLocalizedFunctionName = _pEntry - > GetFunction ( ) ;
2003-06-12 09:19:54 +00:00
if ( ! sOldLocalizedFunctionName . Equals ( sFunctionName ) | | _pEntry - > IsGroupBy ( ) )
2002-08-30 10:14:45 +00:00
{
// append undo action for the function field
_pEntry - > SetFunctionType ( FKT_NONE ) ;
_pEntry - > SetFunction ( : : rtl : : OUString ( ) ) ;
_pEntry - > SetGroupBy ( sal_False ) ;
notifyFunctionFieldChanged ( sOldLocalizedFunctionName , _pEntry - > GetFunction ( ) , _bListAction , _nColumnId ) ;
}
}
}
// -----------------------------------------------------------------------------
2006-12-13 15:53:47 +00:00
sal_Bool OSelectionBrowseBox : : fillColumnRef ( const OSQLParseNode * _pColumnRef , const Reference < XConnection > & _rxConnection , OTableFieldDescRef & _pEntry , sal_Bool & _bListAction )
2002-08-30 10:14:45 +00:00
{
OSL_ENSURE ( _pColumnRef , " No valid parsenode! " ) ;
: : rtl : : OUString sColumnName , sTableRange ;
2006-12-13 15:53:47 +00:00
OSQLParseTreeIterator : : getColumnRange ( _pColumnRef , _rxConnection , sColumnName , sTableRange ) ;
return fillColumnRef ( sColumnName , sTableRange , _rxConnection - > getMetaData ( ) , _pEntry , _bListAction ) ;
2002-08-30 10:14:45 +00:00
}
// -----------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox : : fillColumnRef ( const : : rtl : : OUString & _sColumnName , const : : rtl : : OUString & _sTableRange , const Reference < XDatabaseMetaData > & _xMetaData , OTableFieldDescRef & _pEntry , sal_Bool & _bListAction )
{
sal_Bool bError = sal_False ;
2006-08-15 09:56:20 +00:00
: : comphelper : : UStringMixEqual bCase ( _xMetaData - > supportsMixedCaseQuotedIdentifiers ( ) ) ;
2002-08-30 10:14:45 +00:00
// check if the table name is the same
2011-12-19 18:10:37 -02:00
if ( ! _sTableRange . isEmpty ( ) & & ( bCase ( _pEntry - > GetTable ( ) , _sTableRange ) | | bCase ( _pEntry - > GetAlias ( ) , _sTableRange ) ) )
2002-08-30 10:14:45 +00:00
{ // a table was already inserted and the tables contains that column name
if ( ! _pEntry - > GetTabWindow ( ) )
{ // fill tab window
: : rtl : : OUString sOldAlias = _pEntry - > GetAlias ( ) ;
2003-04-28 14:49:22 +00:00
if ( ! fillEntryTable ( _pEntry , _pEntry - > GetTable ( ) ) )
2002-08-30 10:14:45 +00:00
fillEntryTable ( _pEntry , _pEntry - > GetAlias ( ) ) ; // only when the first failed
if ( ! bCase ( sOldAlias , _pEntry - > GetAlias ( ) ) )
notifyTableFieldChanged ( sOldAlias , _pEntry - > GetAlias ( ) , _bListAction , GetCurColumnId ( ) ) ;
}
}
// check if the table window
OQueryTableWindow * pEntryTab = static_cast < OQueryTableWindow * > ( _pEntry - > GetTabWindow ( ) ) ;
if ( ! pEntryTab ) // no table found with this name so we have to travel through all tables
{
OJoinTableView : : OTableWindowMap * pTabWinList = getDesignView ( ) - > getTableView ( ) - > GetTabWinMap ( ) ;
if ( pTabWinList )
{
sal_uInt16 nTabCount = 0 ;
2010-12-04 12:33:49 +09:00
if ( ! static_cast < OQueryTableView * > ( getDesignView ( ) - > getTableView ( ) ) - > FindTableFromField ( _sColumnName , _pEntry , nTabCount ) ) // error occurred: column not in table window
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
String sErrorMsg ( ModuleRes ( RID_STR_FIELD_DOESNT_EXIST ) ) ;
sErrorMsg . SearchAndReplaceAscii ( " $name$ " , _sColumnName ) ;
2013-01-23 16:17:39 +01:00
OSQLErrorBox ( this , sErrorMsg ) . Execute ( ) ;
2002-08-30 10:14:45 +00:00
bError = sal_True ;
2001-02-05 08:26:47 +00:00
}
else
{
2002-08-30 10:14:45 +00:00
pEntryTab = static_cast < OQueryTableWindow * > ( _pEntry - > GetTabWindow ( ) ) ;
notifyTableFieldChanged ( String ( ) , _pEntry - > GetAlias ( ) , _bListAction , GetCurColumnId ( ) ) ;
2001-02-05 08:26:47 +00:00
}
}
2002-08-30 10:14:45 +00:00
}
if ( pEntryTab ) // here we got a valid table
_pEntry - > SetField ( _sColumnName ) ;
return bError ;
}
// -----------------------------------------------------------------------------
2013-01-23 15:36:35 +01:00
sal_Bool OSelectionBrowseBox : : saveField ( String & _sFieldName , OTableFieldDescRef & _pEntry , sal_Bool & _bListAction )
2002-08-30 10:14:45 +00:00
{
sal_Bool bError = sal_False ;
2008-06-25 11:54:03 +00:00
OQueryController & rController = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) ;
2002-08-30 10:14:45 +00:00
// first look if the name can be found in our tables
sal_uInt16 nTabCount = 0 ;
String sOldAlias = _pEntry - > GetAlias ( ) ;
if ( static_cast < OQueryTableView * > ( getDesignView ( ) - > getTableView ( ) ) - > FindTableFromField ( _sFieldName , _pEntry , nTabCount ) )
{
// append undo action for the alias name
_pEntry - > SetField ( _sFieldName ) ;
notifyTableFieldChanged ( sOldAlias , _pEntry - > GetAlias ( ) , _bListAction , GetCurColumnId ( ) ) ;
clearEntryFunctionField ( _sFieldName , _pEntry , _bListAction , _pEntry - > GetColumnId ( ) ) ;
return bError ;
}
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection ( rController . getConnection ( ) ) ;
2006-10-24 14:15:01 +00:00
Reference < XDatabaseMetaData > xMetaData ;
if ( xConnection . is ( ) )
xMetaData = xConnection - > getMetaData ( ) ;
OSL_ENSURE ( xMetaData . is ( ) , " OSelectionBrowseBox::saveField: invalid connection/meta data! " ) ;
if ( ! xMetaData . is ( ) )
return sal_True ;
2002-08-30 10:14:45 +00:00
: : rtl : : OUString sErrorMsg ;
// second test if the name can be set as select columns in a pseudo statement
// we have to look which entries we should quote
CWS-TOOLING: integrate CWS dba32b
2009-06-03 14:58:08 +0200 fs r272581 : #i102439#
2009-05-29 13:56:18 +0200 fs r272456 : remove the sub form when the 'add subform' setting changes from <true/> to <false/>, not only its controls
2009-05-29 13:19:27 +0200 fs r272454 : display '(Default)' instead of an empty string when a control has the default font
2009-05-28 20:49:18 +0200 fs r272428 : #i98162# getFirstSelectedValue: do not return reference to a temporary
2009-05-27 15:30:22 +0200 msc r272353 : #102303#
2009-05-26 13:03:06 +0200 fs r272295 : spelling
2009-05-26 12:59:54 +0200 fs r272294 : merge m48 version to get latest cygwin related fixes
2009-05-25 14:02:06 +0200 fs r272239 : remove references to local files, needed for debugging sessions only
2009-05-25 14:01:16 +0200 fs r272238 : #i102021# ensure members such as bNumberFormat are initialized before actually returning them
2009-05-25 13:10:20 +0200 fs r272236 : #i10000# reset ENABLE_EVOAB2
2009-05-22 06:44:45 +0200 oj r272167 : #i99104# add import handler for calc-sett
2009-05-22 06:42:27 +0200 oj r272166 : #i99104# impl NullDate as member
2009-05-22 06:36:22 +0200 oj r272165 : #i99104# handle nulldate from parent model
2009-05-22 06:33:13 +0200 oj r272164 : #i99104# export and import calculation-settings and nulldate
2009-05-22 06:27:50 +0200 oj r272163 : #i99104# export and import calculation-settings and nulldate
2009-05-20 13:29:58 +0200 oj r272118 : #i99911# handle invalid name
2009-05-20 13:28:49 +0200 oj r272117 : #i101261# handle different rowsets
2009-05-20 11:29:55 +0200 msc r272111 : #i100000#
2009-05-20 11:28:27 +0200 msc r272110 : merge in change from dba32a
2009-05-20 11:27:38 +0200 msc r272109 : #102082# CTRL + C does not work
2009-05-20 09:43:36 +0200 oj r272106 : clean up includes
2009-05-20 09:32:15 +0200 oj r272105 : #i99060# merge error resovled now VERTICAL_ALIGN is in both stmt
2009-05-20 08:37:21 +0200 msc r272104 : add workaround for issue #102010#
2009-05-20 08:10:12 +0200 oj r272103 : #i99104# use numberformatkey
2009-05-20 08:07:02 +0200 oj r272102 : #i99104# use column info from rowset
2009-05-20 08:04:43 +0200 oj r272101 : #i102032# use a special column type where prec and scale are the values currently set at the column
2009-05-20 08:03:04 +0200 oj r272100 : #i102032# correct type info, we have to use SQL defined type names
2009-05-19 10:27:02 +0200 oj r272061 : #i99104# export null-date
2009-05-19 08:26:53 +0200 oj r272056 : #i99104# export null-date
2009-05-18 13:15:10 +0200 msc r272014 : add issue #102019#
2009-05-18 11:33:07 +0200 msc r272005 : add issue #102019#
2009-05-18 08:59:45 +0200 msc r271996 : add workaroud for issue #102010#
2009-05-15 10:21:24 +0200 msc r271929 : #101944#
2009-05-11 21:18:30 +0200 fs r271792 : #i99914#
2009-05-08 13:52:06 +0200 oj r271715 : #i96423# remember column span
2009-05-08 11:26:19 +0200 oj r271708 : #i98605# impl new scale mode
2009-05-08 10:33:35 +0200 fs r271706 : SendUserCall: only call into the shape notification routine for UserCall types where this is necessary (performance issue)
2009-05-07 20:52:44 +0200 fs r271698 : outsource ShapeProperty from shapepropertynotifier.hxx
2009-05-07 20:43:33 +0200 fs r271697 : #i99056# use notifyShapePropertyChange, instead of getShapePropertyChangeNotifier - the latter throws if no shape exists, yet
2009-05-07 20:33:58 +0200 fs r271696 : #i99056# +notifyShapePropertyChange: allow notifying chages without checking whether there actually already exists an SvxShape
2009-05-07 16:22:15 +0200 fs r271679 : #i10000# cygwin needs quotes around the classpath
2009-05-07 16:21:37 +0200 fs r271678 : #i10000# cygwin needs quotes around the classpath
2009-05-07 16:01:11 +0200 oj r271677 : #i99914# notify parent handler
2009-05-07 15:54:54 +0200 fs r271676 : #i10000# cygwin needs some quoting
2009-05-07 14:49:48 +0200 oj r271672 : #i99277# quote alias name
2009-05-07 14:48:12 +0200 oj r271671 : #i92538# add ~ in front of type
2009-05-07 14:37:13 +0200 oj r271667 : #i99118# change type from char to varchar
2009-05-07 14:36:23 +0200 oj r271666 : #i99118# clear dest columns when changing to create new table
2009-05-07 13:35:32 +0200 oj r271657 : #i94467# handle type 0 as double as well
2009-05-07 13:20:49 +0200 oj r271655 : i99743# setNull when varchar is no text
2009-05-07 12:58:06 +0200 fs r271651 : initialize the SdrObject's property change notifier after the ctor, if necessary
2009-05-07 11:47:18 +0200 fs r271647 : #i10000#
2009-05-07 10:57:16 +0200 fs r271639 : OPropertyBrowserController::propertyChange: care for the current property state, too, and properly forward it to the UI
2009-05-07 10:18:14 +0200 fs r271636 : onNewComponent: do not ask the map for grid columns, it will throw
2009-05-07 10:09:55 +0200 fs r271634 : #i101623#
2009-05-07 09:53:44 +0200 fs r271631 : #i101622#
2009-05-06 21:55:53 +0200 fs r271615 : #i10000#
2009-05-06 21:10:42 +0200 fs r271611 : #i10000#
2009-05-06 13:11:48 +0200 fs r271583 : #i10000#
2009-05-05 22:29:31 +0200 fs r271559 : proper assertion message
2009-05-05 22:29:03 +0200 fs r271558 : diagnostics
2009-05-05 22:16:16 +0200 fs r271557 : #i10000#
2009-05-05 13:50:32 +0200 fs r271513 : #i10000#
2009-05-05 10:21:50 +0200 fs r271503 : #i10000#
2009-05-05 09:30:26 +0200 fs r271501 : why did those survive the rebase -C step?
2009-05-05 09:18:12 +0200 fs r271500 : #i10000#
2009-05-04 17:08:17 +0200 fs r271475 : CWS-TOOLING: rebase CWS dba32b to trunk@271427 (milestone: DEV300:m47)
2009-05-04 14:51:26 +0200 fs r271456 : line ends
2009-04-30 15:55:27 +0200 fs r271418 : NewURL -> PublicConnectionURL
2009-04-22 21:18:34 +0200 fs r271141 : #i100944#
2009-04-22 09:12:26 +0200 oj r271071 : #i101261# little code change
2009-04-22 09:11:43 +0200 oj r271070 : #i101261# only ask for parameters which aren't set before
2009-04-22 09:11:25 +0200 oj r271069 : #i101261# new grabage container for nodes
2009-04-22 09:11:02 +0200 oj r271068 : #i101261# new grabage container for nodes
2009-04-22 09:10:44 +0200 oj r271067 : #i101261# new grabage container for nodes
2009-04-22 09:10:21 +0200 oj r271066 : #i101261# only ask for parameters which aren't set before
2009-04-22 09:08:24 +0200 oj r271065 : #i101261# only ask for parameters which aren't set before
2009-04-22 09:07:25 +0200 oj r271064 : #i101261# only ask for parameters which aren't set before
2009-04-22 08:49:07 +0200 oj r271062 : #i77501# preview only when needed
2009-04-22 08:45:44 +0200 oj r271061 : #i101261# new prop max rows
2009-04-22 08:44:18 +0200 oj r271060 : #i101261# create dataprovider earlier to avoid the wrong legend in chart
2009-04-22 08:42:48 +0200 oj r271059 : #i101261# handle parameter
2009-04-17 21:00:23 +0200 fs r270954 : #i98350#
2009-04-17 13:54:19 +0200 fs r270942 : #i99565#
2009-04-17 13:51:34 +0200 fs r270940 : #i101153# only localize the (potentially) localizable properties when there really is support at the control model
2009-04-17 11:43:14 +0200 fs r270932 : removed superfluous include
2009-04-17 10:10:15 +0200 fs r270926 : #i10000#
2009-04-17 10:02:36 +0200 fs r270925 : #i10000#
2009-04-17 09:15:13 +0200 fs r270918 : #i99056# some more refactoring of the recently introduced property change notification mechanism for UNO shapes
2009-04-17 09:14:56 +0200 fs r270917 : #i99056# some more refactoring of the recently introduced property change notification mechanism for UNO shapes
2009-04-17 09:13:25 +0200 fs r270915 : #i99056# some more refactoring of the recently introduced property change notification mechanism for UNO shapes
2009-04-17 08:30:34 +0200 fs r270914 : removed unotools/servicehelper.hxx in favour of the (duplicated) comphelper/servicehelper.hxx
2009-04-16 21:05:25 +0200 fs r270903 : #i10000#
2009-04-16 20:43:43 +0200 fs r270902 : #i99056# shape notification outsourced to the SdrObject, this is what all other shape implementations (which only aggregate an SvxShape) have access to, too
2009-04-16 15:57:36 +0200 fs r270891 : #i99056# make SetUnoControlModel virtual
2009-04-16 15:44:02 +0200 fs r270890 : #i99056# let the ScShapeObj notify changes in its Anchor property
2009-04-16 15:36:47 +0200 fs r270889 : #i99056# enable the sheet anchor type property, too
2009-04-16 15:33:45 +0200 fs r270887 : #i99056# shape notification outsourced to the SdrObject, this is what all other shape implementations (which only aggregate an SvxShape) have access to, too
2009-04-15 14:53:13 +0200 fs r270844 : #i10000#
2009-04-15 13:08:29 +0200 fs r270836 : #i10000#
2009-04-15 12:28:14 +0200 fs r270832 : #i10000#
2009-04-15 10:59:14 +0200 fs r270827 : #i10000#
2009-04-15 09:41:08 +0200 oj r270823 : fix issues found with findbugs and pmd
2009-04-14 21:08:04 +0200 fs r270808 : #i99056# implement SheetAnchorType - now the only thing missing to enable it is the proper notification when it is modified
2009-04-14 17:09:00 +0200 fs r270799 : #i99056# implement XServiceInfo for the ScShapeObj
2009-04-14 17:07:55 +0200 fs r270798 : #i99056# implement TextAnchorType, partially implement SheetAnchorType
2009-04-14 15:54:05 +0200 fs r270786 : #i99056# SwXShape: notify changes of the AnchorType property
2009-04-14 15:47:32 +0200 fs r270785 : #i99056# deliver shapepropertynotifier.hxx
2009-04-14 15:46:54 +0200 fs r270784 : diagnostics
2009-04-14 15:08:28 +0200 fs r270781 : #i99056# outsourced the SvxShape's property change notification code into a dedicated class
2009-04-14 14:41:09 +0200 fs r270773 : #i99056# outsourced the SvxShape's property change notification code into a dedicated class
2009-04-14 14:37:23 +0200 fs r270772 : in dtor, remove the properties from the temporary component context
2009-04-14 14:36:34 +0200 fs r270771 : getWeakUnoShape made const
2009-04-14 12:23:08 +0200 oj r270757 : #i101064# add missing braces
2009-04-14 12:21:25 +0200 oj r270756 : #i101065# add braces for gcc 4.3.2
2009-04-14 12:17:45 +0200 oj r270755 : #i101059# add dep for manifest
2009-04-09 12:06:58 +0200 oj r270686 : #i93100# use OptimalSize from control to get height
2009-04-08 09:56:55 +0200 oj r270619 : #i92537# handle calculations in the select columns as well
2009-04-08 09:30:39 +0200 oj r270615 : #i96657# throw error message when the key doesn't have any columns
2009-04-07 12:08:26 +0200 oj r270592 : #i77501# impl preview of the executed report
2009-04-07 12:01:56 +0200 oj r270591 : #i77501# impl preview of the executed report
2009-04-07 11:41:03 +0200 oj r270590 : #i77501# impl preview of the executed report
2009-04-07 11:39:32 +0200 oj r270589 : #i77501# impl preview of the executed report
2009-04-07 11:29:25 +0200 oj r270588 : #i77501# convert dos to unix lineends
2009-04-07 11:28:23 +0200 oj r270587 : #i77501# impl preview of the executed report
2009-04-07 11:16:50 +0200 oj r270586 : #i77501# impl preview of the executed report
2009-04-07 11:16:00 +0200 oj r270585 : #i77501# impl preview of the executed report
2009-04-07 11:15:44 +0200 oj r270584 : #i77501# impl preview of the executed report
2009-04-07 11:15:28 +0200 oj r270583 : #i77501# impl preview of the executed report
2009-04-07 11:15:04 +0200 oj r270582 : #i77501# impl preview of the executed report
2009-04-06 15:38:54 +0200 fs r270559 : merge changes from CWS dba32a herein
2009-04-03 15:56:16 +0200 fs r270494 : ImpSvMEdit::Resize: do multiple iterations, if necessary
2009-04-03 14:35:49 +0200 fs r270487 : #i10000#
2009-04-03 13:17:16 +0200 fs r270476 : #i99056# display geometry information for controls, too
2009-04-03 13:16:37 +0200 fs r270475 : #i99056# better ordering of the geometry properties
2009-04-03 13:16:07 +0200 fs r270473 : #i99056# now that SvxShape supports property change listeners, forward add/remove requests to it
2009-04-03 13:13:18 +0200 fs r270472 : #i99056# at SvxShape, allow for PropertyChangeListeners for Size/Position
2009-04-03 09:29:27 +0200 oj r270456 : #i94571# use correct prop name
2009-04-03 09:14:54 +0200 fs r270451 : merge changes from CWS dba32a herein
2009-04-02 17:00:51 +0200 fs r270424 : better diagnostics
2009-04-02 16:35:19 +0200 fs r270421 : diagnostics
2009-04-02 16:34:50 +0200 fs r270420 : #i99056# mxUnoShape not accessible anymore, use impl_setUnoShape instead
2009-04-02 16:32:48 +0200 fs r270419 : #i99056# make getUnoShape cheaper: keep the pointer to the SvxShape all the time, so there's no need to ask for it in getUnoShape. As a consequence, we will later be able to use the pointer in scenarious where performance (potentially) matters
2009-04-02 16:31:13 +0200 fs r270417 : merge changes from CWS dba32a herein
2009-04-02 16:23:16 +0200 fs r270414 : merge changes from CWS dba32a herein
2009-04-02 14:10:35 +0200 fs r270405 : #i10000#
2009-04-02 14:06:26 +0200 fs r270404 : merge changes from CWS dba32a herein
2009-04-02 14:03:03 +0200 fs r270401 : #i10000#
2009-04-02 13:58:13 +0200 fs r270400 : #i10000#
2009-04-02 12:59:44 +0200 fs r270397 : merge changes from CWS dba32a herein
2009-04-02 12:46:30 +0200 fs r270396 : #i99056# let the form page maintain a mapping between control models and control shapes
2009-04-02 12:44:07 +0200 fs r270395 : merge changes from CWS dba32a herein
2009-04-02 12:42:06 +0200 fs r270394 : merge changes from CWS dba32a herein
2009-04-02 12:35:20 +0200 fs r270393 : #i10000# precompiled header
2009-04-02 12:05:31 +0200 fs r270392 : merge changes from CWS dba32a herein
2009-04-02 12:00:42 +0200 fs r270391 : merge changes from CWS dba32a herein
2009-04-02 11:47:26 +0200 fs r270390 : merge changes from CWS dba32a herein
2009-04-02 11:39:15 +0200 oj r270389 : #i94467# foxpro impl several new types
2009-04-02 11:35:58 +0200 fs r270387 : merge changes from CWS dba32a herein
2009-04-01 14:10:51 +0200 fs r270329 : merge changes from CWS dba32a herein
2009-03-31 17:29:50 +0200 fs r270290 : merge changes from CWS dba32a herein
2009-03-30 14:53:56 +0200 fs r270233 : #i100417# don't set grid column widths to 0, but to <void/>
2009-03-30 12:31:03 +0200 oj r270213 : #i100552# wrong orb used
2009-03-30 12:19:20 +0200 oj r270212 : #i98303# convertlike corrected to sal_Unicode
2009-03-30 11:58:25 +0200 fs r270210 : merge changes from CWS dba32a herein
2009-03-30 11:38:16 +0200 oj r270205 : remove duplicate code from merge
2009-03-30 11:02:27 +0200 fs r270202 : merge changes from CWS dba32a herein
2009-03-30 11:02:19 +0200 fs r270201 : merge changes from CWS dba32a herein
2009-03-30 10:31:26 +0200 oj r270200 : #i100665# only throw exception and do not drop table
2009-03-30 09:36:24 +0200 fs r270195 : assertion text
2009-03-28 20:21:58 +0100 fs r270187 : #ii10000#
2009-03-28 20:19:54 +0100 fs r270186 : removed unused help ids
2009-03-28 20:19:40 +0100 fs r270185 : removed unused help ids
2009-03-28 20:19:10 +0100 fs r270184 : #i100237# +DefaultState/XReset
2009-03-28 00:29:29 +0100 fs r270177 : CWS-TOOLING: rebase CWS dba32b to trunk@270033 (milestone: DEV300:m45)
2009-03-27 22:56:46 +0100 fs r270173 : #i100237# DEFAULT_CHECKED -> DEFAULT_STATE
2009-03-27 22:55:52 +0100 fs r270172 : #i100237# DefaultState property for buttons, enabled only when Toggle=Yes
2009-03-27 22:54:15 +0100 fs r270171 : #i100237# DEFAULT_CHECKED -> DEFAULT_STATE
2009-03-27 22:53:54 +0100 fs r270170 : #i100237# introduce a DefaultState property for buttons, which implies buttongs supporting XReset, which needed some refactoring
2009-03-27 13:31:41 +0100 fs r270152 : ignore output paths
2009-03-27 11:23:44 +0100 fs r270139 : tuned behavior with respect to invalid keys/values
2009-03-27 09:57:14 +0100 fs r270136 : don't allow Double.NaN
2009-03-27 09:56:16 +0100 fs r270135 : talk about Double.NaN
2009-03-26 12:14:30 +0100 fs r270067 : removed unused parameter
2009-03-26 12:14:02 +0100 fs r270066 : removed widening conversion when checking keys
2009-03-26 09:17:34 +0100 fs r270053 : separated the enumerator functionality into a dedicated interface, this way not burdening XMap with it
2009-03-26 09:17:11 +0100 fs r270052 : separated the enumerator functionality into a dedicated interface, this way not burdening XMap with it
2009-03-26 09:16:49 +0100 fs r270051 : separated the enumerator functionality into a dedicated interface, this way not burdening XMap with it
2009-03-25 21:55:20 +0100 fs r270044 : #i100541# properly calculat bNeedScrollBox
2009-03-25 12:56:17 +0100 fs r270019 : renamed the previously introduced error condition
2009-03-25 12:11:48 +0100 fs r270015 : #i100095# when the error messages contain non-trivial details (SQLState/ErrorCode), then always display the 'Details' button
2009-03-25 12:10:05 +0100 fs r270012 : renamed the previously introduced error condition
2009-03-25 12:01:04 +0100 fs r270011 : #i100095# when no address book (or respective profile) can be found, then use a dedicated ErrorCondition
2009-03-25 10:29:07 +0100 fs r270003 : add missing localization
2009-03-25 10:23:12 +0100 fs r270001 : in preparation of #i1000095#:
rework the error handling, allow using css.sdb.ErrorCondition values, plus
allow propagating the nsresult
2009-03-25 10:21:55 +0100 fs r270000 : in preparation of #i1000095#:
rework the error handling, allow using css.sdb.ErrorCondition values, plus
allow propagating the nsresult
2009-03-20 23:05:38 +0100 fs r269829 : XMap::getSize removed
2009-03-20 23:05:19 +0100 fs r269828 : changes as suggested by sb
2009-03-20 23:04:56 +0100 fs r269827 : enhanced documentation
2009-03-20 15:31:40 +0100 fs r269815 : changes as suggested by sb
2009-03-20 13:23:52 +0100 oj r269804 : #i92538# correct the zorder that fixedtext is infront of control
2009-03-20 12:59:38 +0100 oj r269801 : #i94571# paraadjust now supports BLOCK
2009-03-20 12:58:11 +0100 oj r269800 : #i94571# export style with data style
2009-03-20 12:57:05 +0100 oj r269799 : #i94571# text align is now paraadjust
2009-03-20 12:37:02 +0100 fs r269797 : enum keys only accepted if they have the exact type, not if they have *any* enum type
2009-03-20 12:28:31 +0100 fs r269794 : some changes requested by sb
2009-03-20 08:52:47 +0100 fs r269780 : doc
2009-03-20 07:37:31 +0100 oj r269779 : #i99913# only notifiy when values are different
2009-03-20 07:36:58 +0100 oj r269778 : #i99913# add undoenv as listener at the dataprovider
2009-03-19 22:52:52 +0100 fs r269771 : added comment
2009-03-19 22:40:06 +0100 fs r269770 : +testEnumeration
2009-03-19 22:39:41 +0100 fs r269769 : implemented enumeration, getKeySet, and getValues. Should be finished now.
2009-03-19 14:01:01 +0100 oj r269743 : #i99913# reset the modified state when selecting an object
2009-03-19 12:19:54 +0100 lla r269739 : #i72390# cleanups
2009-03-19 09:25:27 +0100 fs r269727 : #i10000#
2009-03-18 23:37:02 +0100 fs r269708 : extended checks for value type acceptance
2009-03-18 23:36:41 +0100 fs r269707 : fixed value type checks
2009-03-18 14:59:56 +0100 fs r269678 : initial complex test case for the new css.container.Map implementation
2009-03-18 14:59:24 +0100 fs r269677 : verifyExpectedException moved to base class (in complexlib), and renamed to assureException for consistency
2009-03-18 14:58:35 +0100 fs r269676 : removed unused imports
2009-03-18 14:58:03 +0100 fs r269675 : first implementation of the new css.container.Map service (not completed, yet)
2009-03-18 14:57:17 +0100 fs r269674 : base class for UNO components, freeing you from some repeating work
2009-03-18 14:55:53 +0100 fs r269672 : +assureException: call a given method with given parameters on a given object, ensure that a given exception is thrown by the method implementation
2009-03-18 14:54:58 +0100 fs r269671 : +getComponentContext
2009-03-18 14:54:00 +0100 fs r269670 : isEmpty returns a boolean, not a long
2009-03-18 14:14:43 +0100 oj r269663 : #i99743# now text also supports null
2009-03-18 13:54:14 +0100 oj r269660 : #i99223# remove check for 2 params
2009-03-18 13:33:35 +0100 oj r269659 : #i99060# replace text::ParagraphVertAlign with style::VerticalAlignment
2009-03-18 13:32:18 +0100 oj r269658 : #i99060# don't set void property when void isn't allowed
2009-03-18 13:31:11 +0100 oj r269657 : #i99060# handle vertical alignment
2009-03-18 13:28:28 +0100 oj r269656 : #i99060# remove unused elements from sytle
2009-03-18 09:35:42 +0100 lla r269639 : #i72390# cleanups
2009-03-18 09:31:20 +0100 lla r269638 : #i72390# add ButtonList
2009-03-18 09:30:46 +0100 lla r269637 : #i72390# renamed interface
2009-03-18 09:30:15 +0100 lla r269636 : #i72390# use ButtonList instead of ImageList
2009-03-18 09:29:05 +0100 lla r269635 : #i72390# new ButtonList, cleanups
2009-03-18 09:26:34 +0100 lla r269634 : #i72390# cleanups
2009-03-17 12:21:20 +0100 oj r269590 : #i99222# remove assertion
2009-03-17 12:17:22 +0100 oj r269589 : #i98605# impl scale mode
2009-03-17 12:10:42 +0100 oj r269588 : #i98605# impl scale mode
2009-03-17 11:40:15 +0100 oj r269584 : #i96944# doesn't create equation for shapes
2009-03-17 11:33:16 +0100 oj r269583 : #i96423# switch calc from float to long
2009-03-16 15:19:18 +0100 fs r269550 : #i41930# enable zoom for embedded/outplace documents
2009-03-16 14:25:54 +0100 oj r269542 : #i93734# remove ContextSensitive
2009-03-16 14:21:58 +0100 oj r269541 : #i99274# page header before group header
2009-03-16 14:18:23 +0100 oj r269539 : #i99110# fix value type
2009-03-16 14:14:16 +0100 fs r269537 : line ends
2009-03-16 14:11:06 +0100 fs r269535 : line ends
2009-03-16 14:08:34 +0100 fs r269534 : #i100087# (provided my np): allow for polymorphic types with more than one parameter
2009-03-16 12:30:31 +0100 oj r269521 : compile error
2009-03-16 12:19:12 +0100 oj r269519 : compile error
2009-03-16 10:39:28 +0100 oj r269511 : compile error under linux with swap
2009-03-13 10:33:04 +0100 oj r269462 : CWS-TOOLING: rebase CWS dba32b to trunk@269297 (milestone: DEV300:m43)
2009-03-12 14:37:25 +0100 fs r269416 : interface SequenceOutputStreamTest is unneeded, and pollutes the namespace here :)
2009-03-12 14:35:07 +0100 fs r269414 : not needed
2009-03-12 14:34:15 +0100 fs r269413 : preparation for multiple tests in this module
2009-03-12 14:33:02 +0100 fs r269412 : ShowTargets was moved from module integration.forms to module complexlib
2009-03-12 14:32:48 +0100 fs r269411 : helper class for projects containing multiple complex test cases (and following a certain structure)
2009-03-12 14:00:14 +0100 fs r269407 : proper module after the move
2009-03-12 13:59:10 +0100 fs r269406 : superseded by ../makefile.mk
2009-03-12 13:47:38 +0100 fs r269403 : not needed anymore
2009-03-12 13:45:46 +0100 fs r269402 : moved, in preparation of adding more test cases here, with a common infrastructure
2009-03-12 13:45:07 +0100 fs r269401 : moved from ../
2009-03-12 13:43:59 +0100 fs r269400 : moved to ./comphelper, in preparation of adding more test cases here, with a common infrastructure
2009-03-12 13:29:47 +0100 oj r269396 : #i99914# set parent on dataprovider
2009-03-12 13:10:35 +0100 oj r269393 : #i99832# check thrown exception and show error
2009-03-12 13:08:10 +0100 fs r269392 : reorganizing tests
2009-03-12 12:52:55 +0100 oj r269390 : #i99118# convert formatkey in numberformat
2009-03-12 12:34:53 +0100 fs r269388 : new API tests
2009-03-12 12:29:05 +0100 fs r269386 : Map not yet committed
2009-03-12 12:28:36 +0100 fs r269385 : oops, forgot the SequenceInputStream during the previous refactoring
2009-03-12 12:12:39 +0100 oj r269384 : #i99104# set HasCategories prop
2009-03-12 12:12:08 +0100 oj r269383 : #i99104# check HasCategories even for internal dataprovider
2009-03-12 12:10:40 +0100 oj r269382 : #i99104# set HasCategories prop
2009-03-12 10:51:49 +0100 fs r269373 : #i10000# exception specifications
2009-03-12 10:49:18 +0100 fs r269372 : #i10000# exception specifications
2009-03-12 10:44:02 +0100 fs r269371 : #i10000# exception specifications
2009-03-12 10:30:55 +0100 fs r269368 : refactored the UNO service registration in this module, using the helper classes provided by comphelper itself, so you have less effort when extending the list of to-be-registered components
2009-03-12 10:30:37 +0100 fs r269367 : module-local includes
2009-03-12 07:05:54 +0100 oj r269357 : #i99104# database dataprovider doesn't need dataranges and diagramdata
2009-03-11 10:58:28 +0100 oj r269306 : #i99911# check if name of the report is a valid file name
2009-03-11 10:03:23 +0100 oj r269299 : #i99666# the report is new when the HierarchicalDocumentName is empty
2009-03-10 11:32:45 +0100 oj r269258 : #i99221# use fallback for language
2009-03-10 10:48:40 +0100 oj r269255 : #i99433# now use OStringBuffer
2009-03-10 10:36:21 +0100 fs r269252 : initial version of (X)Map
2009-03-10 09:52:23 +0100 oj r269246 : #i99433# now use OStringBuffer
2009-03-10 08:56:13 +0100 oj r269240 : #i99655# patch applied
2009-03-09 07:35:33 +0100 lla r269058 : #i10000# wrong variable assignment fixed
2009-03-06 17:20:40 +0100 fs r269030 : some explicit defaults
2009-03-06 17:20:30 +0100 fs r269029 : #i98600#
2009-03-06 14:40:34 +0100 fs r269009 : #i87692# during reload, prevent the document being modified just because of some control content changes ...
2009-03-06 12:52:20 +0100 lla r268997 : #i10000# ambigous problem with FontWeight fixed
2009-03-06 11:39:32 +0100 fs r268989 : #i10000# (approved by pl): use --without-t1-library configure option
2009-03-06 10:55:43 +0100 fs r268986 : #i99953# depends on xmlscript module now
2009-03-06 10:54:04 +0100 fs r268985 : #i99953# also adjust the event names found in dialogs embedded in the forms
2009-03-06 09:53:41 +0100 fs r268977 : #i10000#
2009-03-06 09:30:41 +0100 lla r268973 : #i10000# merge problems
2009-03-05 17:52:34 +0100 fs r268932 : #i98593# for sub components which are actually controlled by a DocumentDefinition (aka XComponentSupplier aka XCommandProcessor), close them by executing the 'close' command, not by suspending/closing the controller (which cannot be intercepted)
2009-03-05 11:41:56 +0100 fs r268889 : default the drop down line count for list/combo boxes to 20
2009-03-05 11:39:10 +0100 fs r268887 : do not display empty error messages
2009-03-02 10:13:57 +0100 lla r268639 : #i91541# CWS rebase m41 to m42
2009-03-02 09:06:27 +0100 lla r268635 : #i10000# add ';' to strings
2009-02-26 11:18:00 +0100 fs r268492 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-26 10:11:38 +0100 lla r268489 : CWS-TOOLING: rebase CWS dba32b to trunk@268395 (milestone: DEV300:m42)
2009-02-26 09:04:11 +0100 lla r268488 : CWS-TOOLING: rebase CWS dba32b to trunk@268395 (milestone: DEV300:m42)
2009-02-24 12:09:13 +0100 lla r268392 : #i91541# #i91542# cleanups
2009-02-24 08:08:06 +0100 lla r268382 : merge all dba32a changes into dba32b
2009-02-24 07:14:55 +0100 lla r268381 : merge all dba32a changes into dba32b
2009-02-23 21:44:28 +0100 fs r268377 : oops ... don't tamper with m_aListSourceValues at the end of loadData
2009-02-23 20:57:05 +0100 fs r268376 : #i98162# don't hold the values as strings, but as ORowSetValue, this way preserving their type, and being agnostic to different result/rowset implementations doing different to-string-conversations
2009-02-23 20:55:44 +0100 fs r268375 : getObject: throwFunctionNotSupportedException, instead of silently returning NULL
2009-02-23 20:55:20 +0100 fs r268374 : #i98162# some more supported types
2009-02-23 20:54:43 +0100 fs r268373 : #i98162# +operator !=
2009-02-20 09:35:39 +0100 fs r268306 : #i99422# for a font, display the font name, the style, and the size
2009-02-20 09:33:45 +0100 fs r268305 : #i99422# in the property browser, FONT supersedes CHARFONTNAME: the aggregated FormComponentHandler displays them more nicely now
2009-02-19 16:12:06 +0100 fs r268293 : #i99372# recognize DataType::FLOAT as numeric
2009-02-19 15:43:12 +0100 fs r268291 : #i99415#
2009-02-19 15:40:15 +0100 fs r268290 : #i99242# lcl_firstFocussableControl: take disabled controls into account
2009-02-19 15:34:36 +0100 fs r268289 : #i99396# properly decode the base name of the URL when using it as title
2009-02-19 15:19:05 +0100 fs r268287 : #i98247#
2009-06-05 09:47:55 +00:00
const : : rtl : : OUString sFieldAlias = _pEntry - > GetFieldAlias ( ) ;
2008-06-25 11:54:03 +00:00
: : connectivity : : OSQLParser & rParser ( rController . getParser ( ) ) ;
2002-08-30 10:14:45 +00:00
{
2013-01-23 15:36:35 +01:00
// automatically add parentheses around subqueries
OSQLParseNode * pParseNode = NULL ;
OUString devnull ;
pParseNode = rParser . parseTree ( devnull , _sFieldName , true ) ;
if ( pParseNode = = NULL )
pParseNode = rParser . parseTree ( devnull , _sFieldName , false ) ;
if ( pParseNode ! = NULL & & SQL_ISRULE ( pParseNode , select_statement ) )
_sFieldName = : : rtl : : OUString ( " ( " ) + _sFieldName + " ) " ;
}
2006-11-06 13:42:51 +00:00
2013-01-23 15:36:35 +01:00
OSQLParseNode * pParseNode = NULL ;
{
// 4 passes in trying to interprete the field name
// - don't quote the field name, parse internationally
// - don't quote the field name, parse en-US
// - quote the field name, parse internationally
// - quote the field name, parse en-US
size_t nPass = 4 ;
: : rtl : : OUString sQuotedFullFieldName ( : : dbtools : : quoteName ( xMetaData - > getIdentifierQuoteString ( ) , _sFieldName ) ) ;
: : rtl : : OUString sFullFieldName ( _sFieldName ) ;
2010-01-08 08:41:34 +01:00
if ( _pEntry - > isAggreateFunction ( ) )
{
2011-12-19 18:10:37 -02:00
OSL_ENSURE ( ! _pEntry - > GetFunction ( ) . isEmpty ( ) , " Functionname darf hier nicht leer sein! ;-( " ) ;
2013-01-23 15:36:35 +01:00
sQuotedFullFieldName = _pEntry - > GetFunction ( ) + " ( " + sQuotedFullFieldName + " ) " ;
sFullFieldName = _pEntry - > GetFunction ( ) + " ( " + sFullFieldName + " ) " ;
2010-01-08 08:41:34 +01:00
}
2013-01-23 15:36:35 +01:00
do
{
bool bQuote = ( nPass < = 2 ) ;
bool bInternational = ( nPass % 2 ) = = 0 ;
2002-08-30 10:14:45 +00:00
2013-01-23 15:36:35 +01:00
: : rtl : : OUString sSql ;
if ( bQuote )
sSql + = sQuotedFullFieldName ;
else
sSql + = sFullFieldName ;
2013-03-19 09:22:44 +01:00
sSql = : : rtl : : OUString ( " SELECT " ) + sSql ;
2013-01-23 15:36:35 +01:00
if ( ! sFieldAlias . isEmpty ( ) )
{ // always quote the alias name: there cannot be a function in it
2013-03-19 09:22:44 +01:00
sSql + = : : rtl : : OUString ( " " ) ;
2013-01-23 15:36:35 +01:00
sSql + = : : dbtools : : quoteName ( xMetaData - > getIdentifierQuoteString ( ) , sFieldAlias ) ;
}
2013-03-19 09:22:44 +01:00
sSql + = : : rtl : : OUString ( " FROM x " ) ;
2013-01-23 15:36:35 +01:00
pParseNode = rParser . parseTree ( sErrorMsg , sSql , bInternational ) ;
}
while ( ( pParseNode = = NULL ) & & ( - - nPass > 0 ) ) ;
2006-11-06 13:42:51 +00:00
}
if ( pParseNode = = NULL )
{
2013-01-23 15:36:35 +01:00
// something different which we have to check
2006-11-06 13:42:51 +00:00
String sErrorMessage ( ModuleRes ( STR_QRY_COLUMN_NOT_FOUND ) ) ;
sErrorMessage . SearchAndReplaceAscii ( " $name$ " , _sFieldName ) ;
2013-01-23 16:17:39 +01:00
OSQLErrorBox ( this , sErrorMessage ) . Execute ( ) ;
2006-11-06 13:42:51 +00:00
return sal_True ;
}
2002-08-30 10:14:45 +00:00
2006-11-06 13:42:51 +00:00
// we got a valid select column
// find what type of column has be inserted
: : connectivity : : OSQLParseNode * pSelection = pParseNode - > getChild ( 2 ) ;
if ( SQL_ISRULE ( pSelection , selection ) ) // we found the asterix
{
_pEntry - > SetField ( _sFieldName ) ;
clearEntryFunctionField ( _sFieldName , _pEntry , _bListAction , _pEntry - > GetColumnId ( ) ) ;
2013-01-23 15:36:35 +01:00
}
else // travel through the select column parse node
2006-11-06 13:42:51 +00:00
{
: : comphelper : : UStringMixEqual bCase ( xMetaData - > supportsMixedCaseQuotedIdentifiers ( ) ) ;
OTableFieldDescRef aSelEntry = _pEntry ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nColumnId = aSelEntry - > GetColumnId ( ) ;
2006-11-06 13:42:51 +00:00
sal_uInt32 nCount = pSelection - > count ( ) ;
for ( sal_uInt32 i = 0 ; i < nCount ; + + i )
{
if ( i > 0 ) // may we have to append more than one field
2002-08-30 10:14:45 +00:00
{
2011-01-14 15:00:11 +01:00
sal_uInt16 nColumnPostion ;
2006-11-06 13:42:51 +00:00
aSelEntry = FindFirstFreeCol ( nColumnPostion ) ;
2010-10-15 12:22:54 -05:00
if ( ! aSelEntry . is ( ) )
2002-08-30 10:14:45 +00:00
{
2006-11-06 13:42:51 +00:00
AppendNewCol ( 1 ) ;
2002-08-30 10:14:45 +00:00
aSelEntry = FindFirstFreeCol ( nColumnPostion ) ;
}
2006-11-06 13:42:51 +00:00
+ + nColumnPostion ;
nColumnId = GetColumnId ( nColumnPostion ) ;
}
2002-08-30 10:14:45 +00:00
2006-11-06 13:42:51 +00:00
: : connectivity : : OSQLParseNode * pChild = pSelection - > getChild ( i ) ;
OSL_ENSURE ( SQL_ISRULE ( pChild , derived_column ) , " No derived column found! " ) ;
// get the column alias
: : rtl : : OUString sColumnAlias = OSQLParseTreeIterator : : getColumnAlias ( pChild ) ;
2011-12-19 18:10:37 -02:00
if ( ! sColumnAlias . isEmpty ( ) ) // we found an as clause
2006-11-06 13:42:51 +00:00
{
String aSelectionAlias = aSelEntry - > GetFieldAlias ( ) ;
aSelEntry - > SetFieldAlias ( sColumnAlias ) ;
// append undo
appendUndoAction ( aSelectionAlias , aSelEntry - > GetFieldAlias ( ) , BROW_COLUMNALIAS_ROW , _bListAction ) ;
if ( m_bVisibleRow [ BROW_COLUMNALIAS_ROW ] )
RowModified ( GetBrowseRow ( BROW_COLUMNALIAS_ROW ) , nColumnId ) ;
}
2002-08-30 10:14:45 +00:00
2006-11-06 13:42:51 +00:00
: : connectivity : : OSQLParseNode * pColumnRef = pChild - > getChild ( 0 ) ;
if (
2013-01-23 15:36:35 +01:00
pColumnRef - > getKnownRuleID ( ) ! = OSQLParseNode : : subquery & &
2006-11-06 13:42:51 +00:00
pColumnRef - > count ( ) = = 3 & &
SQL_ISPUNCTUATION ( pColumnRef - > getChild ( 0 ) , " ( " ) & &
SQL_ISPUNCTUATION ( pColumnRef - > getChild ( 2 ) , " ) " )
)
pColumnRef = pColumnRef - > getChild ( 1 ) ;
2004-10-22 08:07:06 +00:00
2006-11-06 13:42:51 +00:00
if ( SQL_ISRULE ( pColumnRef , column_ref ) ) // we found a valid column name or more column names
{
// look if we can find the corresponding table
2006-12-13 15:53:47 +00:00
bError = fillColumnRef ( pColumnRef , xConnection , aSelEntry , _bListAction ) ;
2002-08-30 10:14:45 +00:00
2006-11-06 13:42:51 +00:00
// we found a simple column so we must clear the function fields but only when the column name is '*'
// and the function is different to count
clearEntryFunctionField ( _sFieldName , aSelEntry , _bListAction , nColumnId ) ;
}
2011-10-29 09:07:09 +02:00
// do we have a aggregate function and only a function?
else if ( SQL_ISRULE ( pColumnRef , general_set_fct ) )
2006-11-06 13:42:51 +00:00
{
2011-10-29 09:07:09 +02:00
String sLocalizedFunctionName ;
if ( GetFunctionName ( pColumnRef - > getChild ( 0 ) - > getTokenID ( ) , sLocalizedFunctionName ) )
2002-08-30 10:14:45 +00:00
{
2011-10-29 09:07:09 +02:00
String sOldLocalizedFunctionName = aSelEntry - > GetFunction ( ) ;
aSelEntry - > SetFunction ( sLocalizedFunctionName ) ;
sal_uInt32 nFunCount = pColumnRef - > count ( ) - 1 ;
sal_Int32 nFunctionType = FKT_AGGREGATE ;
sal_Bool bQuote = sal_False ;
// may be there exists only one parameter which is a column, fill all information into our fields
if ( nFunCount = = 4 & & SQL_ISRULE ( pColumnRef - > getChild ( 3 ) , column_ref ) )
bError = fillColumnRef ( pColumnRef - > getChild ( 3 ) , xConnection , aSelEntry , _bListAction ) ;
else if ( nFunCount = = 3 ) // we have a COUNT(*) here, so take the first table
2013-03-19 09:22:44 +01:00
bError = fillColumnRef ( : : rtl : : OUString ( " * " ) , : : rtl : : OUString ( ) , xMetaData , aSelEntry , _bListAction ) ;
2011-10-29 09:07:09 +02:00
else
2002-08-30 10:14:45 +00:00
{
2011-10-29 09:07:09 +02:00
nFunctionType | = FKT_NUMERIC ;
bQuote = sal_True ;
aSelEntry - > SetDataType ( DataType : : DOUBLE ) ;
aSelEntry - > SetFieldType ( TAB_NORMAL_FIELD ) ;
2002-08-30 10:14:45 +00:00
}
2006-11-06 13:42:51 +00:00
2011-10-29 09:07:09 +02:00
// now parse the parameters
: : rtl : : OUString sParameters ;
for ( sal_uInt32 function = 2 ; function < nFunCount ; + + function ) // we only want to parse the parameters of the function
pColumnRef - > getChild ( function ) - > parseNodeToStr ( sParameters , xConnection , & rParser . getContext ( ) , sal_True , bQuote ) ;
aSelEntry - > SetFunctionType ( nFunctionType ) ;
aSelEntry - > SetField ( sParameters ) ;
if ( aSelEntry - > IsGroupBy ( ) )
{
2012-01-02 10:55:27 +00:00
sOldLocalizedFunctionName = m_aFunctionStrings . GetToken ( comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) - 1 ) ;
2011-10-29 09:07:09 +02:00
aSelEntry - > SetGroupBy ( sal_False ) ;
}
// append undo action
notifyFunctionFieldChanged ( sOldLocalizedFunctionName , sLocalizedFunctionName , _bListAction , nColumnId ) ;
2006-11-06 13:42:51 +00:00
}
2009-11-26 12:56:23 +01:00
else
2011-10-29 09:07:09 +02:00
OSL_FAIL ( " Unsupported function inserted! " ) ;
}
else
{
// so we first clear the function field
clearEntryFunctionField ( _sFieldName , aSelEntry , _bListAction , nColumnId ) ;
: : rtl : : OUString sFunction ;
pColumnRef - > parseNodeToStr ( sFunction ,
xConnection ,
& rController . getParser ( ) . getContext ( ) ,
sal_True ,
sal_True ) ; // quote is to true because we need quoted elements inside the function
getDesignView ( ) - > fillFunctionInfo ( pColumnRef , sFunction , aSelEntry ) ;
2011-10-30 13:34:01 +01:00
if ( SQL_ISRULEOR3 ( pColumnRef , position_exp , extract_exp , fold ) | |
SQL_ISRULEOR3 ( pColumnRef , char_substring_fct , length_exp , char_value_fct ) )
2011-10-29 09:07:09 +02:00
// a calculation has been found ( can be calc and function )
2006-11-06 13:42:51 +00:00
{
2011-10-29 09:07:09 +02:00
// now parse the whole statement
sal_uInt32 nFunCount = pColumnRef - > count ( ) ;
: : rtl : : OUString sParameters ;
for ( sal_uInt32 function = 0 ; function < nFunCount ; + + function )
pColumnRef - > getChild ( function ) - > parseNodeToStr ( sParameters , xConnection , & rParser . getContext ( ) , sal_True , sal_True ) ;
sOldAlias = aSelEntry - > GetAlias ( ) ;
sal_Int32 nNewFunctionType = aSelEntry - > GetFunctionType ( ) | FKT_NUMERIC | FKT_OTHER ;
aSelEntry - > SetFunctionType ( nNewFunctionType ) ;
aSelEntry - > SetField ( sParameters ) ;
}
else
{
aSelEntry - > SetFieldAlias ( sColumnAlias ) ;
if ( SQL_ISRULE ( pColumnRef , set_fct_spec ) )
aSelEntry - > SetFunctionType ( /*FKT_NUMERIC | */ FKT_OTHER ) ;
2009-11-26 12:56:23 +01:00
else
2011-10-29 09:07:09 +02:00
aSelEntry - > SetFunctionType ( FKT_NUMERIC | FKT_OTHER ) ;
2002-08-30 10:14:45 +00:00
}
2009-11-26 12:56:23 +01:00
2011-10-29 09:07:09 +02:00
aSelEntry - > SetAlias ( : : rtl : : OUString ( ) ) ;
notifyTableFieldChanged ( sOldAlias , aSelEntry - > GetAlias ( ) , _bListAction , nColumnId ) ;
2002-08-30 10:14:45 +00:00
}
2011-10-29 09:07:09 +02:00
2010-10-15 12:22:54 -05:00
if ( i > 0 & & ! InsertField ( aSelEntry , BROWSER_INVALIDID , sal_True , sal_False ) . is ( ) ) // may we have to append more than one field
2011-10-29 09:07:09 +02:00
{ // the field could not be inserted
2006-11-06 13:42:51 +00:00
String sErrorMessage ( ModuleRes ( RID_STR_FIELD_DOESNT_EXIST ) ) ;
sErrorMessage . SearchAndReplaceAscii ( " $name$ " , aSelEntry - > GetField ( ) ) ;
2013-01-23 16:17:39 +01:00
OSQLErrorBox ( this , sErrorMessage ) . Execute ( ) ;
2006-11-06 13:42:51 +00:00
bError = sal_True ;
}
2001-02-05 08:26:47 +00:00
}
}
2006-11-06 13:42:51 +00:00
delete pParseNode ;
2001-02-05 08:26:47 +00:00
2002-08-30 10:14:45 +00:00
return bError ;
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox : : SaveModified ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2008-06-25 11:54:03 +00:00
OQueryController & rController = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) ;
2001-10-05 05:49:21 +00:00
OTableFieldDescRef pEntry = NULL ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nCurrentColumnPos = GetColumnPos ( GetCurColumnId ( ) ) ;
if ( getFields ( ) . size ( ) > static_cast < sal_uInt16 > ( nCurrentColumnPos - 1 ) )
2006-06-20 02:27:27 +00:00
pEntry = getEntry ( nCurrentColumnPos - 1 ) ;
2001-02-05 08:26:47 +00:00
2010-10-15 12:22:54 -05:00
sal_Bool bWasEmpty = pEntry . is ( ) ? pEntry - > IsEmpty ( ) : sal_False ;
2001-04-18 10:44:59 +00:00
sal_Bool bError = sal_False ;
sal_Bool bListAction = sal_False ;
2001-02-05 08:26:47 +00:00
2010-10-15 12:22:54 -05:00
if ( pEntry . is ( ) & & Controller ( ) . Is ( ) & & Controller ( ) - > IsModified ( ) )
2001-02-05 08:26:47 +00:00
{
2013-03-02 15:06:22 +01:00
// for the Undo-action
2001-04-18 10:44:59 +00:00
String strOldCellContents , sNewValue ;
2001-02-05 08:26:47 +00:00
long nRow = GetRealRow ( GetCurRow ( ) ) ;
2005-12-21 12:37:05 +00:00
sal_Bool bAppendRow = sal_False ;
2001-02-05 08:26:47 +00:00
switch ( nRow )
{
case BROW_VIS_ROW :
{
2006-10-12 12:43:07 +00:00
sal_Bool bOldValue = m_pVisibleCell - > GetBox ( ) . GetSavedValue ( ) ! = STATE_NOCHECK ;
2001-04-18 07:38:19 +00:00
strOldCellContents = bOldValue ? g_strOne : g_strZero ;
2001-04-18 10:44:59 +00:00
sNewValue = ! bOldValue ? g_strOne : g_strZero ;
}
if ( ( m_bOrderByUnRelated | | pEntry - > GetOrderDir ( ) = = ORDER_NONE ) & &
( m_bGroupByUnRelated | | ! pEntry - > IsGroupBy ( ) ) )
{
2001-02-05 08:26:47 +00:00
pEntry - > SetVisible ( m_pVisibleCell - > GetBox ( ) . IsChecked ( ) ) ;
}
else
{
pEntry - > SetVisible ( sal_True ) ;
m_pVisibleCell - > GetBox ( ) . Check ( ) ;
}
break ;
case BROW_FIELD_ROW :
{
String aFieldName ( m_pFieldCell - > GetText ( ) ) ;
2003-12-01 09:38:48 +00:00
try
2001-02-05 08:26:47 +00:00
{
2003-12-01 09:38:48 +00:00
if ( ! aFieldName . Len ( ) )
{
OTableFieldDescRef pNewEntry = new OTableFieldDesc ( ) ;
pNewEntry - > SetColumnId ( pEntry - > GetColumnId ( ) ) ;
: : std : : replace ( getFields ( ) . begin ( ) , getFields ( ) . end ( ) , pEntry , pNewEntry ) ;
sal_uInt16 nCol = GetCurColumnId ( ) ;
2013-03-02 15:06:22 +01:00
for ( int i = 0 ; i < m_nVisibleCount ; i + + ) // redraw column
2003-12-01 09:38:48 +00:00
RowModified ( i , nCol ) ;
2002-09-24 09:52:28 +00:00
}
else
2003-12-01 09:38:48 +00:00
{
strOldCellContents = pEntry - > GetField ( ) ;
bListAction = sal_True ;
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode )
2010-11-17 09:11:03 +01:00
rController . GetUndoManager ( ) . EnterListAction ( String ( ) , String ( ) ) ;
2003-12-01 09:38:48 +00:00
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = m_pFieldCell - > GetEntryPos ( aFieldName ) ;
2007-09-26 13:52:56 +00:00
String aAliasName = pEntry - > GetAlias ( ) ;
2012-01-02 10:55:27 +00:00
if ( nPos ! = COMBOBOX_ENTRY_NOTFOUND & & ! aAliasName . Len ( ) & & comphelper : : string : : getTokenCount ( aFieldName , ' . ' ) > 1 )
2003-12-01 09:38:48 +00:00
{ // special case, we have a table field so we must cut the table name
String sTableAlias = aFieldName . GetToken ( 0 , ' . ' ) ;
pEntry - > SetAlias ( sTableAlias ) ;
2007-09-26 13:52:56 +00:00
String sColumnName = aFieldName . Copy ( sTableAlias . Len ( ) + 1 , aFieldName . Len ( ) - sTableAlias . Len ( ) - 1 ) ;
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = rController . getConnection ( ) ;
2003-12-01 09:38:48 +00:00
if ( ! xConnection . is ( ) )
return sal_False ;
2006-12-13 15:53:47 +00:00
bError = fillColumnRef ( sColumnName , sTableAlias , xConnection - > getMetaData ( ) , pEntry , bListAction ) ;
2003-12-01 09:38:48 +00:00
}
else
bError = sal_True ;
2002-09-24 09:52:28 +00:00
2003-12-01 09:38:48 +00:00
if ( bError )
bError = saveField ( aFieldName , pEntry , bListAction ) ;
}
}
catch ( Exception & )
{
bError = sal_True ;
2002-08-30 10:14:45 +00:00
}
if ( bError )
{
sNewValue = aFieldName ;
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode )
2010-11-17 09:11:03 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . GetUndoManager ( ) . LeaveListAction ( ) ;
2002-09-24 09:52:28 +00:00
bListAction = sal_False ;
2001-02-05 08:26:47 +00:00
}
2002-08-30 10:14:45 +00:00
else
sNewValue = pEntry - > GetField ( ) ;
2008-06-25 11:54:03 +00:00
rController . InvalidateFeature ( ID_BROWSER_QUERY_EXECUTE ) ;
2001-02-05 08:26:47 +00:00
}
break ;
case BROW_TABLE_ROW :
{
String aAliasName = m_pTableCell - > GetSelectEntry ( ) ;
strOldCellContents = pEntry - > GetAlias ( ) ;
2002-08-30 10:14:45 +00:00
if ( m_pTableCell - > GetSelectEntryPos ( ) ! = 0 )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
pEntry - > SetAlias ( aAliasName ) ;
// we have to set the table name as well as the table window
OJoinTableView : : OTableWindowMap * pTabWinList = getDesignView ( ) - > getTableView ( ) - > GetTabWinMap ( ) ;
if ( pTabWinList )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
OJoinTableView : : OTableWindowMapIterator aIter = pTabWinList - > find ( aAliasName ) ;
if ( aIter ! = pTabWinList - > end ( ) )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
OQueryTableWindow * pEntryTab = static_cast < OQueryTableWindow * > ( aIter - > second ) ;
if ( pEntryTab )
{
pEntry - > SetTable ( pEntryTab - > GetTableName ( ) ) ;
pEntry - > SetTabWindow ( pEntryTab ) ;
}
2001-02-05 08:26:47 +00:00
}
}
}
2002-08-30 10:14:45 +00:00
else
{
pEntry - > SetAlias ( : : rtl : : OUString ( ) ) ;
pEntry - > SetTable ( : : rtl : : OUString ( ) ) ;
pEntry - > SetTabWindow ( NULL ) ;
}
sNewValue = pEntry - > GetAlias ( ) ;
2001-02-05 08:26:47 +00:00
} break ;
case BROW_ORDER_ROW :
{
2013-02-20 00:21:37 +01:00
strOldCellContents = OUString : : number ( ( sal_uInt16 ) pEntry - > GetOrderDir ( ) ) ;
2001-02-05 08:26:47 +00:00
sal_uInt16 nIdx = m_pOrderCell - > GetSelectEntryPos ( ) ;
if ( nIdx = = sal_uInt16 ( - 1 ) )
nIdx = 0 ;
pEntry - > SetOrderDir ( EOrderDir ( nIdx ) ) ;
if ( ! m_bOrderByUnRelated )
{
pEntry - > SetVisible ( sal_True ) ;
m_pVisibleCell - > GetBox ( ) . Check ( ) ;
RowModified ( GetBrowseRow ( BROW_VIS_ROW ) , GetCurColumnId ( ) ) ;
}
2013-02-20 00:21:37 +01:00
sNewValue = OUString : : number ( ( sal_uInt16 ) pEntry - > GetOrderDir ( ) ) ;
2001-02-05 08:26:47 +00:00
} break ;
case BROW_COLUMNALIAS_ROW :
strOldCellContents = pEntry - > GetFieldAlias ( ) ;
pEntry - > SetFieldAlias ( m_pTextCell - > GetText ( ) ) ;
2001-04-18 10:44:59 +00:00
sNewValue = pEntry - > GetFieldAlias ( ) ;
2001-02-05 08:26:47 +00:00
break ;
case BROW_FUNCTION_ROW :
{
strOldCellContents = pEntry - > GetFunction ( ) ;
sal_uInt16 nPos = m_pFunctionCell - > GetSelectEntryPos ( ) ;
2013-03-02 15:06:22 +01:00
// these functions are only available in CORE
2002-08-30 10:14:45 +00:00
String sFunctionName = m_pFunctionCell - > GetEntry ( nPos ) ;
2012-01-02 10:55:27 +00:00
String sGroupFunctionName = m_aFunctionStrings . GetToken ( comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) - 1 ) ;
2002-08-30 10:14:45 +00:00
sal_Bool bGroupBy = sal_False ;
2003-06-12 09:19:54 +00:00
if ( sGroupFunctionName . Equals ( sFunctionName ) ) // check if the function name is GROUP
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
bGroupBy = sal_True ;
if ( ! m_bGroupByUnRelated & & ! pEntry - > IsVisible ( ) )
{
// we have to change the visblie flag, so we must append also an undo action
pEntry - > SetVisible ( sal_True ) ;
m_pVisibleCell - > GetBox ( ) . Check ( ) ;
appendUndoAction ( g_strZero , g_strOne , BROW_VIS_ROW , bListAction ) ;
RowModified ( GetBrowseRow ( BROW_VIS_ROW ) , GetCurColumnId ( ) ) ;
}
pEntry - > SetFunction ( String ( ) ) ;
pEntry - > SetFunctionType ( pEntry - > GetFunctionType ( ) & ~ FKT_AGGREGATE ) ;
}
else if ( nPos ) // we found an aggregate function
{
pEntry - > SetFunctionType ( pEntry - > GetFunctionType ( ) | FKT_AGGREGATE ) ;
pEntry - > SetFunction ( sFunctionName ) ;
2001-02-05 08:26:47 +00:00
}
else
{
2002-08-30 10:14:45 +00:00
sFunctionName = String ( ) ;
2001-02-05 08:26:47 +00:00
pEntry - > SetFunction ( String ( ) ) ;
2002-08-30 10:14:45 +00:00
pEntry - > SetFunctionType ( pEntry - > GetFunctionType ( ) & ~ FKT_AGGREGATE ) ;
2001-02-05 08:26:47 +00:00
}
2002-08-30 10:14:45 +00:00
pEntry - > SetGroupBy ( bGroupBy ) ;
sNewValue = sFunctionName ;
2001-02-05 08:26:47 +00:00
}
break ;
default :
{
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2001-03-01 14:45:02 +00:00
if ( ! xConnection . is ( ) )
break ;
2001-02-05 08:26:47 +00:00
2003-12-01 09:38:48 +00:00
sal_uInt16 nIdx = sal_uInt16 ( nRow - BROW_CRIT1_ROW ) ;
2012-06-11 13:15:18 +01:00
String aText = comphelper : : string : : stripStart ( m_pTextCell - > GetText ( ) , ' ' ) ;
2001-02-05 08:26:47 +00:00
: : rtl : : OUString aCrit ;
if ( aText . Len ( ) )
{
2001-09-27 05:19:05 +00:00
: : rtl : : OUString aErrorMsg ;
2001-02-05 08:26:47 +00:00
Reference < XPropertySet > xColumn ;
2001-09-27 05:19:05 +00:00
OSQLParseNode * pParseNode = getDesignView ( ) - > getPredicateTreeFromEntry ( pEntry , aText , aErrorMsg , xColumn ) ;
2001-02-05 08:26:47 +00:00
if ( pParseNode )
{
pParseNode - > parseNodeToPredicateStr ( aCrit ,
2006-12-13 15:53:47 +00:00
xConnection ,
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getNumberFormatter ( ) ,
2001-02-05 08:26:47 +00:00
xColumn ,
getDesignView ( ) - > getLocale ( ) ,
2002-02-06 07:15:30 +00:00
static_cast < sal_Char > ( getDesignView ( ) - > getDecimalSeparator ( ) . toChar ( ) ) ,
2008-06-25 11:54:03 +00:00
& ( static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getParser ( ) . getContext ( ) ) ) ;
2001-02-05 08:26:47 +00:00
delete pParseNode ;
}
else
{
if ( xColumn . is ( ) )
{
sal_Int32 nType = 0 ;
xColumn - > getPropertyValue ( PROPERTY_TYPE ) > > = nType ;
switch ( nType )
{
case DataType : : CHAR :
case DataType : : VARCHAR :
case DataType : : LONGVARCHAR :
2009-11-11 14:07:55 +01:00
case DataType : : CLOB :
2001-09-27 05:19:05 +00:00
if ( aText . GetChar ( 0 ) ! = ' \' ' | | aText . GetChar ( aText . Len ( ) - 1 ) ! = ' \' ' )
2001-02-05 08:26:47 +00:00
{
2012-07-02 16:02:38 +01:00
aText . SearchAndReplaceAll ( rtl : : OUString ( " ' " ) , rtl : : OUString ( " '' " ) ) ;
String aTmp ( rtl : : OUString ( " ' " ) ) ;
( aTmp + = aText ) + = rtl : : OUString ( " ' " ) ;
2001-09-27 05:19:05 +00:00
aText = aTmp ;
2001-02-05 08:26:47 +00:00
}
break ;
default :
;
}
2008-06-25 11:54:03 +00:00
: : connectivity : : OSQLParser & rParser = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getParser ( ) ;
2006-07-10 14:44:07 +00:00
pParseNode = rParser . predicateTree ( aErrorMsg ,
2001-09-27 05:19:05 +00:00
aText ,
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getNumberFormatter ( ) ,
2001-09-27 05:19:05 +00:00
xColumn ) ;
2001-02-05 08:26:47 +00:00
if ( pParseNode )
{
pParseNode - > parseNodeToPredicateStr ( aCrit ,
2006-12-13 15:53:47 +00:00
xConnection ,
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getNumberFormatter ( ) ,
2001-02-05 08:26:47 +00:00
xColumn ,
getDesignView ( ) - > getLocale ( ) ,
2002-02-06 07:15:30 +00:00
static_cast < sal_Char > ( getDesignView ( ) - > getDecimalSeparator ( ) . toChar ( ) ) ,
2008-06-25 11:54:03 +00:00
& ( static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getParser ( ) . getContext ( ) ) ) ;
2001-02-05 08:26:47 +00:00
delete pParseNode ;
}
else
{
2004-03-15 11:43:58 +00:00
if ( ! m_bDisableErrorBox )
{
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
OSQLWarningBox ( this , aErrorMsg ) . Execute ( ) ;
2004-03-15 11:43:58 +00:00
}
2001-02-05 08:26:47 +00:00
bError = sal_True ;
}
}
else
{
2004-03-15 11:43:58 +00:00
if ( ! m_bDisableErrorBox )
{
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
OSQLWarningBox ( this , aErrorMsg ) . Execute ( ) ;
2004-03-15 11:43:58 +00:00
}
2001-02-05 08:26:47 +00:00
bError = sal_True ;
}
}
}
strOldCellContents = pEntry - > GetCriteria ( nIdx ) ;
pEntry - > SetCriteria ( nIdx , aCrit ) ;
2001-04-18 10:44:59 +00:00
sNewValue = pEntry - > GetCriteria ( nIdx ) ;
2011-12-19 18:10:37 -02:00
if ( ! aCrit . isEmpty ( ) & & nRow > = ( GetRowCount ( ) - 1 ) )
2005-12-21 12:37:05 +00:00
bAppendRow = sal_True ;
2001-02-05 08:26:47 +00:00
}
}
if ( ! bError & & Controller ( ) )
Controller ( ) - > ClearModified ( ) ;
RowModified ( GetCurRow ( ) , GetCurColumnId ( ) ) ;
2005-12-21 12:37:05 +00:00
if ( bAppendRow )
{
2011-01-14 15:00:11 +01:00
RowInserted ( GetRowCount ( ) - 1 , 1 , sal_True ) ;
2005-12-21 12:37:05 +00:00
m_bVisibleRow . push_back ( sal_True ) ;
+ + m_nVisibleCount ;
}
2001-03-20 07:12:13 +00:00
if ( ! bError )
{
2013-03-02 15:06:22 +01:00
// and now the undo-action for the total
2001-04-18 10:44:59 +00:00
appendUndoAction ( strOldCellContents , sNewValue , nRow ) ;
2002-08-30 10:14:45 +00:00
2001-03-20 07:12:13 +00:00
}
2001-02-05 08:26:47 +00:00
}
2013-03-02 15:06:22 +01:00
// did I store data in a FieldDescription which was empty before and which is not empty anymore after the changes?
2010-10-15 12:22:54 -05:00
if ( pEntry . is ( ) & & bWasEmpty & & ! pEntry - > IsEmpty ( ) & & ! bError )
2001-02-05 08:26:47 +00:00
{
2013-03-02 15:06:22 +01:00
// Default to visible
2001-02-05 08:26:47 +00:00
pEntry - > SetVisible ( sal_True ) ;
2002-08-30 10:14:45 +00:00
appendUndoAction ( g_strZero , g_strOne , BROW_VIS_ROW , bListAction ) ;
2001-02-05 08:26:47 +00:00
RowModified ( BROW_VIS_ROW , GetCurColumnId ( ) ) ;
2013-03-02 15:06:22 +01:00
// if required add empty columns
2011-01-14 15:00:11 +01:00
sal_uInt16 nDummy ;
2001-02-05 08:26:47 +00:00
CheckFreeColumns ( nDummy ) ;
}
2005-09-23 11:43:59 +00:00
if ( bListAction & & ! m_bInUndoMode )
2010-11-17 09:11:03 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . GetUndoManager ( ) . LeaveListAction ( ) ;
2002-08-30 10:14:45 +00:00
2001-02-05 08:26:47 +00:00
return pEntry ! = NULL & & ! bError ;
}
//------------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox : : SeekRow ( long nRow )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
sal_Bool bRet = sal_False ;
m_nSeekRow = nRow ;
if ( nRow < m_nVisibleCount )
bRet = sal_True ;
return bRet ;
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : PaintCell ( OutputDevice & rDev , const Rectangle & rRect , sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2013-03-13 22:28:52 +01:00
rDev . SetClipRegion ( Region ( rRect ) ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
OTableFieldDescRef pEntry = NULL ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColumnId ) ;
2002-08-19 07:01:32 +00:00
if ( getFields ( ) . size ( ) > sal_uInt16 ( nPos - 1 ) )
pEntry = getFields ( ) [ nPos - 1 ] ;
2001-02-05 08:26:47 +00:00
2010-10-15 12:22:54 -05:00
if ( ! pEntry . is ( ) )
2001-02-05 08:26:47 +00:00
return ;
long nRow = GetRealRow ( m_nSeekRow ) ;
if ( nRow = = BROW_VIS_ROW )
PaintTristate ( rDev , rRect , pEntry - > IsVisible ( ) ? STATE_CHECK : STATE_NOCHECK ) ;
else
2008-12-10 13:41:25 +00:00
rDev . DrawText ( rRect , GetCellText ( nRow , nColumnId ) , TEXT_DRAW_VCENTER ) ;
2001-02-05 08:26:47 +00:00
rDev . SetClipRegion ( ) ;
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : PaintStatusCell ( OutputDevice & rDev , const Rectangle & rRect ) const
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2008-12-10 13:41:25 +00:00
Rectangle aRect ( rRect ) ;
aRect . TopLeft ( ) . Y ( ) - = 2 ;
2001-02-05 08:26:47 +00:00
String aLabel ( ModuleRes ( STR_QUERY_HANDLETEXT ) ) ;
2013-03-02 15:06:22 +01:00
// from BROW_CRIT2_ROW onwards all rows are shown "or"
2001-02-23 14:04:37 +00:00
xub_StrLen nToken = ( xub_StrLen ) ( m_nSeekRow > = GetBrowseRow ( BROW_CRIT2_ROW ) )
2001-02-05 08:26:47 +00:00
?
2001-02-23 14:04:37 +00:00
xub_StrLen ( BROW_CRIT2_ROW ) : xub_StrLen ( GetRealRow ( m_nSeekRow ) ) ;
2008-12-10 13:41:25 +00:00
rDev . DrawText ( aRect , aLabel . GetToken ( nToken ) , TEXT_DRAW_VCENTER ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : RemoveColumn ( sal_uInt16 _nColumnId )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2008-06-25 11:54:03 +00:00
OQueryController & rController = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) ;
2001-04-30 12:02:01 +00:00
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( _nColumnId ) ;
2013-03-02 15:06:22 +01:00
// the control should always have exactly one more column: the HandleColumn
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( ( nPos = = 0 ) | | ( nPos < = getFields ( ) . size ( ) ) , " OSelectionBrowseBox::RemoveColumn : invalid parameter nColId " ) ;
2013-03-02 15:06:22 +01:00
// ColId is synonymous to Position, and the condition should be valid
2001-02-05 08:26:47 +00:00
sal_uInt16 nCurCol = GetCurColumnId ( ) ;
2006-06-20 02:27:27 +00:00
long nCurrentRow = GetCurRow ( ) ;
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
2002-08-19 07:01:32 +00:00
getFields ( ) . erase ( getFields ( ) . begin ( ) + ( nPos - 1 ) ) ;
OTableFieldDescRef pEntry = new OTableFieldDesc ( ) ;
pEntry - > SetColumnId ( _nColumnId ) ;
getFields ( ) . push_back ( pEntry ) ;
EditBrowseBox : : RemoveColumn ( _nColumnId ) ;
InsertDataColumn ( _nColumnId , String ( ) , DEFAULT_SIZE , HIB_STDSTYLE , HEADERBAR_APPEND ) ;
2001-02-05 08:26:47 +00:00
// Neuzeichnen
2002-08-19 07:01:32 +00:00
Rectangle aInvalidRect = GetInvalidRect ( _nColumnId ) ;
2001-02-05 08:26:47 +00:00
Invalidate ( aInvalidRect ) ;
2006-06-20 02:27:27 +00:00
ActivateCell ( nCurrentRow , nCurCol ) ;
2001-02-05 08:26:47 +00:00
2010-02-10 14:05:19 +01:00
rController . setModified ( sal_True ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
invalidateUndoRedo ( ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2006-06-20 02:27:27 +00:00
void OSelectionBrowseBox : : RemoveField ( sal_uInt16 nColumnId )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2008-06-25 11:54:03 +00:00
OQueryController & rController = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) ;
2001-02-05 08:26:47 +00:00
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColumnId ) ;
2002-08-19 07:01:32 +00:00
OSL_ENSURE ( getFields ( ) . size ( ) > sal_uInt16 ( nPos - 1 ) , " ID is to great! " ) ;
2001-04-30 12:02:01 +00:00
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pDesc = getEntry ( ( sal_uInt32 ) ( nPos - 1 ) ) ;
2013-03-02 15:06:22 +01:00
pDesc - > SetColWidth ( ( sal_uInt16 ) GetColumnWidth ( nColumnId ) ) ; // was not stored this before
2001-02-05 08:26:47 +00:00
2013-03-02 15:06:22 +01:00
// trigger UndoAction
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode )
{
OTabFieldDelUndoAct * pUndoAction = new OTabFieldDelUndoAct ( this ) ;
pUndoAction - > SetTabFieldDescr ( pDesc ) ;
pUndoAction - > SetColumnPosition ( nPos ) ;
2008-06-25 11:54:03 +00:00
rController . addUndoActionAndInvalidate ( pUndoAction ) ;
2005-09-23 11:43:59 +00:00
}
2001-02-05 08:26:47 +00:00
2002-08-19 07:01:32 +00:00
RemoveColumn ( nColumnId ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
invalidateUndoRedo ( ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2002-05-24 11:58:56 +00:00
void OSelectionBrowseBox : : adjustSelectionMode ( sal_Bool _bClickedOntoHeader , sal_Bool _bClickedOntoHandleCol )
2001-02-05 08:26:47 +00:00
{
2013-03-02 15:06:22 +01:00
// if a Header has been selected it should be shown otherwise not
2002-05-24 11:58:56 +00:00
if ( _bClickedOntoHeader )
2001-02-05 08:26:47 +00:00
{
2002-05-24 11:58:56 +00:00
if ( 0 = = GetSelectColumnCount ( ) )
2013-03-02 15:06:22 +01:00
// I am in the correct mode if a selected column exists
2002-05-24 11:58:56 +00:00
if ( BROWSER_HIDESELECT = = ( m_nMode & BROWSER_HIDESELECT ) )
2001-02-05 08:26:47 +00:00
{
2002-05-24 11:58:56 +00:00
m_nMode & = ~ BROWSER_HIDESELECT ;
m_nMode | = BROWSER_MULTISELECTION ;
SetMode ( m_nMode ) ;
2001-02-05 08:26:47 +00:00
}
2002-05-24 11:58:56 +00:00
}
else if ( BROWSER_HIDESELECT ! = ( m_nMode & BROWSER_HIDESELECT ) )
{
if ( GetSelectColumnCount ( ) ! = 0 )
SetNoSelection ( ) ;
if ( _bClickedOntoHandleCol )
{
m_nMode | = BROWSER_HIDESELECT ;
m_nMode & = ~ BROWSER_MULTISELECTION ;
SetMode ( m_nMode ) ;
2001-02-05 08:26:47 +00:00
}
}
2002-05-24 11:58:56 +00:00
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : MouseButtonDown ( const BrowserMouseEvent & rEvt )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
if ( rEvt . IsLeft ( ) )
{
sal_Bool bOnHandle = HANDLE_ID = = rEvt . GetColumnId ( ) ;
sal_Bool bOnHeader = ( rEvt . GetRow ( ) < 0 ) & & ! bOnHandle ;
adjustSelectionMode ( bOnHeader , bOnHandle ) ;
}
2001-06-29 07:45:10 +00:00
EditBrowseBox : : MouseButtonDown ( rEvt ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : MouseButtonUp ( const BrowserMouseEvent & rEvt )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-06-29 07:45:10 +00:00
EditBrowseBox : : MouseButtonUp ( rEvt ) ;
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( ID_BROWSER_QUERY_EXECUTE ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : KeyInput ( const KeyEvent & rEvt )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
if ( IsColumnSelected ( GetCurColumnId ( ) ) )
{
if ( rEvt . GetKeyCode ( ) . GetCode ( ) = = KEY_DELETE & & // Delete rows
! rEvt . GetKeyCode ( ) . IsShift ( ) & &
! rEvt . GetKeyCode ( ) . IsMod1 ( ) )
{
RemoveField ( GetCurColumnId ( ) ) ;
return ;
}
}
2001-06-29 07:45:10 +00:00
EditBrowseBox : : KeyInput ( rEvt ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2001-03-30 12:06:46 +00:00
sal_Int8 OSelectionBrowseBox : : AcceptDrop ( const BrowserAcceptDropEvent & rEvt )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2002-06-21 06:09:34 +00:00
sal_Int8 nDropAction = DND_ACTION_NONE ;
2006-06-20 02:27:27 +00:00
if ( rEvt . GetRow ( ) > = - 1 )
2002-06-21 06:09:34 +00:00
{
if ( IsEditing ( ) )
{
2011-02-07 20:20:28 +01:00
// allow the asterix again
2004-03-15 11:43:58 +00:00
m_bDisableErrorBox = sal_True ;
2002-06-21 06:09:34 +00:00
SaveModified ( ) ;
2004-03-15 11:43:58 +00:00
m_bDisableErrorBox = sal_False ;
2002-06-21 06:09:34 +00:00
DeactivateCell ( ) ;
}
// check if the format is already supported, if not deactivate the current cell and try again
if ( OJoinExchObj : : isFormatAvailable ( GetDataFlavors ( ) ) )
nDropAction = DND_ACTION_LINK ;
}
2001-03-30 12:06:46 +00:00
2002-06-21 06:09:34 +00:00
return nDropAction ;
2001-03-30 12:06:46 +00:00
}
//------------------------------------------------------------------------------
sal_Int8 OSelectionBrowseBox : : ExecuteDrop ( const BrowserExecuteDropEvent & _rEvt )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
TransferableDataHelper aDropped ( _rEvt . maDropEvent . Transferable ) ;
if ( ! OJoinExchObj : : isFormatAvailable ( aDropped . GetDataFlavorExVector ( ) ) )
2001-02-05 08:26:47 +00:00
{
2011-02-25 17:47:41 +01:00
OSL_FAIL ( " OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop! " ) ;
2001-03-30 12:06:46 +00:00
return DND_ACTION_NONE ;
2001-02-05 08:26:47 +00:00
}
2001-03-30 12:06:46 +00:00
OTableFieldDesc aInfo ;
2013-03-02 15:06:22 +01:00
// insert the field at the selected position
2001-03-30 12:06:46 +00:00
OJoinExchangeData jxdSource = OJoinExchObj : : GetSourceDescription ( _rEvt . maDropEvent . Transferable ) ;
InsertField ( jxdSource ) ;
return DND_ACTION_LINK ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2002-08-19 07:01:32 +00:00
OTableFieldDescRef OSelectionBrowseBox : : AppendNewCol ( sal_uInt16 nCnt )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2013-03-02 15:06:22 +01:00
// one or more can be created, but the first one will is not returned
2001-10-05 05:49:21 +00:00
sal_uInt32 nCount = getFields ( ) . size ( ) ;
2001-02-05 08:26:47 +00:00
for ( sal_uInt16 i = 0 ; i < nCnt ; i + + )
{
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEmptyEntry = new OTableFieldDesc ( ) ;
getFields ( ) . push_back ( pEmptyEntry ) ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nColumnId = sal : : static_int_cast < sal_uInt16 > ( getFields ( ) . size ( ) ) ;
2002-08-19 07:01:32 +00:00
pEmptyEntry - > SetColumnId ( nColumnId ) ;
InsertDataColumn ( nColumnId , String ( ) , DEFAULT_SIZE , HIB_STDSTYLE , HEADERBAR_APPEND ) ;
2001-02-05 08:26:47 +00:00
}
2001-10-05 05:49:21 +00:00
return getFields ( ) [ nCount ] ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : DeleteFields ( const String & rAliasName )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-10-05 05:49:21 +00:00
if ( ! getFields ( ) . empty ( ) )
2001-02-05 08:26:47 +00:00
{
sal_uInt16 nColId = GetCurColumnId ( ) ;
sal_uInt32 nRow = GetCurRow ( ) ;
2001-10-26 06:49:36 +00:00
sal_Bool bWasEditing = IsEditing ( ) ;
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
2001-10-05 05:49:21 +00:00
OTableFields : : reverse_iterator aIter = getFields ( ) . rbegin ( ) ;
OTableFieldDescRef pEntry = NULL ;
2011-01-14 15:00:11 +01:00
for ( sal_uInt16 nPos = sal : : static_int_cast < sal_uInt16 > ( getFields ( ) . size ( ) ) ; aIter ! = getFields ( ) . rend ( ) ; + + aIter , - - nPos )
2001-02-05 08:26:47 +00:00
{
pEntry = * aIter ;
2006-07-26 06:48:50 +00:00
if ( pEntry - > GetAlias ( ) . equals ( rAliasName ) )
{
2006-06-20 02:27:27 +00:00
RemoveField ( GetColumnId ( nPos ) ) ;
2006-07-26 06:48:50 +00:00
break ;
}
2001-02-05 08:26:47 +00:00
}
2001-10-26 06:49:36 +00:00
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
ActivateCell ( nRow , nColId ) ;
}
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : SetColWidth ( sal_uInt16 nColId , long nNewWidth )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-10-26 06:49:36 +00:00
sal_Bool bWasEditing = IsEditing ( ) ;
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
2013-03-02 15:06:22 +01:00
// create the BaseClass
2001-02-05 08:26:47 +00:00
SetColumnWidth ( nColId , nNewWidth ) ;
2013-03-02 15:06:22 +01:00
// tell it the FieldDescription
2002-08-30 10:14:45 +00:00
OTableFieldDescRef pEntry = getEntry ( GetColumnPos ( nColId ) - 1 ) ;
2010-10-15 12:22:54 -05:00
if ( pEntry . is ( ) )
2001-02-23 14:04:37 +00:00
pEntry - > SetColWidth ( sal_uInt16 ( GetColumnWidth ( nColId ) ) ) ;
2001-02-05 08:26:47 +00:00
2001-10-26 06:49:36 +00:00
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
ActivateCell ( GetCurRow ( ) , GetCurColumnId ( ) ) ;
}
//------------------------------------------------------------------------------
Rectangle OSelectionBrowseBox : : GetInvalidRect ( sal_uInt16 nColId )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
//////////////////////////////////////////////////////////////////////
2013-03-02 15:06:22 +01:00
// The rectangle is the full output area of the window
2001-02-05 08:26:47 +00:00
Rectangle aInvalidRect ( Point ( 0 , 0 ) , GetOutputSizePixel ( ) ) ;
//////////////////////////////////////////////////////////////////////
2013-03-02 15:06:22 +01:00
// now update the left side
2001-02-14 13:54:12 +00:00
Rectangle aFieldRect ( GetCellRect ( 0 , nColId ) ) ; // used instead of GetFieldRectPixel
2001-02-05 08:26:47 +00:00
aInvalidRect . Left ( ) = aFieldRect . Left ( ) ;
return aInvalidRect ;
}
//------------------------------------------------------------------------------
2011-09-12 14:58:12 +02:00
void OSelectionBrowseBox : : InsertColumn ( OTableFieldDescRef pEntry , sal_uInt16 & _nColumnPosition )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2013-03-02 15:06:22 +01:00
// the control should have exactly one more column: the HandleColumn
2011-09-12 14:58:12 +02:00
OSL_ENSURE ( _nColumnPosition = = BROWSER_INVALIDID | | ( _nColumnPosition < = ( long ) getFields ( ) . size ( ) ) , " OSelectionBrowseBox::InsertColumn : invalid parameter nColId. " ) ;
2013-03-02 15:06:22 +01:00
// -1 means at the end. Count means at the end, others denotes a correct position
2001-02-05 08:26:47 +00:00
sal_uInt16 nCurCol = GetCurColumnId ( ) ;
2006-06-20 02:27:27 +00:00
long nCurrentRow = GetCurRow ( ) ;
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
2002-08-19 07:01:32 +00:00
// remember the column id of the current positon
2011-09-12 14:58:12 +02:00
sal_uInt16 nColumnId = GetColumnId ( _nColumnPosition ) ;
2013-03-02 15:06:22 +01:00
// put at the end of the list if to small or to big,
if ( ( _nColumnPosition = = BROWSER_INVALIDID ) | | ( _nColumnPosition > = getFields ( ) . size ( ) ) ) // append the field
2001-02-05 08:26:47 +00:00
{
2013-03-02 15:06:22 +01:00
if ( FindFirstFreeCol ( _nColumnPosition ) = = NULL ) // no more free columns
2001-02-05 08:26:47 +00:00
{
AppendNewCol ( 1 ) ;
2011-09-12 14:58:12 +02:00
_nColumnPosition = sal : : static_int_cast < sal_uInt16 > (
2006-10-12 12:43:07 +00:00
getFields ( ) . size ( ) ) ;
2001-02-05 08:26:47 +00:00
}
else
2013-03-02 15:06:22 +01:00
+ + _nColumnPosition ; // within the list
2011-09-12 14:58:12 +02:00
nColumnId = GetColumnId ( _nColumnPosition ) ;
2002-08-19 07:01:32 +00:00
pEntry - > SetColumnId ( nColumnId ) ;
2011-09-12 14:58:12 +02:00
getFields ( ) [ _nColumnPosition - 1 ] = pEntry ;
2001-02-05 08:26:47 +00:00
}
2002-08-19 07:01:32 +00:00
// check if the column ids are identical, if not we have to move
if ( pEntry - > GetColumnId ( ) ! = nColumnId )
{
2011-01-14 15:00:11 +01:00
sal_uInt16 nOldPosition = GetColumnPos ( pEntry - > GetColumnId ( ) ) ;
2002-08-19 07:01:32 +00:00
OSL_ENSURE ( nOldPosition ! = 0 , " Old position was 0. Not possible! " ) ;
2011-09-12 14:58:12 +02:00
SetColumnPos ( pEntry - > GetColumnId ( ) , _nColumnPosition ) ;
2002-08-19 07:01:32 +00:00
// we have to delete an empty field for the fields list, because the columns must have equal length
if ( nOldPosition > 0 & & nOldPosition < = getFields ( ) . size ( ) )
getFields ( ) [ nOldPosition - 1 ] = pEntry ;
2011-01-14 15:00:11 +01:00
ColumnMoved ( pEntry - > GetColumnId ( ) , sal_False ) ;
2010-11-29 23:29:33 +09:00
}
2008-12-01 12:31:27 +00:00
if ( pEntry - > GetFunctionType ( ) & ( FKT_AGGREGATE ) )
{
String sFunctionName = pEntry - > GetFunction ( ) ;
if ( GetFunctionName ( sal_uInt32 ( - 1 ) , sFunctionName ) )
pEntry - > SetFunction ( sFunctionName ) ;
2002-08-19 07:01:32 +00:00
}
2001-02-05 08:26:47 +00:00
2008-12-09 07:25:38 +00:00
nColumnId = pEntry - > GetColumnId ( ) ;
SetColWidth ( nColumnId , getDesignView ( ) - > getColWidth ( GetColumnPos ( nColumnId ) - 1 ) ) ;
2013-03-02 15:06:22 +01:00
// redraw
2008-12-09 07:25:38 +00:00
Rectangle aInvalidRect = GetInvalidRect ( nColumnId ) ;
2001-02-05 08:26:47 +00:00
Invalidate ( aInvalidRect ) ;
2006-06-20 02:27:27 +00:00
ActivateCell ( nCurrentRow , nCurCol ) ;
2010-02-10 14:05:19 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setModified ( sal_True ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
invalidateUndoRedo ( ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2011-09-12 14:58:12 +02:00
OTableFieldDescRef OSelectionBrowseBox : : InsertField ( const OJoinExchangeData & jxdSource , sal_uInt16 _nColumnPosition , sal_Bool bVis , sal_Bool bActivate )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
OQueryTableWindow * pSourceWin = static_cast < OQueryTableWindow * > ( jxdSource . pListBox - > GetTabWin ( ) ) ;
if ( ! pSourceWin )
return NULL ;
2013-03-02 15:06:22 +01:00
// name and position of the selected field
2001-02-05 08:26:47 +00:00
String aFieldName = jxdSource . pListBox - > GetEntryText ( jxdSource . pEntry ) ;
sal_uInt32 nFieldIndex = jxdSource . pListBox - > GetModel ( ) - > GetAbsPos ( jxdSource . pEntry ) ;
OTableFieldInfo * pInf = static_cast < OTableFieldInfo * > ( jxdSource . pEntry - > GetUserData ( ) ) ;
2013-03-02 15:06:22 +01:00
// construct DragInfo, such that I use the other InsertField
2001-10-05 05:49:21 +00:00
OTableFieldDescRef aInfo = new OTableFieldDesc ( pSourceWin - > GetTableName ( ) , aFieldName ) ;
aInfo - > SetTabWindow ( pSourceWin ) ;
aInfo - > SetFieldIndex ( nFieldIndex ) ;
aInfo - > SetFieldType ( pInf - > GetKeyType ( ) ) ;
aInfo - > SetAlias ( pSourceWin - > GetAliasName ( ) ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
aInfo - > SetDataType ( pInf - > GetDataType ( ) ) ;
aInfo - > SetVisible ( bVis ) ;
2001-02-05 08:26:47 +00:00
2011-09-12 14:58:12 +02:00
return InsertField ( aInfo , _nColumnPosition , bVis , bActivate ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2011-09-12 14:58:12 +02:00
OTableFieldDescRef OSelectionBrowseBox : : InsertField ( const OTableFieldDescRef & _rInfo , sal_uInt16 _nColumnPosition , sal_Bool bVis , sal_Bool bActivate )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
if ( m_nMaxColumns & & m_nMaxColumns < = FieldsCount ( ) )
return NULL ;
if ( bActivate )
SaveModified ( ) ;
2013-03-02 15:06:22 +01:00
// new column description
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEntry = _rInfo ;
2001-02-05 08:26:47 +00:00
pEntry - > SetVisible ( bVis ) ;
2013-03-02 15:06:22 +01:00
// insert column
2011-09-12 14:58:12 +02:00
InsertColumn ( pEntry , _nColumnPosition ) ;
2001-02-05 08:26:47 +00:00
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode )
{
2013-03-02 15:06:22 +01:00
// trigger UndoAction
2005-09-23 11:43:59 +00:00
OTabFieldCreateUndoAct * pUndoAction = new OTabFieldCreateUndoAct ( this ) ;
pUndoAction - > SetTabFieldDescr ( pEntry ) ;
2011-09-12 14:58:12 +02:00
pUndoAction - > SetColumnPosition ( _nColumnPosition ) ;
2008-06-25 11:54:03 +00:00
getDesignView ( ) - > getController ( ) . addUndoActionAndInvalidate ( pUndoAction ) ;
2005-09-23 11:43:59 +00:00
}
2001-02-05 08:26:47 +00:00
return pEntry ;
}
//------------------------------------------------------------------------------
sal_uInt16 OSelectionBrowseBox : : FieldsCount ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-10-05 05:49:21 +00:00
OTableFields : : iterator aIter = getFields ( ) . begin ( ) ;
2001-02-05 08:26:47 +00:00
sal_uInt16 nCount = 0 ;
2001-10-05 05:49:21 +00:00
while ( aIter ! = getFields ( ) . end ( ) )
2001-02-05 08:26:47 +00:00
{
2010-10-15 12:22:54 -05:00
if ( ( * aIter ) . is ( ) & & ! ( * aIter ) - > IsEmpty ( ) )
2001-10-22 08:57:52 +00:00
+ + nCount ;
2001-02-05 08:26:47 +00:00
+ + aIter ;
}
return nCount ;
}
//------------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
OTableFieldDescRef OSelectionBrowseBox : : FindFirstFreeCol ( sal_uInt16 & _rColumnPosition )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-10-05 05:49:21 +00:00
OTableFields : : iterator aIter = getFields ( ) . begin ( ) ;
2002-08-19 07:01:32 +00:00
OTableFields : : iterator aEnd = getFields ( ) . end ( ) ;
_rColumnPosition = BROWSER_INVALIDID ;
while ( aIter ! = aEnd )
2001-02-05 08:26:47 +00:00
{
2002-08-19 07:01:32 +00:00
+ + _rColumnPosition ;
OTableFieldDescRef pEntry = ( * aIter ) ;
2010-10-15 12:22:54 -05:00
if ( pEntry . is ( ) & & pEntry - > IsEmpty ( ) )
2002-08-19 07:01:32 +00:00
return pEntry ;
2001-02-05 08:26:47 +00:00
+ + aIter ;
}
return NULL ;
}
//------------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : CheckFreeColumns ( sal_uInt16 & _rColumnPosition )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2002-08-19 07:01:32 +00:00
if ( FindFirstFreeCol ( _rColumnPosition ) = = NULL )
2001-02-05 08:26:47 +00:00
{
2013-03-02 15:06:22 +01:00
// it is full, append a Packen column
2001-02-05 08:26:47 +00:00
AppendNewCol ( DEFAULT_QUERY_COLS ) ;
2010-10-15 12:22:54 -05:00
OSL_VERIFY ( FindFirstFreeCol ( _rColumnPosition ) . is ( ) ) ;
2001-02-05 08:26:47 +00:00
}
}
//------------------------------------------------------------------------------
2008-06-25 11:54:03 +00:00
void OSelectionBrowseBox : : AddGroupBy ( const OTableFieldDescRef & rInfo , sal_uInt32 /*_nCurrentPos*/ )
2001-02-05 08:26:47 +00:00
{
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2001-03-01 14:45:02 +00:00
if ( ! xConnection . is ( ) )
return ;
2001-02-05 08:26:47 +00:00
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( ! rInfo - > IsEmpty ( ) , " AddGroupBy:: OTableFieldDescRef sollte nicht Empty sein! " ) ;
2001-10-05 05:49:21 +00:00
OTableFieldDescRef pEntry ;
2008-06-25 11:54:03 +00:00
const Reference < XDatabaseMetaData > xMeta = xConnection - > getMetaData ( ) ;
const : : comphelper : : UStringMixEqual bCase ( xMeta . is ( ) & & xMeta - > supportsMixedCaseQuotedIdentifiers ( ) ) ;
//sal_Bool bAppend = sal_False;
2005-03-10 15:53:16 +00:00
OTableFields & rFields = getFields ( ) ;
OTableFields : : iterator aIter = rFields . begin ( ) ;
2009-07-03 12:24:35 +00:00
OTableFields : : iterator aEnd = rFields . end ( ) ;
for ( ; aIter ! = aEnd ; + + aIter )
2001-02-05 08:26:47 +00:00
{
pEntry = * aIter ;
2010-10-15 12:22:54 -05:00
OSL_ENSURE ( pEntry . is ( ) , " OTableFieldDescRef was null! " ) ;
2001-02-05 08:26:47 +00:00
2008-06-25 11:54:03 +00:00
const : : rtl : : OUString aField = pEntry - > GetField ( ) ;
const : : rtl : : OUString aAlias = pEntry - > GetAlias ( ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
if ( bCase ( aField , rInfo - > GetField ( ) ) & &
bCase ( aAlias , rInfo - > GetAlias ( ) ) & &
2009-02-17 15:39:54 +00:00
pEntry - > GetFunctionType ( ) = = rInfo - > GetFunctionType ( ) & &
pEntry - > GetFunction ( ) = = rInfo - > GetFunction ( ) )
2001-02-05 08:26:47 +00:00
{
2009-11-23 10:33:17 +01:00
if ( pEntry - > isNumericOrAggreateFunction ( ) & & rInfo - > IsGroupBy ( ) )
{
pEntry - > SetGroupBy ( sal_False ) ;
2005-03-10 15:53:16 +00:00
aIter = rFields . end ( ) ;
2009-11-23 10:33:17 +01:00
break ;
}
else
2001-02-05 08:26:47 +00:00
{
2009-11-23 10:33:17 +01:00
if ( ! pEntry - > IsGroupBy ( ) & & ! pEntry - > HasCriteria ( ) ) // here we have a where condition which is no having clause
2005-03-10 15:53:16 +00:00
{
pEntry - > SetGroupBy ( rInfo - > IsGroupBy ( ) ) ;
if ( ! m_bGroupByUnRelated & & pEntry - > IsGroupBy ( ) )
pEntry - > SetVisible ( sal_True ) ;
2009-11-23 10:33:17 +01:00
break ;
2005-03-10 15:53:16 +00:00
}
2001-02-05 08:26:47 +00:00
}
2009-11-23 10:33:17 +01:00
2001-02-05 08:26:47 +00:00
}
}
2005-03-10 15:53:16 +00:00
if ( aIter = = rFields . end ( ) )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
OTableFieldDescRef pTmp = InsertField ( rInfo , BROWSER_INVALIDID , sal_False , sal_False ) ;
2013-03-02 15:06:22 +01:00
if ( ( pTmp - > isNumericOrAggreateFunction ( ) & & rInfo - > IsGroupBy ( ) ) ) // the GroupBy is inherited from rInfo
2001-02-05 08:26:47 +00:00
pTmp - > SetGroupBy ( sal_False ) ;
}
}
//------------------------------------------------------------------------------
2009-11-11 14:07:55 +01:00
void OSelectionBrowseBox : : DuplicateConditionLevel ( const sal_uInt16 nLevel )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
const sal_uInt16 nNewLevel = nLevel + 1 ;
OTableFields & rFields = getFields ( ) ;
OTableFields : : iterator aIter = rFields . begin ( ) ;
OTableFields : : iterator aEnd = rFields . end ( ) ;
for ( ; aIter ! = aEnd ; + + aIter )
{
OTableFieldDescRef pEntry = * aIter ;
: : rtl : : OUString sValue = pEntry - > GetCriteria ( nLevel ) ;
2011-12-19 18:10:37 -02:00
if ( ! sValue . isEmpty ( ) )
2009-11-11 14:07:55 +01:00
{
pEntry - > SetCriteria ( nNewLevel , sValue ) ;
if ( nNewLevel = = ( m_nVisibleCount - BROW_CRIT1_ROW - 1 ) )
{
2011-01-14 15:00:11 +01:00
RowInserted ( GetRowCount ( ) - 1 , 1 , sal_True ) ;
2009-11-11 14:07:55 +01:00
m_bVisibleRow . push_back ( sal_True ) ;
+ + m_nVisibleCount ;
}
m_bVisibleRow [ BROW_CRIT1_ROW + nNewLevel ] = sal_True ;
2010-11-25 01:16:20 +00:00
}
}
2009-11-11 14:07:55 +01:00
}
//------------------------------------------------------------------------------
2007-11-01 14:32:32 +00:00
void OSelectionBrowseBox : : AddCondition ( const OTableFieldDescRef & rInfo , const String & rValue , const sal_uInt16 nLevel , bool _bAddOrOnOneLine )
2001-02-05 08:26:47 +00:00
{
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2001-03-01 14:45:02 +00:00
if ( ! xConnection . is ( ) )
return ;
2001-02-05 08:26:47 +00:00
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( rInfo . is ( ) & & ! rInfo - > IsEmpty ( ) , " AddCondition:: OTableFieldDescRef sollte nicht Empty sein! " ) ;
2001-10-05 05:49:21 +00:00
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
OTableFieldDescRef pLastEntry ;
2003-12-01 09:38:48 +00:00
Reference < XDatabaseMetaData > xMeta = xConnection - > getMetaData ( ) ;
2006-08-15 09:56:20 +00:00
: : comphelper : : UStringMixEqual bCase ( xMeta . is ( ) & & xMeta - > supportsMixedCaseQuotedIdentifiers ( ) ) ;
2001-02-05 08:26:47 +00:00
2009-07-03 12:24:35 +00:00
OTableFields & rFields = getFields ( ) ;
OTableFields : : iterator aIter = rFields . begin ( ) ;
OTableFields : : iterator aEnd = rFields . end ( ) ;
for ( ; aIter ! = aEnd ; + + aIter )
2001-02-05 08:26:47 +00:00
{
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
OTableFieldDescRef pEntry = * aIter ;
2008-06-25 11:54:03 +00:00
const : : rtl : : OUString aField = pEntry - > GetField ( ) ;
const : : rtl : : OUString aAlias = pEntry - > GetAlias ( ) ;
2001-02-05 08:26:47 +00:00
2001-10-05 05:49:21 +00:00
if ( bCase ( aField , rInfo - > GetField ( ) ) & &
bCase ( aAlias , rInfo - > GetAlias ( ) ) & &
2009-02-17 15:39:54 +00:00
pEntry - > GetFunctionType ( ) = = rInfo - > GetFunctionType ( ) & &
2009-11-23 10:33:17 +01:00
pEntry - > GetFunction ( ) = = rInfo - > GetFunction ( ) & &
pEntry - > IsGroupBy ( ) = = rInfo - > IsGroupBy ( ) )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
if ( pEntry - > isNumericOrAggreateFunction ( ) & & rInfo - > IsGroupBy ( ) )
2001-02-05 08:26:47 +00:00
pEntry - > SetGroupBy ( sal_False ) ;
else
{
2001-03-20 09:56:40 +00:00
if ( ! m_bGroupByUnRelated & & pEntry - > IsGroupBy ( ) )
2001-02-05 08:26:47 +00:00
pEntry - > SetVisible ( sal_True ) ;
}
2011-12-19 18:10:37 -02:00
if ( pEntry - > GetCriteria ( nLevel ) . isEmpty ( ) )
2001-02-05 08:26:47 +00:00
{
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
pEntry - > SetCriteria ( nLevel , rValue ) ;
2001-02-05 08:26:47 +00:00
if ( nLevel = = ( m_nVisibleCount - BROW_CRIT1_ROW - 1 ) )
{
2011-01-14 15:00:11 +01:00
RowInserted ( GetRowCount ( ) - 1 , 1 , sal_True ) ;
2001-02-05 08:26:47 +00:00
m_bVisibleRow . push_back ( sal_True ) ;
+ + m_nVisibleCount ;
}
2007-11-01 14:32:32 +00:00
m_bVisibleRow [ BROW_CRIT1_ROW + nLevel ] = sal_True ;
2001-02-05 08:26:47 +00:00
break ;
2010-11-25 01:16:20 +00:00
}
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
if ( _bAddOrOnOneLine )
{
pLastEntry = pEntry ;
2001-02-05 08:26:47 +00:00
}
}
2010-11-25 01:16:20 +00:00
}
2010-10-15 12:22:54 -05:00
if ( pLastEntry . is ( ) )
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
{
String sCriteria = rValue ;
String sOldCriteria = pLastEntry - > GetCriteria ( nLevel ) ;
if ( sOldCriteria . Len ( ) )
{
sCriteria = String ( RTL_CONSTASCII_USTRINGPARAM ( " ( " ) ) ;
sCriteria + = sOldCriteria ;
sCriteria + = String ( RTL_CONSTASCII_USTRINGPARAM ( " OR " ) ) ;
sCriteria + = rValue ;
sCriteria + = String ( RTL_CONSTASCII_USTRINGPARAM ( " ) " ) ) ;
}
pLastEntry - > SetCriteria ( nLevel , sCriteria ) ;
if ( nLevel = = ( m_nVisibleCount - BROW_CRIT1_ROW - 1 ) )
{
2011-01-14 15:00:11 +01:00
RowInserted ( GetRowCount ( ) - 1 , 1 , sal_True ) ;
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
m_bVisibleRow . push_back ( sal_True ) ;
+ + m_nVisibleCount ;
}
m_bVisibleRow [ BROW_CRIT1_ROW + nLevel ] = sal_True ;
2001-02-05 08:26:47 +00:00
}
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
else if ( aIter = = getFields ( ) . end ( ) )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
OTableFieldDescRef pTmp = InsertField ( rInfo , BROWSER_INVALIDID , sal_False , sal_False ) ;
2013-03-02 15:06:22 +01:00
if ( pTmp - > isNumericOrAggreateFunction ( ) & & rInfo - > IsGroupBy ( ) ) // the GroupBy was inherited from rInfo
2001-02-05 08:26:47 +00:00
pTmp - > SetGroupBy ( sal_False ) ;
2010-10-15 12:22:54 -05:00
if ( pTmp . is ( ) )
2001-02-05 08:26:47 +00:00
{
pTmp - > SetCriteria ( nLevel , rValue ) ;
if ( nLevel = = ( m_nVisibleCount - BROW_CRIT1_ROW - 1 ) )
{
2011-01-14 15:00:11 +01:00
RowInserted ( GetRowCount ( ) - 1 , 1 , sal_True ) ;
2001-02-05 08:26:47 +00:00
m_bVisibleRow . push_back ( sal_True ) ;
+ + m_nVisibleCount ;
}
}
}
}
//------------------------------------------------------------------------------
2005-03-10 15:53:16 +00:00
void OSelectionBrowseBox : : AddOrder ( const OTableFieldDescRef & rInfo , const EOrderDir eDir , sal_uInt32 _nCurrentPos )
2001-02-05 08:26:47 +00:00
{
2012-03-20 11:01:12 +01:00
if ( _nCurrentPos = = 0 )
m_nLastSortColumn = SORT_COLUMN_NONE ;
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2001-03-01 14:45:02 +00:00
if ( ! xConnection . is ( ) )
return ;
2001-02-05 08:26:47 +00:00
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2012-03-20 11:01:12 +01:00
OSL_ENSURE ( ! rInfo - > IsEmpty ( ) , " AddOrder:: OTableFieldDescRef should not be Empty! " ) ;
2001-10-05 05:49:21 +00:00
OTableFieldDescRef pEntry ;
2003-12-01 09:38:48 +00:00
Reference < XDatabaseMetaData > xMeta = xConnection - > getMetaData ( ) ;
2006-08-15 09:56:20 +00:00
: : comphelper : : UStringMixEqual bCase ( xMeta . is ( ) & & xMeta - > supportsMixedCaseQuotedIdentifiers ( ) ) ;
2001-02-05 08:26:47 +00:00
2005-03-10 15:53:16 +00:00
sal_Bool bAppend = sal_False ;
OTableFields & rFields = getFields ( ) ;
OTableFields : : iterator aIter = rFields . begin ( ) ;
2009-07-03 12:24:35 +00:00
OTableFields : : iterator aEnd = rFields . end ( ) ;
for ( ; aIter ! = aEnd ; + + aIter )
2001-02-05 08:26:47 +00:00
{
pEntry = * aIter ;
: : rtl : : OUString aField = pEntry - > GetField ( ) ;
: : rtl : : OUString aAlias = pEntry - > GetAlias ( ) ;
2001-10-05 05:49:21 +00:00
if ( bCase ( aField , rInfo - > GetField ( ) ) & &
bCase ( aAlias , rInfo - > GetAlias ( ) ) )
2001-02-05 08:26:47 +00:00
{
2005-03-10 15:53:16 +00:00
sal_uInt32 nPos = aIter - rFields . begin ( ) ;
2012-03-20 11:01:12 +01:00
bAppend = ( m_nLastSortColumn ! = SORT_COLUMN_NONE ) & & ( nPos < = m_nLastSortColumn ) ;
2005-03-10 15:53:16 +00:00
if ( bAppend )
aIter = rFields . end ( ) ;
else
{
if ( ! m_bOrderByUnRelated )
pEntry - > SetVisible ( sal_True ) ;
pEntry - > SetOrderDir ( eDir ) ;
2012-03-20 11:01:12 +01:00
m_nLastSortColumn = nPos ;
2005-03-10 15:53:16 +00:00
}
2001-02-05 08:26:47 +00:00
break ;
}
}
2005-03-10 15:53:16 +00:00
if ( aIter = = rFields . end ( ) )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
OTableFieldDescRef pTmp = InsertField ( rInfo , BROWSER_INVALIDID , sal_False , sal_False ) ;
2010-10-15 12:22:54 -05:00
if ( pTmp . is ( ) )
2001-02-05 08:26:47 +00:00
{
2012-03-20 11:01:12 +01:00
m_nLastSortColumn = pTmp - > GetColumnId ( ) - 1 ;
2005-03-10 15:53:16 +00:00
if ( ! m_bOrderByUnRelated & & ! bAppend )
2001-03-20 09:56:40 +00:00
pTmp - > SetVisible ( sal_True ) ;
2001-02-05 08:26:47 +00:00
pTmp - > SetOrderDir ( eDir ) ;
}
}
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : ArrangeControls ( sal_uInt16 & nX , sal_uInt16 nY )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-06-29 07:45:10 +00:00
EditBrowseBox : : ArrangeControls ( nX , nY ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2001-09-27 05:19:05 +00:00
sal_Bool OSelectionBrowseBox : : Save ( )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2001-09-27 05:19:05 +00:00
sal_Bool bRet = sal_True ;
2001-02-05 08:26:47 +00:00
if ( IsModified ( ) )
2001-09-27 05:19:05 +00:00
bRet = SaveModified ( ) ;
return bRet ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : CellModified ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
long nRow = GetRealRow ( GetCurRow ( ) ) ;
switch ( nRow )
{
case BROW_VIS_ROW :
{
2002-08-30 10:14:45 +00:00
OTableFieldDescRef pEntry = getEntry ( GetColumnPos ( GetCurColumnId ( ) ) - 1 ) ;
2001-10-05 05:49:21 +00:00
2001-02-05 08:26:47 +00:00
sal_uInt16 nIdx = m_pOrderCell - > GetSelectEntryPos ( ) ;
2001-03-20 09:56:40 +00:00
if ( ! m_bOrderByUnRelated & & nIdx > 0 & &
nIdx ! = sal_uInt16 ( - 1 ) & &
! pEntry - > IsEmpty ( ) & &
pEntry - > GetOrderDir ( ) ! = ORDER_NONE )
2001-02-05 08:26:47 +00:00
{
m_pVisibleCell - > GetBox ( ) . Check ( ) ;
pEntry - > SetVisible ( sal_True ) ;
}
else
pEntry - > SetVisible ( m_pVisibleCell - > GetBox ( ) . IsChecked ( ) ) ;
}
break ;
}
2010-02-10 14:05:19 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setModified ( sal_True ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : Fill ( )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( ColCount ( ) > = 1 , " OSelectionBrowseBox::Fill : please call only after inserting the handle column ! " ) ;
2001-02-05 08:26:47 +00:00
sal_uInt16 nColCount = ColCount ( ) - 1 ;
if ( nColCount < DEFAULT_QUERY_COLS )
AppendNewCol ( DEFAULT_QUERY_COLS - nColCount ) ;
}
2002-05-24 11:58:56 +00:00
//------------------------------------------------------------------------------
Size OSelectionBrowseBox : : CalcOptimalSize ( const Size & _rAvailable )
{
Size aReturn ( _rAvailable . Width ( ) , GetTitleHeight ( ) ) ;
aReturn . Height ( ) + = ( m_nVisibleCount ? m_nVisibleCount : 15 ) * GetDataRowHeight ( ) ;
aReturn . Height ( ) + = 40 ; // just some space
return aReturn ;
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : Command ( const CommandEvent & rEvt )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
switch ( rEvt . GetCommand ( ) )
{
case COMMAND_CONTEXTMENU :
{
2002-05-24 11:58:56 +00:00
Point aMenuPos ( rEvt . GetMousePosPixel ( ) ) ;
2001-02-05 08:26:47 +00:00
if ( ! rEvt . IsMouseEvent ( ) )
{
2002-05-24 11:58:56 +00:00
if ( 1 = = GetSelectColumnCount ( ) )
{
2006-10-12 12:43:07 +00:00
sal_uInt16 nSelId = GetColumnId (
2011-01-14 15:00:11 +01:00
sal : : static_int_cast < sal_uInt16 > (
2006-10-12 12:43:07 +00:00
FirstSelectedColumn ( ) ) ) ;
2002-05-24 11:58:56 +00:00
: : Rectangle aColRect ( GetFieldRectPixel ( 0 , nSelId , sal_False ) ) ;
aMenuPos = aColRect . TopCenter ( ) ;
}
else
{
EditBrowseBox : : Command ( rEvt ) ;
return ;
}
2001-02-05 08:26:47 +00:00
}
2002-08-19 07:01:32 +00:00
sal_uInt16 nColId = GetColumnId ( GetColumnAtXPosPixel ( aMenuPos . X ( ) ) ) ;
2002-05-24 11:58:56 +00:00
long nRow = GetRowAtYPosPixel ( aMenuPos . Y ( ) ) ;
2001-02-05 08:26:47 +00:00
2002-05-24 11:58:56 +00:00
if ( nRow < 0 & & nColId > HANDLE_ID )
2001-02-05 08:26:47 +00:00
{
2002-05-24 11:58:56 +00:00
if ( ! IsColumnSelected ( nColId ) )
{
adjustSelectionMode ( sal_True /* clicked onto a header */ , sal_False /* not onto the handle col */ ) ;
SelectColumnId ( nColId ) ;
}
2008-06-25 11:54:03 +00:00
if ( ! static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . isReadOnly ( ) )
2001-02-05 08:26:47 +00:00
{
2002-05-24 11:58:56 +00:00
PopupMenu aContextMenu ( ModuleRes ( RID_QUERYCOLPOPUPMENU ) ) ;
switch ( aContextMenu . Execute ( this , aMenuPos ) )
2001-02-05 08:26:47 +00:00
{
2002-05-24 11:58:56 +00:00
case SID_DELETE :
2001-02-05 08:26:47 +00:00
RemoveField ( nColId ) ;
break ;
2002-05-24 11:58:56 +00:00
case ID_BROWSER_COLWIDTH :
adjustBrowseBoxColumnWidth ( this , nColId ) ;
break ;
2001-02-05 08:26:47 +00:00
}
}
}
else if ( nRow > = 0 & & nColId < = HANDLE_ID )
{
2008-06-25 11:54:03 +00:00
if ( ! static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . isReadOnly ( ) )
2001-02-05 08:26:47 +00:00
{
PopupMenu aContextMenu ( ModuleRes ( RID_QUERYFUNCTION_POPUPMENU ) ) ;
aContextMenu . CheckItem ( ID_QUERY_FUNCTION , m_bVisibleRow [ BROW_FUNCTION_ROW ] ) ;
aContextMenu . CheckItem ( ID_QUERY_TABLENAME , m_bVisibleRow [ BROW_TABLE_ROW ] ) ;
aContextMenu . CheckItem ( ID_QUERY_ALIASNAME , m_bVisibleRow [ BROW_COLUMNALIAS_ROW ] ) ;
2008-06-25 11:54:03 +00:00
aContextMenu . CheckItem ( ID_QUERY_DISTINCT , static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . isDistinct ( ) ) ;
2001-02-05 08:26:47 +00:00
2002-05-24 11:58:56 +00:00
switch ( aContextMenu . Execute ( this , aMenuPos ) )
2001-02-05 08:26:47 +00:00
{
case ID_QUERY_FUNCTION :
SetRowVisible ( BROW_FUNCTION_ROW , ! IsRowVisible ( BROW_FUNCTION_ROW ) ) ;
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_QUERY_VIEW_FUNCTIONS ) ;
2001-02-05 08:26:47 +00:00
break ;
case ID_QUERY_TABLENAME :
SetRowVisible ( BROW_TABLE_ROW , ! IsRowVisible ( BROW_TABLE_ROW ) ) ;
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_QUERY_VIEW_TABLES ) ;
2001-02-05 08:26:47 +00:00
break ;
case ID_QUERY_ALIASNAME :
SetRowVisible ( BROW_COLUMNALIAS_ROW , ! IsRowVisible ( BROW_COLUMNALIAS_ROW ) ) ;
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_QUERY_VIEW_ALIASES ) ;
2001-02-05 08:26:47 +00:00
break ;
case ID_QUERY_DISTINCT :
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setDistinct ( ! static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . isDistinct ( ) ) ;
2010-02-10 14:05:19 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setModified ( sal_True ) ;
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_QUERY_DISTINCT_VALUES ) ;
2001-02-05 08:26:47 +00:00
break ;
}
2010-02-10 14:05:19 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setModified ( sal_True ) ;
2001-02-05 08:26:47 +00:00
}
}
else
{
2001-06-29 07:45:10 +00:00
EditBrowseBox : : Command ( rEvt ) ;
2001-02-05 08:26:47 +00:00
return ;
}
}
default :
2001-06-29 07:45:10 +00:00
EditBrowseBox : : Command ( rEvt ) ;
2001-02-05 08:26:47 +00:00
}
}
//------------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox : : IsRowVisible ( sal_uInt16 _nWhich ) const
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( _nWhich < ( m_bVisibleRow . size ( ) ) , " OSelectionBrowseBox::IsRowVisible : invalid parameter ! " ) ;
2001-02-05 08:26:47 +00:00
return m_bVisibleRow [ _nWhich ] ;
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : SetRowVisible ( sal_uInt16 _nWhich , sal_Bool _bVis )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( _nWhich < m_bVisibleRow . size ( ) , " OSelectionBrowseBox::SetRowVisible : invalid parameter ! " ) ;
2001-02-05 08:26:47 +00:00
2001-10-26 06:49:36 +00:00
sal_Bool bWasEditing = IsEditing ( ) ;
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
// do this before removing or inserting rows, as this triggers ActivateCell-calls, which rely on m_bVisibleRow
m_bVisibleRow [ _nWhich ] = ! m_bVisibleRow [ _nWhich ] ;
long nId = GetBrowseRow ( _nWhich ) ;
if ( _bVis )
{
RowInserted ( nId , 1 ) ;
2001-10-23 11:30:27 +00:00
+ + m_nVisibleCount ;
2001-02-05 08:26:47 +00:00
}
else
{
RowRemoved ( nId , 1 ) ;
2001-10-23 11:30:27 +00:00
- - m_nVisibleCount ;
2001-02-05 08:26:47 +00:00
}
2001-10-26 06:49:36 +00:00
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
ActivateCell ( ) ;
}
//------------------------------------------------------------------------------
long OSelectionBrowseBox : : GetBrowseRow ( long nRowId ) const
{
2011-01-14 15:00:11 +01:00
sal_uInt16 nCount ( 0 ) ;
for ( sal_uInt16 i = 0 ; i < nRowId ; + + i )
2001-02-05 08:26:47 +00:00
{
2002-08-19 07:01:32 +00:00
if ( m_bVisibleRow [ i ] )
+ + nCount ;
2001-02-05 08:26:47 +00:00
}
return nCount ;
}
//------------------------------------------------------------------------------
long OSelectionBrowseBox : : GetRealRow ( long nRowId ) const
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
long nErg = 0 , i ;
2007-11-01 14:32:32 +00:00
const long nCount = m_bVisibleRow . size ( ) ;
2002-08-19 07:01:32 +00:00
for ( i = 0 ; i < nCount ; + + i )
2001-02-05 08:26:47 +00:00
{
if ( m_bVisibleRow [ i ] )
{
if ( nErg + + = = nRowId )
break ;
}
}
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( nErg < = long ( m_bVisibleRow . size ( ) ) , " nErg kann nicht groesser als BROW_ROW_CNT sein! " ) ;
2001-02-05 08:26:47 +00:00
return i ;
}
static long nVisibleRowMask [ ] =
{
0x0001 ,
0x0002 ,
0x0004 ,
0x0008 ,
0x0010 ,
0x0020 ,
0x0040 ,
0x0080 ,
0x0100 ,
0x0200 ,
0x0400 ,
0x0800
} ;
//------------------------------------------------------------------------------
sal_Int32 OSelectionBrowseBox : : GetNoneVisibleRows ( ) const
{
sal_Int32 nErg ( 0 ) ;
2001-10-23 11:30:27 +00:00
// only the first 11 row are interesting
2012-05-31 12:36:21 +01:00
sal_Int32 nSize = sizeof ( nVisibleRowMask ) / sizeof ( nVisibleRowMask [ 0 ] ) ;
2001-02-05 08:26:47 +00:00
for ( sal_Int32 i = 0 ; i < nSize ; i + + )
{
if ( ! m_bVisibleRow [ i ] )
nErg | = nVisibleRowMask [ i ] ;
}
return nErg ;
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : SetNoneVisbleRow ( long nRows )
{
2001-10-23 11:30:27 +00:00
// only the first 11 row are interesting
2012-05-31 12:36:21 +01:00
sal_Int32 nSize = sizeof ( nVisibleRowMask ) / sizeof ( nVisibleRowMask [ 0 ] ) ;
2001-02-05 08:26:47 +00:00
for ( sal_Int32 i = 0 ; i < nSize ; i + + )
m_bVisibleRow [ i ] = ! ( nRows & nVisibleRowMask [ i ] ) ;
}
//------------------------------------------------------------------------------
String OSelectionBrowseBox : : GetCellText ( long nRow , sal_uInt16 nColId ) const
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2002-08-19 07:01:32 +00:00
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColId ) ;
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEntry = getFields ( ) [ nPos - 1 ] ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry ! = NULL , " OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... " ) ;
2002-08-30 10:14:45 +00:00
if ( pEntry - > IsEmpty ( ) )
2001-02-05 08:26:47 +00:00
return String ( ) ;
String aText ;
switch ( nRow )
{
case BROW_TABLE_ROW :
aText = pEntry - > GetAlias ( ) ;
break ;
case BROW_FIELD_ROW :
{
String aField = pEntry - > GetField ( ) ;
if ( aField . GetChar ( 0 ) = = ' * ' ) // * durch alias.* ersetzen
{
aField = pEntry - > GetAlias ( ) ;
2001-04-06 12:47:18 +00:00
if ( aField . Len ( ) )
aField + = ' . ' ;
2001-02-05 08:26:47 +00:00
aField + = ' * ' ;
}
aText = aField ;
} break ;
case BROW_ORDER_ROW :
if ( pEntry - > GetOrderDir ( ) ! = ORDER_NONE )
2011-01-14 15:00:11 +01:00
aText = String ( ModuleRes ( STR_QUERY_SORTTEXT ) ) . GetToken ( sal : : static_int_cast < sal_uInt16 > ( pEntry - > GetOrderDir ( ) ) ) ;
2001-02-05 08:26:47 +00:00
break ;
case BROW_VIS_ROW :
break ;
case BROW_COLUMNALIAS_ROW :
aText = pEntry - > GetFieldAlias ( ) ;
break ;
case BROW_FUNCTION_ROW :
2002-08-30 10:14:45 +00:00
// we always show the group function at first
if ( pEntry - > IsGroupBy ( ) )
2012-01-02 10:55:27 +00:00
aText = m_aFunctionStrings . GetToken ( comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) - 1 ) ;
2002-08-30 10:14:45 +00:00
else if ( pEntry - > isNumericOrAggreateFunction ( ) )
aText = pEntry - > GetFunction ( ) ;
2001-02-05 08:26:47 +00:00
break ;
default :
2003-12-01 09:38:48 +00:00
aText = pEntry - > GetCriteria ( sal_uInt16 ( nRow - BROW_CRIT1_ROW ) ) ;
2001-02-05 08:26:47 +00:00
}
return aText ;
}
//------------------------------------------------------------------------------
2002-08-30 10:14:45 +00:00
sal_Bool OSelectionBrowseBox : : GetFunctionName ( sal_uInt32 _nFunctionTokenId , String & rFkt )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
sal_Bool bErg = sal_True ;
2002-08-30 10:14:45 +00:00
switch ( _nFunctionTokenId )
2001-02-05 08:26:47 +00:00
{
2002-08-30 10:14:45 +00:00
case SQL_TOKEN_COUNT :
rFkt = ( m_pFunctionCell - > GetEntryCount ( ) < 3 ) ? m_pFunctionCell - > GetEntry ( 1 ) : m_pFunctionCell - > GetEntry ( 2 ) ;
break ;
case SQL_TOKEN_AVG :
rFkt = m_pFunctionCell - > GetEntry ( 1 ) ;
break ;
case SQL_TOKEN_MAX :
rFkt = m_pFunctionCell - > GetEntry ( 3 ) ;
break ;
case SQL_TOKEN_MIN :
rFkt = m_pFunctionCell - > GetEntry ( 4 ) ;
break ;
case SQL_TOKEN_SUM :
rFkt = m_pFunctionCell - > GetEntry ( 5 ) ;
break ;
2008-12-01 12:31:27 +00:00
case SQL_TOKEN_EVERY :
rFkt = m_pFunctionCell - > GetEntry ( 6 ) ;
break ;
case SQL_TOKEN_ANY :
rFkt = m_pFunctionCell - > GetEntry ( 7 ) ;
break ;
case SQL_TOKEN_SOME :
rFkt = m_pFunctionCell - > GetEntry ( 8 ) ;
break ;
case SQL_TOKEN_STDDEV_POP :
rFkt = m_pFunctionCell - > GetEntry ( 9 ) ;
break ;
case SQL_TOKEN_STDDEV_SAMP :
rFkt = m_pFunctionCell - > GetEntry ( 10 ) ;
break ;
case SQL_TOKEN_VAR_SAMP :
rFkt = m_pFunctionCell - > GetEntry ( 11 ) ;
break ;
case SQL_TOKEN_VAR_POP :
rFkt = m_pFunctionCell - > GetEntry ( 12 ) ;
break ;
case SQL_TOKEN_COLLECT :
rFkt = m_pFunctionCell - > GetEntry ( 13 ) ;
break ;
case SQL_TOKEN_FUSION :
rFkt = m_pFunctionCell - > GetEntry ( 14 ) ;
break ;
case SQL_TOKEN_INTERSECTION :
rFkt = m_pFunctionCell - > GetEntry ( 15 ) ;
break ;
2002-08-30 10:14:45 +00:00
default :
2001-02-05 08:26:47 +00:00
{
2012-01-02 10:55:27 +00:00
xub_StrLen nCount = comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) ;
2003-12-01 17:02:43 +00:00
xub_StrLen i ;
2013-03-02 15:06:22 +01:00
for ( i = 0 ; i < nCount - 1 ; i + + ) // grouping is not counted
2002-08-30 10:14:45 +00:00
{
if ( rFkt . EqualsIgnoreCaseAscii ( m_aFunctionStrings . GetToken ( i ) ) )
{
rFkt = m_aFunctionStrings . GetToken ( i ) ;
break ;
}
}
if ( i = = nCount - 1 )
bErg = sal_False ;
2001-02-05 08:26:47 +00:00
}
}
2002-08-30 10:14:45 +00:00
2001-02-05 08:26:47 +00:00
return bErg ;
}
//------------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
String OSelectionBrowseBox : : GetCellContents ( sal_Int32 nCellIndex , sal_uInt16 nColId )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2005-09-23 11:43:59 +00:00
if ( GetCurColumnId ( ) = = nColId & & ! m_bInUndoMode )
2003-03-19 16:57:12 +00:00
SaveModified ( ) ;
2001-02-05 08:26:47 +00:00
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColId ) ;
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEntry = getFields ( ) [ nPos - 1 ] ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry ! = NULL , " OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... " ) ;
2001-02-05 08:26:47 +00:00
2001-04-18 10:44:59 +00:00
switch ( nCellIndex )
2001-02-05 08:26:47 +00:00
{
case BROW_VIS_ROW :
return pEntry - > IsVisible ( ) ? g_strOne : g_strZero ;
case BROW_ORDER_ROW :
{
sal_uInt16 nIdx = m_pOrderCell - > GetSelectEntryPos ( ) ;
if ( nIdx = = sal_uInt16 ( - 1 ) )
nIdx = 0 ;
2012-07-04 23:58:05 +01:00
return rtl : : OUString ( nIdx ) ;
2001-02-05 08:26:47 +00:00
}
default :
2002-08-19 07:01:32 +00:00
return GetCellText ( nCellIndex , nColId ) ;
2001-02-05 08:26:47 +00:00
}
}
//------------------------------------------------------------------------------
2011-01-14 15:00:11 +01:00
void OSelectionBrowseBox : : SetCellContents ( sal_Int32 nRow , sal_uInt16 nColId , const String & strNewText )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-01-14 15:00:11 +01:00
sal_Bool bWasEditing = IsEditing ( ) & & ( GetCurColumnId ( ) = = nColId ) & & IsRowVisible ( static_cast < sal_uInt16 > ( nRow ) ) & & ( GetCurRow ( ) = = static_cast < sal_uInt16 > ( GetBrowseRow ( nRow ) ) ) ;
2001-10-26 06:49:36 +00:00
if ( bWasEditing )
2001-02-05 08:26:47 +00:00
DeactivateCell ( ) ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColId ) ;
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEntry = getEntry ( nPos - 1 ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry ! = NULL , " OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... " ) ;
2001-02-05 08:26:47 +00:00
2001-04-18 10:44:59 +00:00
switch ( nRow )
2001-02-05 08:26:47 +00:00
{
case BROW_VIS_ROW :
2002-01-02 10:07:17 +00:00
pEntry - > SetVisible ( strNewText . Equals ( g_strOne ) ) ;
2001-02-05 08:26:47 +00:00
break ;
case BROW_FIELD_ROW :
pEntry - > SetField ( strNewText ) ;
break ;
case BROW_TABLE_ROW :
pEntry - > SetAlias ( strNewText ) ;
break ;
case BROW_ORDER_ROW :
{
sal_uInt16 nIdx = ( sal_uInt16 ) strNewText . ToInt32 ( ) ;
pEntry - > SetOrderDir ( EOrderDir ( nIdx ) ) ;
} break ;
case BROW_COLUMNALIAS_ROW :
pEntry - > SetFieldAlias ( strNewText ) ;
break ;
case BROW_FUNCTION_ROW :
2002-08-30 10:14:45 +00:00
{
2012-01-02 10:55:27 +00:00
String sGroupFunctionName = m_aFunctionStrings . GetToken ( comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) - 1 ) ;
2001-02-05 08:26:47 +00:00
pEntry - > SetFunction ( strNewText ) ;
2002-08-30 10:14:45 +00:00
// first reset this two member
sal_Int32 nFunctionType = pEntry - > GetFunctionType ( ) ;
nFunctionType & = ~ FKT_AGGREGATE ;
pEntry - > SetFunctionType ( nFunctionType ) ;
if ( pEntry - > IsGroupBy ( ) & & ! sGroupFunctionName . EqualsIgnoreCaseAscii ( strNewText ) )
pEntry - > SetGroupBy ( sal_False ) ;
if ( sGroupFunctionName . EqualsIgnoreCaseAscii ( strNewText ) )
2001-02-05 08:26:47 +00:00
pEntry - > SetGroupBy ( sal_True ) ;
2002-08-30 10:14:45 +00:00
else if ( strNewText . Len ( ) )
{
nFunctionType | = FKT_AGGREGATE ;
pEntry - > SetFunctionType ( nFunctionType ) ;
}
} break ;
2001-02-05 08:26:47 +00:00
default :
2003-12-01 09:38:48 +00:00
pEntry - > SetCriteria ( sal_uInt16 ( nRow - BROW_CRIT1_ROW ) , strNewText ) ;
2001-02-05 08:26:47 +00:00
}
2001-04-18 10:44:59 +00:00
long nCellIndex = GetRealRow ( nRow ) ;
2011-01-14 15:00:11 +01:00
if ( IsRowVisible ( static_cast < sal_uInt16 > ( nRow ) ) )
2002-08-19 07:01:32 +00:00
RowModified ( nCellIndex , nColId ) ;
2001-02-05 08:26:47 +00:00
2013-03-02 15:06:22 +01:00
// the appropriate field-description is now empty -> set Visible to sal_False (now it is consistent to normal empty rows)
2001-02-05 08:26:47 +00:00
if ( pEntry - > IsEmpty ( ) )
pEntry - > SetVisible ( sal_False ) ;
2001-10-26 06:49:36 +00:00
if ( bWasEditing )
2002-08-19 07:01:32 +00:00
ActivateCell ( nCellIndex , nColId ) ;
2001-02-05 08:26:47 +00:00
2010-02-10 14:05:19 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setModified ( sal_True ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
sal_uInt32 OSelectionBrowseBox : : GetTotalCellWidth ( long nRow , sal_uInt16 nColId ) const
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
long nRowId = GetRealRow ( nRow ) ;
if ( nRowId = = BROW_VIS_ROW )
return CHECKBOX_SIZE ;
else
return GetDataWindow ( ) . GetTextWidth ( GetCellText ( nRowId , nColId ) ) ;
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox : : ColumnResized ( sal_uInt16 nColId )
{
2008-06-25 11:54:03 +00:00
if ( static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . isReadOnly ( ) )
2001-02-05 08:26:47 +00:00
return ;
// The resizing of columns can't be suppressed (BrowseBox doesn't support that) so we have to do this
// fake. It's not _that_ bad : the user may change column widths while in read-only mode to see all details
// but the changes aren't permanent ...
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColId ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( nPos < = getFields ( ) . size ( ) , " ColumnResized:: nColId sollte nicht groesser als List::count sein! " ) ;
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEntry = getEntry ( nPos - 1 ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry . is ( ) , " OSelectionBrowseBox::ColumnResized : keine FieldDescription ! " ) ;
2010-02-10 14:05:19 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . setModified ( sal_True ) ;
2001-06-29 07:45:10 +00:00
EditBrowseBox : : ColumnResized ( nColId ) ;
2001-02-05 08:26:47 +00:00
2010-10-15 12:22:54 -05:00
if ( pEntry . is ( ) )
2001-02-05 08:26:47 +00:00
{
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode )
{
// create the undo action
OTabFieldSizedUndoAct * pUndo = new OTabFieldSizedUndoAct ( this ) ;
pUndo - > SetColumnPosition ( nPos ) ;
pUndo - > SetOriginalWidth ( pEntry - > GetColWidth ( ) ) ;
2008-06-25 11:54:03 +00:00
getDesignView ( ) - > getController ( ) . addUndoActionAndInvalidate ( pUndo ) ;
2005-09-23 11:43:59 +00:00
}
2001-02-23 14:04:37 +00:00
pEntry - > SetColWidth ( sal_uInt16 ( GetColumnWidth ( nColId ) ) ) ;
2001-02-05 08:26:47 +00:00
}
}
//------------------------------------------------------------------------------
sal_uInt32 OSelectionBrowseBox : : GetTotalCellWidth ( long nRowId , sal_uInt16 nColId )
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2011-01-14 15:00:11 +01:00
sal_uInt16 nPos = GetColumnPos ( nColId ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( ( nPos = = 0 ) | | ( nPos < = getFields ( ) . size ( ) ) , " OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId " ) ;
2001-02-05 08:26:47 +00:00
2002-08-19 07:01:32 +00:00
OTableFieldDescRef pEntry = getFields ( ) [ nPos - 1 ] ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pEntry . is ( ) , " OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription ! " ) ;
2001-02-05 08:26:47 +00:00
long nRow = GetRealRow ( nRowId ) ;
String strText ( GetCellText ( nRow , nColId ) ) ;
return GetDataWindow ( ) . LogicToPixel ( Size ( GetDataWindow ( ) . GetTextWidth ( strText ) , 0 ) ) . Width ( ) ;
}
//------------------------------------------------------------------------------
2006-06-20 02:27:27 +00:00
sal_uInt16 OSelectionBrowseBox : : GetDefaultColumnWidth ( const String & /*rName*/ ) const
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS ( OSelectionBrowseBox , NULL ) ;
2013-03-02 15:06:22 +01:00
// the base class makes it dependent on the text. I have no column headers, therefore I
// like to have a new Default-value
2003-12-01 09:38:48 +00:00
return static_cast < sal_uInt16 > ( DEFAULT_SIZE ) ;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
2001-04-18 10:44:59 +00:00
sal_Bool OSelectionBrowseBox : : isCutAllowed ( )
{
sal_Bool bCutAllowed = sal_False ;
long nRow = GetRealRow ( GetCurRow ( ) ) ;
switch ( nRow )
{
case BROW_VIS_ROW :
case BROW_ORDER_ROW :
case BROW_TABLE_ROW :
case BROW_FUNCTION_ROW :
break ;
case BROW_FIELD_ROW :
2013-01-31 10:18:04 +01:00
bCutAllowed = ! m_pFieldCell - > GetSelected ( ) . isEmpty ( ) ;
2001-04-18 10:44:59 +00:00
break ;
default :
2013-01-31 10:18:04 +01:00
bCutAllowed = ! m_pTextCell - > GetSelected ( ) . isEmpty ( ) ;
2001-04-18 10:44:59 +00:00
break ;
}
return bCutAllowed ;
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : cut ( )
{
long nRow = GetRealRow ( GetCurRow ( ) ) ;
switch ( nRow )
{
case BROW_FIELD_ROW :
m_pFieldCell - > Cut ( ) ;
2001-08-13 07:34:13 +00:00
m_pFieldCell - > SetModifyFlag ( ) ;
2001-04-18 10:44:59 +00:00
break ;
default :
m_pTextCell - > Cut ( ) ;
2001-08-13 07:34:13 +00:00
m_pTextCell - > SetModifyFlag ( ) ;
2001-04-18 10:44:59 +00:00
}
2001-08-13 07:34:13 +00:00
SaveModified ( ) ;
2001-04-18 10:44:59 +00:00
RowModified ( GetBrowseRow ( nRow ) , GetCurColumnId ( ) ) ;
2001-10-05 05:49:21 +00:00
invalidateUndoRedo ( ) ;
2001-04-18 10:44:59 +00:00
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : paste ( )
{
long nRow = GetRealRow ( GetCurRow ( ) ) ;
switch ( nRow )
{
case BROW_FIELD_ROW :
m_pFieldCell - > Paste ( ) ;
2001-08-30 12:35:55 +00:00
m_pFieldCell - > SetModifyFlag ( ) ;
2001-04-18 10:44:59 +00:00
break ;
default :
m_pTextCell - > Paste ( ) ;
2001-08-30 12:35:38 +00:00
m_pTextCell - > SetModifyFlag ( ) ;
2001-04-18 10:44:59 +00:00
}
RowModified ( GetBrowseRow ( nRow ) , GetCurColumnId ( ) ) ;
2001-10-05 05:49:21 +00:00
invalidateUndoRedo ( ) ;
2001-04-18 10:44:59 +00:00
}
// -----------------------------------------------------------------------------
2003-04-01 13:05:21 +00:00
sal_Bool OSelectionBrowseBox : : isPasteAllowed ( )
{
sal_Bool bPasteAllowed = sal_True ;
long nRow = GetRealRow ( GetCurRow ( ) ) ;
switch ( nRow )
{
case BROW_VIS_ROW :
case BROW_ORDER_ROW :
case BROW_TABLE_ROW :
case BROW_FUNCTION_ROW :
bPasteAllowed = sal_False ;
break ;
}
return bPasteAllowed ;
}
// -----------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox : : isCopyAllowed ( )
{
return isCutAllowed ( ) ;
}
// -----------------------------------------------------------------------------
2001-04-18 10:44:59 +00:00
void OSelectionBrowseBox : : copy ( )
{
long nRow = GetRealRow ( GetCurRow ( ) ) ;
switch ( nRow )
{
case BROW_FIELD_ROW :
m_pFieldCell - > Copy ( ) ;
break ;
default :
m_pTextCell - > Copy ( ) ;
}
}
// -----------------------------------------------------------------------------
2002-08-30 10:14:45 +00:00
void OSelectionBrowseBox : : appendUndoAction ( const String & _rOldValue , const String & _rNewValue , sal_Int32 _nRow , sal_Bool & _bListAction )
{
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode & & ! _rNewValue . Equals ( _rOldValue ) )
2002-08-30 10:14:45 +00:00
{
if ( ! _bListAction )
{
_bListAction = sal_True ;
2010-11-17 09:11:03 +01:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . GetUndoManager ( ) . EnterListAction ( String ( ) , String ( ) ) ;
2002-08-30 10:14:45 +00:00
}
appendUndoAction ( _rOldValue , _rNewValue , _nRow ) ;
}
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : appendUndoAction ( const String & _rOldValue , const String & _rNewValue , sal_Int32 _nRow )
2001-04-18 10:44:59 +00:00
{
2005-09-23 11:43:59 +00:00
if ( ! m_bInUndoMode & & ! _rNewValue . Equals ( _rOldValue ) )
2001-04-18 10:44:59 +00:00
{
OTabFieldCellModifiedUndoAct * pUndoAct = new OTabFieldCellModifiedUndoAct ( this ) ;
pUndoAct - > SetCellIndex ( _nRow ) ;
2003-03-19 16:57:12 +00:00
OSL_ENSURE ( GetColumnPos ( GetCurColumnId ( ) ) ! = BROWSER_INVALIDID , " Current position isn't valid! " ) ;
2002-08-30 10:14:45 +00:00
pUndoAct - > SetColumnPosition ( GetColumnPos ( GetCurColumnId ( ) ) ) ;
2001-04-18 10:44:59 +00:00
pUndoAct - > SetCellContents ( _rOldValue ) ;
2008-06-25 11:54:03 +00:00
getDesignView ( ) - > getController ( ) . addUndoActionAndInvalidate ( pUndoAct ) ;
2001-04-18 10:44:59 +00:00
}
}
// -----------------------------------------------------------------------------
2012-03-01 18:00:32 +01:00
IMPL_LINK_NOARG ( OSelectionBrowseBox , OnInvalidateTimer )
2001-04-18 12:20:48 +00:00
{
2008-06-25 11:54:03 +00:00
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_CUT ) ;
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_COPY ) ;
static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . InvalidateFeature ( SID_PASTE ) ;
2001-04-18 12:20:48 +00:00
if ( ! m_bStopTimer )
m_timerInvalidate . Start ( ) ;
return 0L ;
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : stopTimer ( )
{
m_bStopTimer = sal_True ;
if ( m_timerInvalidate . IsActive ( ) )
m_timerInvalidate . Stop ( ) ;
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : startTimer ( )
{
m_bStopTimer = sal_False ;
if ( ! m_timerInvalidate . IsActive ( ) )
m_timerInvalidate . Start ( ) ;
}
// -----------------------------------------------------------------------------
2001-10-05 05:49:21 +00:00
OTableFields & OSelectionBrowseBox : : getFields ( ) const
2001-04-30 12:02:01 +00:00
{
2008-06-25 11:54:03 +00:00
OQueryController & rController = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) ;
return rController . getTableFieldDesc ( ) ;
2001-04-30 12:02:01 +00:00
}
// -----------------------------------------------------------------------------
2001-10-05 05:49:21 +00:00
void OSelectionBrowseBox : : enableControl ( const OTableFieldDescRef & _rEntry , Window * _pControl )
{
2011-01-14 15:00:11 +01:00
sal_Bool bEnable = ! _rEntry - > isCondition ( ) ;
2001-10-05 05:49:21 +00:00
_pControl - > Enable ( bEnable ) ;
_pControl - > EnableInput ( bEnable ) ;
}
// -----------------------------------------------------------------------------
2010-07-10 18:21:24 +02:00
void OSelectionBrowseBox : : setTextCellContext ( const OTableFieldDescRef & _rEntry , const String & _sText , const rtl : : OString & _sHelpId )
2001-10-05 05:49:21 +00:00
{
m_pTextCell - > SetText ( _sText ) ;
m_pTextCell - > ClearModifyFlag ( ) ;
if ( ! m_pTextCell - > HasFocus ( ) )
m_pTextCell - > GrabFocus ( ) ;
enableControl ( _rEntry , m_pTextCell ) ;
2010-07-10 18:21:24 +02:00
if ( m_pTextCell - > GetHelpId ( ) ! = _sHelpId )
2013-03-02 15:06:22 +01:00
// as TextCell is used in various contexts I will delete the cached HelpText
2001-10-05 05:49:21 +00:00
m_pTextCell - > SetHelpText ( String ( ) ) ;
2010-07-10 18:21:24 +02:00
m_pTextCell - > SetHelpId ( _sHelpId ) ;
2001-10-05 05:49:21 +00:00
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : invalidateUndoRedo ( )
{
2008-06-25 11:54:03 +00:00
OQueryController & rController = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) ;
rController . InvalidateFeature ( ID_BROWSER_UNDO ) ;
rController . InvalidateFeature ( ID_BROWSER_REDO ) ;
rController . InvalidateFeature ( ID_BROWSER_QUERY_EXECUTE ) ;
2001-10-05 05:49:21 +00:00
}
// -----------------------------------------------------------------------------
OTableFieldDescRef OSelectionBrowseBox : : getEntry ( OTableFields : : size_type _nPos )
{
// we have to check if we need a new entry at this position
OTableFields & aFields = getFields ( ) ;
OSL_ENSURE ( aFields . size ( ) > _nPos , " ColID is to great! " ) ;
2001-04-18 12:20:48 +00:00
2001-10-05 05:49:21 +00:00
OTableFieldDescRef pEntry = aFields [ _nPos ] ;
2010-10-15 12:22:54 -05:00
OSL_ENSURE ( pEntry . is ( ) , " Invalid entry! " ) ;
if ( ! pEntry . is ( ) )
2001-10-05 05:49:21 +00:00
{
pEntry = new OTableFieldDesc ( ) ;
2006-10-12 12:43:07 +00:00
pEntry - > SetColumnId (
2011-01-14 15:00:11 +01:00
GetColumnId ( sal : : static_int_cast < sal_uInt16 > ( _nPos + 1 ) ) ) ;
2001-10-05 05:49:21 +00:00
aFields [ _nPos ] = pEntry ;
}
return pEntry ;
}
// -----------------------------------------------------------------------------
2001-10-22 08:57:52 +00:00
void OSelectionBrowseBox : : GetFocus ( )
{
2001-10-23 11:30:27 +00:00
if ( ! IsEditing ( ) & & ! m_bWasEditing )
2001-10-22 08:57:52 +00:00
ActivateCell ( ) ;
EditBrowseBox : : GetFocus ( ) ;
}
// -----------------------------------------------------------------------------
2001-10-26 06:49:36 +00:00
void OSelectionBrowseBox : : DeactivateCell ( sal_Bool _bUpdate )
{
m_bWasEditing = sal_True ;
EditBrowseBox : : DeactivateCell ( _bUpdate ) ;
m_bWasEditing = sal_False ;
}
// -----------------------------------------------------------------------------
2002-04-23 06:58:14 +00:00
: : rtl : : OUString OSelectionBrowseBox : : GetRowDescription ( sal_Int32 _nRow ) const
{
String aLabel ( ModuleRes ( STR_QUERY_HANDLETEXT ) ) ;
2013-03-02 15:06:22 +01:00
// from BROW_CRIT2_ROW onwards all rows are shown as "or"
2002-04-23 06:58:14 +00:00
xub_StrLen nToken = ( xub_StrLen ) ( _nRow > = GetBrowseRow ( BROW_CRIT2_ROW ) )
?
xub_StrLen ( BROW_CRIT2_ROW ) : xub_StrLen ( GetRealRow ( _nRow ) ) ;
return : : rtl : : OUString ( aLabel . GetToken ( nToken ) ) ;
}
// -----------------------------------------------------------------------------
2006-06-20 02:27:27 +00:00
: : rtl : : OUString OSelectionBrowseBox : : GetAccessibleObjectName ( : : svt : : AccessibleBrowseBoxObjType _eObjType , sal_Int32 _nPosition ) const
2002-04-23 06:58:14 +00:00
{
: : rtl : : OUString sRetText ;
switch ( _eObjType )
{
case : : svt : : BBTYPE_ROWHEADERCELL :
sRetText = GetRowDescription ( _nPosition ) ;
break ;
default :
2006-06-20 02:27:27 +00:00
sRetText = EditBrowseBox : : GetAccessibleObjectDescription ( _eObjType , _nPosition ) ;
2002-04-23 06:58:14 +00:00
}
return sRetText ;
}
2002-08-30 10:14:45 +00:00
// -----------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox : : fillEntryTable ( OTableFieldDescRef & _pEntry , const : : rtl : : OUString & _sTableName )
{
sal_Bool bRet = sal_False ;
OJoinTableView : : OTableWindowMap * pTabWinList = getDesignView ( ) - > getTableView ( ) - > GetTabWinMap ( ) ;
if ( pTabWinList )
{
OJoinTableView : : OTableWindowMapIterator aIter = pTabWinList - > find ( _sTableName ) ;
if ( aIter ! = pTabWinList - > end ( ) )
{
OQueryTableWindow * pEntryTab = static_cast < OQueryTableWindow * > ( aIter - > second ) ;
if ( pEntryTab )
{
_pEntry - > SetTable ( pEntryTab - > GetTableName ( ) ) ;
_pEntry - > SetTabWindow ( pEntryTab ) ;
bRet = sal_True ;
}
}
}
return bRet ;
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox : : setFunctionCell ( OTableFieldDescRef & _pEntry )
{
2008-06-25 11:54:03 +00:00
Reference < XConnection > xConnection = static_cast < OQueryController & > ( getDesignView ( ) - > getController ( ) ) . getConnection ( ) ;
2002-08-30 10:14:45 +00:00
if ( xConnection . is ( ) )
{
2012-02-09 18:47:32 +01:00
// Aggregate functions in general only available with Core SQL
2003-12-01 09:38:48 +00:00
if ( lcl_SupportsCoreSQLGrammar ( xConnection ) )
2002-08-30 10:14:45 +00:00
{
// if we have an asterix, no other function than count is allowed
m_pFunctionCell - > Clear ( ) ;
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( 0 ) ) ;
if ( isFieldNameAsterix ( _pEntry - > GetField ( ) ) )
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( 2 ) ) ; // 2 -> COUNT
else
{
2012-01-02 10:55:27 +00:00
xub_StrLen nCount = comphelper : : string : : getTokenCount ( m_aFunctionStrings , ' ; ' ) ;
2002-08-30 10:14:45 +00:00
if ( _pEntry - > isNumeric ( ) )
- - nCount ;
for ( xub_StrLen nIdx = 1 ; nIdx < nCount ; nIdx + + )
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( nIdx ) ) ;
}
if ( _pEntry - > IsGroupBy ( ) )
{
OSL_ENSURE ( ! _pEntry - > isNumeric ( ) , " Not allowed to combine group by and numeric values! " ) ;
m_pFunctionCell - > SelectEntry ( m_pFunctionCell - > GetEntry ( m_pFunctionCell - > GetEntryCount ( ) - 1 ) ) ;
}
else if ( m_pFunctionCell - > GetEntryPos ( String ( _pEntry - > GetFunction ( ) ) ) ! = COMBOBOX_ENTRY_NOTFOUND )
m_pFunctionCell - > SelectEntry ( String ( _pEntry - > GetFunction ( ) ) ) ;
else
m_pFunctionCell - > SelectEntryPos ( 0 ) ;
enableControl ( _pEntry , m_pFunctionCell ) ;
}
else
{
2012-02-09 18:47:32 +01:00
// only COUNT(*) and COUNT("table".*) allowed
2006-07-19 15:06:23 +00:00
sal_Bool bCountRemoved = ! isFieldNameAsterix ( _pEntry - > GetField ( ) ) ;
if ( bCountRemoved )
2002-08-30 10:14:45 +00:00
m_pFunctionCell - > RemoveEntry ( 1 ) ;
if ( ! bCountRemoved & & m_pFunctionCell - > GetEntryCount ( ) < 2 )
m_pFunctionCell - > InsertEntry ( m_aFunctionStrings . GetToken ( 2 ) ) ; // 2 -> COUNT
if ( m_pFunctionCell - > GetEntryPos ( String ( _pEntry - > GetFunction ( ) ) ) ! = COMBOBOX_ENTRY_NOTFOUND )
m_pFunctionCell - > SelectEntry ( _pEntry - > GetFunction ( ) ) ;
else
m_pFunctionCell - > SelectEntryPos ( 0 ) ;
}
}
}
// -----------------------------------------------------------------------------
2003-05-19 11:56:04 +00:00
Reference < XAccessible > OSelectionBrowseBox : : CreateAccessibleCell ( sal_Int32 _nRow , sal_uInt16 _nColumnPos )
{
OTableFieldDescRef pEntry = NULL ;
if ( getFields ( ) . size ( ) > sal_uInt16 ( _nColumnPos - 1 ) )
pEntry = getFields ( ) [ _nColumnPos - 1 ] ;
2010-10-15 12:22:54 -05:00
if ( _nRow = = BROW_VIS_ROW & & pEntry . is ( ) )
2003-05-19 11:56:04 +00:00
return EditBrowseBox : : CreateAccessibleCheckBoxCell ( _nRow , _nColumnPos , pEntry - > IsVisible ( ) ? STATE_CHECK : STATE_NOCHECK ) ;
return EditBrowseBox : : CreateAccessibleCell ( _nRow , _nColumnPos ) ;
}
// -----------------------------------------------------------------------------
2008-12-10 13:41:25 +00:00
bool OSelectionBrowseBox : : HasFieldByAliasName ( const : : rtl : : OUString & rFieldName , OTableFieldDescRef & rInfo ) const
{
OTableFields & aFields = getFields ( ) ;
OTableFields : : iterator aIter = aFields . begin ( ) ;
OTableFields : : iterator aEnd = aFields . end ( ) ;
2003-12-01 09:38:48 +00:00
2008-12-10 13:41:25 +00:00
for ( ; aIter ! = aEnd ; + + aIter )
{
if ( ( * aIter ) - > GetFieldAlias ( ) = = rFieldName )
{
2010-10-15 12:22:54 -05:00
* rInfo = * ( * aIter ) ;
2008-12-10 13:41:25 +00:00
break ;
}
}
return aIter ! = aEnd ;
}
// -----------------------------------------------------------------------------
2003-12-01 09:38:48 +00:00
2010-10-12 15:59:03 +02:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */