summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:02:56 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:02:56 +0200
commitfdc4da32a09265b19470ab09db998ea28936106e (patch)
tree960b32cda2755f988d0d34e568f1019ad2bce0d2 /dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
parentaa20084bd041208841d5ad3ca50b1e963eb5986e (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit e082905e4ce8c9018a2a38035e212eb45e9f70b1 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:14 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 35131d5a73dd02924bf4b404c55d0dbeb324db1f Author: Lionel Elie Mamane <lionel@mamane.lu> Date: Sat Jan 15 05:39:40 2011 +0100 i#116187: report left/right page margin setting ignored on Unix 64 bit (cherry picked from commit 51a9333217687ff16df40ea3bd8983faaf5e425a) Signed-off-by: Michael Meeks <michael.meeks@novell.com> reportdesign/source/ui/report/ReportController.cxx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit ae3903b548d8d05807cc7f3a029495388de5e302 Author: Kohei Yoshida <kyoshida@novell.com> Date: Fri Jan 14 11:24:43 2011 -0500 Remove the Registration... menu item which we don't want. (fdo#33112) dbaccess/uiconfig/dbtdata/menubar/menubar.xml | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit c71822d4eb36b43cdb08c25d207cae5e3c1660cd Author: Noel Power <noel.power@novell.com> Date: Wed Jan 12 11:09:51 2011 +0000 fix for fdo#32742# reportdesign/source/ui/inspection/metadata.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 66d25b635de422a4a811710cb3289266d9a11a84 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:35 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: base_libreoffice-3.3.0.4
Diffstat (limited to 'dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx246
1 files changed, 123 insertions, 123 deletions
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 9ff9b6133430..6b10e23a4340 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,13 +65,13 @@ using namespace ::com::sun::star::accessibility;
const String g_strOne = String::CreateFromAscii("1");
const String g_strZero = String::CreateFromAscii("0");
-#define DEFAULT_QUERY_COLS 20
-#define DEFAULT_SIZE GetTextWidth(g_strZero) * 30
-#define CHECKBOX_SIZE 10
-#define HANDLE_ID 0
-#define HANDLE_COLUMN_WITDH 70
+#define DEFAULT_QUERY_COLS 20
+#define DEFAULT_SIZE GetTextWidth(g_strZero) * 30
+#define CHECKBOX_SIZE 10
+#define HANDLE_ID 0
+#define HANDLE_COLUMN_WITDH 70
-#define SQL_ISRULEOR2(pParseNode, e1,e2) ((pParseNode)->isRule() && (\
+#define SQL_ISRULEOR2(pParseNode, e1,e2) ((pParseNode)->isRule() && (\
(pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \
(pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2)))
@@ -86,8 +86,8 @@ namespace
{
String sName = _sFieldName;
xub_StrLen nTokenCount = sName.GetTokenCount('.');
- if ( (nTokenCount == 2 && sName.GetToken(1,'.').GetChar(0) == '*' )
- || (nTokenCount == 3 && sName.GetToken(2,'.').GetChar(0) == '*' ) )
+ if ( (nTokenCount == 2 && sName.GetToken(1,'.').GetChar(0) == '*' )
+ || (nTokenCount == 3 && sName.GetToken(2,'.').GetChar(0) == '*' ) )
{
bAsterix = sal_True;
}
@@ -116,7 +116,7 @@ namespace
DBG_NAME(OSelectionBrowseBox)
//------------------------------------------------------------------------------
OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
- :EditBrowseBox( pParent,EBBF_NOROWPICTURE, WB_3DLOOK, BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION | BROWSER_HIDESELECT |
+ :EditBrowseBox( pParent,EBBF_NOROWPICTURE, WB_3DLOOK, BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION | BROWSER_HIDESELECT |
BROWSER_HIDECURSOR | BROWSER_HLINESFULL | BROWSER_VLINESFULL )
,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS))
,m_nVisibleCount(0)
@@ -130,18 +130,18 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
DBG_CTOR(OSelectionBrowseBox,NULL);
SetHelpId(HID_CTL_QRYDGNCRIT);
- m_nMode = BROWSER_COLUMNSELECTION | BROWSER_HIDESELECT
- | BROWSER_KEEPSELECTION | BROWSER_HIDECURSOR
- | BROWSER_HLINESFULL | BROWSER_VLINESFULL
- | BROWSER_HEADERBAR_NEW ;
+ m_nMode = BROWSER_COLUMNSELECTION | BROWSER_HIDESELECT
+ | BROWSER_KEEPSELECTION | BROWSER_HIDECURSOR
+ | BROWSER_HLINESFULL | BROWSER_VLINESFULL
+ | BROWSER_HEADERBAR_NEW ;
- m_pTextCell = new Edit(&GetDataWindow(), 0);
- // m_pTextCell->EnableSpecialCheck(sal_False);
- m_pVisibleCell = new CheckBoxControl(&GetDataWindow());
- m_pTableCell = new ListBoxControl(&GetDataWindow()); m_pTableCell->SetDropDownLineCount( 20 );
- m_pFieldCell = new ComboBoxControl(&GetDataWindow()); m_pFieldCell->SetDropDownLineCount( 20 );
- m_pOrderCell = new ListBoxControl(&GetDataWindow());
- m_pFunctionCell = new ListBoxControl(&GetDataWindow()); m_pFunctionCell->SetDropDownLineCount( 20 );
+ m_pTextCell = new Edit(&GetDataWindow(), 0);
+ // m_pTextCell->EnableSpecialCheck(sal_False);
+ m_pVisibleCell = new CheckBoxControl(&GetDataWindow());
+ m_pTableCell = new ListBoxControl(&GetDataWindow()); m_pTableCell->SetDropDownLineCount( 20 );
+ m_pFieldCell = new ComboBoxControl(&GetDataWindow()); m_pFieldCell->SetDropDownLineCount( 20 );
+ m_pOrderCell = new ListBoxControl(&GetDataWindow());
+ m_pFunctionCell = new ListBoxControl(&GetDataWindow()); m_pFunctionCell->SetDropDownLineCount( 20 );
m_pVisibleCell->SetHelpId(HID_QRYDGN_ROW_VISIBLE);
m_pTableCell->SetHelpId(HID_QRYDGN_ROW_TABLE);
@@ -153,8 +153,8 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
// TriState der ::com::sun::star::form::CheckBox abschalten
m_pVisibleCell->GetBox().EnableTriState( sal_False );
-// m_pEmptyEntry = new OTableFieldDesc();
-// m_pEmptyEntry->SetColWidth(DEFAULT_SIZE);
+// m_pEmptyEntry = new OTableFieldDesc();
+// m_pEmptyEntry->SetColWidth(DEFAULT_SIZE);
Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguage(),DEFAULTFONT_FLAGS_ONLYONE);
aTitleFont.SetSize(Size(0, 6));
@@ -180,7 +180,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
OSelectionBrowseBox::~OSelectionBrowseBox()
{
DBG_DTOR(OSelectionBrowseBox,NULL);
-
+
delete m_pTextCell;
delete m_pVisibleCell;
delete m_pFieldCell;
@@ -208,23 +208,23 @@ void OSelectionBrowseBox::initialize()
,IParseContext::KEY_FUSION
,IParseContext::KEY_INTERSECTION
};
-
+
String sGroup = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount() - 1);
m_aFunctionStrings = m_aFunctionStrings.GetToken(0);
-
+
for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i)
{
m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
m_aFunctionStrings += String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);
-
+
} // for (sal_Int32 i = 0; i < SAL_N_ELEMENTS(eFunctions) ; ++i)
m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
m_aFunctionStrings += sGroup;
-
+
// Diese Funktionen stehen nur unter CORE zur Verfügung
if ( lcl_SupportsCoreSQLGrammar(xConnection) )
{
- xub_StrLen nCount = m_aFunctionStrings.GetTokenCount();
+ xub_StrLen nCount = m_aFunctionStrings.GetTokenCount();
for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++)
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(nIdx));
}
@@ -273,7 +273,7 @@ namespace
public:
OSelectionBrwBoxHeader(OSelectionBrowseBox* pParent);
};
- OSelectionBrwBoxHeader::OSelectionBrwBoxHeader(OSelectionBrowseBox* pParent)
+ OSelectionBrwBoxHeader::OSelectionBrwBoxHeader(OSelectionBrowseBox* pParent)
: ::svt::EditBrowserHeader(pParent,WB_BUTTONSTYLE|WB_DRAG)
,m_pBrowseBox(pParent)
{
@@ -334,7 +334,7 @@ void OSelectionBrowseBox::ColumnMoved( USHORT nColId,BOOL _bCreateUndo )
OTabFieldMovedUndoAct* pUndoAct = new OTabFieldMovedUndoAct(this);
pUndoAct->SetColumnPosition( nOldPos + 1);
pUndoAct->SetTabFieldDescr(pOldEntry);
-
+
getDesignView()->getController().addUndoActionAndInvalidate(pUndoAct);
} // if ( !m_bInUndoMode && _bCreateUndo )
}
@@ -355,8 +355,8 @@ void OSelectionBrowseBox::Init()
SetHeaderBar(pNewHeaderBar);
SetMode(m_nMode);
-
- Font aFont( GetDataWindow().GetFont() );
+
+ Font aFont( GetDataWindow().GetFont() );
aFont.SetWeight( WEIGHT_NORMAL );
GetDataWindow().SetFont( aFont );
@@ -384,9 +384,9 @@ void OSelectionBrowseBox::Init()
{
Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData();
m_nMaxColumns = xMetaData.is() ? xMetaData->getMaxColumnsInSelect() : 0;
-
+
}
- else
+ else
m_nMaxColumns = 0;
}
catch(const SQLException&)
@@ -405,7 +405,7 @@ void OSelectionBrowseBox::PreFill()
if (GetCurRow() != 0)
GoToRow(0);
-
+
static_cast< OQueryController& >( getDesignView()->getController() ).clearFields();
DeactivateCell();
@@ -419,7 +419,7 @@ void OSelectionBrowseBox::ClearAll()
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
SetUpdateMode(sal_False);
-
+
OTableFields::reverse_iterator aIter = getFields().rbegin();
for ( ;aIter != getFields().rend(); ++aIter )
{
@@ -514,7 +514,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
aField.AppendAscii(".*");
}
m_pFieldCell->SetText(aField);
- } break;
+ } break;
case BROW_TABLE_ROW:
{
m_pTableCell->Clear();
@@ -537,7 +537,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
m_pTableCell->SelectEntry(String(ModuleRes(STR_QUERY_NOTABLE)));
}
}
- } break;
+ } break;
case BROW_VIS_ROW:
{
m_pVisibleCell->GetBox().Check(pEntry->IsVisible());
@@ -557,7 +557,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
OQueryDesignView* paDView = getDesignView();
InfoBox(paDView, aMessage).Execute();
}
- } break;
+ } break;
case BROW_ORDER_ROW:
m_pOrderCell->SelectEntryPos(
sal::static_int_cast< USHORT >(pEntry->GetOrderDir()));
@@ -571,7 +571,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
break;
default:
{
- sal_uInt16 nIdx = sal_uInt16(nCellIndex - BROW_CRIT1_ROW);
+ sal_uInt16 nIdx = sal_uInt16(nCellIndex - BROW_CRIT1_ROW);
setTextCellContext(pEntry,pEntry->GetCriteria( nIdx ),HID_QRYDGN_ROW_CRIT);
}
}
@@ -624,7 +624,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const ::rtl::OUString& _sColumnName,
sal_Bool bError = sal_False;
::comphelper::UStringMixEqual bCase(_xMetaData->supportsMixedCaseQuotedIdentifiers());
// check if the table name is the same
- if ( _sTableRange.getLength() && (bCase(_pEntry->GetTable(),_sTableRange) || bCase(_pEntry->GetAlias(),_sTableRange)) )
+ if ( _sTableRange.getLength() && (bCase(_pEntry->GetTable(),_sTableRange) || bCase(_pEntry->GetAlias(),_sTableRange)) )
{ // a table was already inserted and the tables contains that column name
if ( !_pEntry->GetTabWindow() )
@@ -681,7 +681,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
clearEntryFunctionField(_sFieldName,_pEntry,_bListAction,_pEntry->GetColumnId());
return bError;
}
-
+
Reference<XConnection> xConnection( rController.getConnection() );
Reference< XDatabaseMetaData > xMetaData;
if ( xConnection.is() )
@@ -713,7 +713,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
sSql += ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), _sFieldName );
else
sSql += _sFieldName;
-
+
if ( _pEntry->isAggreateFunction() )
{
DBG_ASSERT(_pEntry->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
@@ -752,8 +752,8 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
{
_pEntry->SetField(_sFieldName);
clearEntryFunctionField(_sFieldName,_pEntry,_bListAction,_pEntry->GetColumnId());
- } // travel through the select column parse node
- else
+ } // travel through the select column parse node
+ else
{
::comphelper::UStringMixEqual bCase(xMetaData->supportsMixedCaseQuotedIdentifiers());
@@ -791,7 +791,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
}
::connectivity::OSQLParseNode* pColumnRef = pChild->getChild(0);
- if (
+ if (
pColumnRef->count() == 3 &&
SQL_ISPUNCTUATION(pColumnRef->getChild(0),"(") &&
SQL_ISPUNCTUATION(pColumnRef->getChild(2),")")
@@ -851,24 +851,24 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
}
else
OSL_ENSURE(0,"Unsupported function inserted!");
-
+
}
else
{
// so we first clear the function field
clearEntryFunctionField(_sFieldName,aSelEntry,_bListAction,nColumnId);
::rtl::OUString sFunction;
- pColumnRef->parseNodeToStr( 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);
-
+
if( SQL_ISRULEOR2(pColumnRef,position_exp,extract_exp) ||
SQL_ISRULEOR2(pColumnRef,fold,char_substring_fct) ||
- SQL_ISRULEOR2(pColumnRef,length_exp,char_value_fct) )
+ SQL_ISRULEOR2(pColumnRef,length_exp,char_value_fct) )
// a calculation has been found ( can be calc and function )
{
// now parse the whole statement
@@ -882,7 +882,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
aSelEntry->SetFunctionType(nNewFunctionType);
aSelEntry->SetField(sParameters);
}
- else
+ else
{
aSelEntry->SetFieldAlias(sColumnAlias);
if ( SQL_ISRULE(pColumnRef,set_fct_spec) )
@@ -898,11 +898,11 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
aSelEntry->SetFunctionType(FKT_NUMERIC | FKT_OTHER);
}
}
-
+
aSelEntry->SetAlias(::rtl::OUString());
notifyTableFieldChanged(sOldAlias,aSelEntry->GetAlias(),_bListAction, nColumnId);
}
-
+
}
if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field
{ // the field could not be isnerted
@@ -928,8 +928,8 @@ sal_Bool OSelectionBrowseBox::SaveModified()
pEntry = getEntry(nCurrentColumnPos - 1);
sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False;
- sal_Bool bError = sal_False;
- sal_Bool bListAction = sal_False;
+ sal_Bool bError = sal_False;
+ sal_Bool bListAction = sal_False;
if (pEntry.is() && Controller().Is() && Controller()->IsModified())
{
@@ -943,9 +943,9 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != STATE_NOCHECK;
strOldCellContents = bOldValue ? g_strOne : g_strZero;
- sNewValue = !bOldValue ? g_strOne : g_strZero;
+ sNewValue = !bOldValue ? g_strOne : g_strZero;
}
- if((m_bOrderByUnRelated || pEntry->GetOrderDir() == ORDER_NONE) &&
+ if((m_bOrderByUnRelated || pEntry->GetOrderDir() == ORDER_NONE) &&
(m_bGroupByUnRelated || !pEntry->IsGroupBy()))
{
pEntry->SetVisible(m_pVisibleCell->GetBox().IsChecked());
@@ -968,7 +968,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
pNewEntry->SetColumnId( pEntry->GetColumnId() );
::std::replace(getFields().begin(),getFields().end(),pEntry,pNewEntry);
sal_uInt16 nCol = GetCurColumnId();
- for (int i = 0; i < m_nVisibleCount; i++) // Spalte neu zeichnen
+ for (int i = 0; i < m_nVisibleCount; i++) // Spalte neu zeichnen
RowModified(i,nCol);
}
else
@@ -1021,7 +1021,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if ( m_pTableCell->GetSelectEntryPos() != 0 )
{
pEntry->SetAlias(aAliasName);
- // we have to set the table name as well as the table window
+ // we have to set the table name as well as the table window
OJoinTableView::OTableWindowMap* pTabWinList = getDesignView()->getTableView()->GetTabWinMap();
if (pTabWinList)
{
@@ -1044,8 +1044,8 @@ sal_Bool OSelectionBrowseBox::SaveModified()
pEntry->SetTabWindow(NULL);
}
sNewValue = pEntry->GetAlias();
-
- } break;
+
+ } break;
case BROW_ORDER_ROW:
{
@@ -1061,7 +1061,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId());
}
sNewValue = String::CreateFromInt32((sal_uInt16)pEntry->GetOrderDir());
- } break;
+ } break;
case BROW_COLUMNALIAS_ROW:
strOldCellContents = pEntry->GetFieldAlias();
@@ -1073,14 +1073,14 @@ sal_Bool OSelectionBrowseBox::SaveModified()
strOldCellContents = pEntry->GetFunction();
sal_uInt16 nPos = m_pFunctionCell->GetSelectEntryPos();
// Diese Funktionen stehen nur unter CORE zur Verfügung
- String sFunctionName = m_pFunctionCell->GetEntry(nPos);
- String sGroupFunctionName = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount()-1);
+ String sFunctionName = m_pFunctionCell->GetEntry(nPos);
+ String sGroupFunctionName = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount()-1);
sal_Bool bGroupBy = sal_False;
if ( sGroupFunctionName.Equals(sFunctionName) ) // check if the function name is GROUP
{
bGroupBy = sal_True;
-
- if ( !m_bGroupByUnRelated && !pEntry->IsVisible() )
+
+ if ( !m_bGroupByUnRelated && !pEntry->IsVisible() )
{
// we have to change the visblie flag, so we must append also an undo action
pEntry->SetVisible(sal_True);
@@ -1103,9 +1103,9 @@ sal_Bool OSelectionBrowseBox::SaveModified()
pEntry->SetFunction(String());
pEntry->SetFunctionType(pEntry->GetFunctionType() & ~FKT_AGGREGATE );
}
-
+
pEntry->SetGroupBy(bGroupBy);
-
+
sNewValue = sFunctionName;
}
break;
@@ -1115,7 +1115,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if(!xConnection.is())
break;
- sal_uInt16 nIdx = sal_uInt16(nRow - BROW_CRIT1_ROW);
+ sal_uInt16 nIdx = sal_uInt16(nRow - BROW_CRIT1_ROW);
String aText = m_pTextCell->GetText();
aText.EraseLeadingChars();
@@ -1125,12 +1125,12 @@ sal_Bool OSelectionBrowseBox::SaveModified()
::rtl::OUString aErrorMsg;
Reference<XPropertySet> xColumn;
OSQLParseNode* pParseNode = getDesignView()->getPredicateTreeFromEntry(pEntry,aText,aErrorMsg,xColumn);
-
+
if (pParseNode)
{
pParseNode->parseNodeToPredicateStr(aCrit,
xConnection,
- static_cast<OQueryController&>(getDesignView()->getController()).getNumberFormatter(),
+ static_cast<OQueryController&>(getDesignView()->getController()).getNumberFormatter(),
xColumn,
getDesignView()->getLocale(),
static_cast<sal_Char>(getDesignView()->getDecimalSeparator().toChar()),
@@ -1138,7 +1138,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
delete pParseNode;
}
else
- {
+ {
if(xColumn.is())
{
sal_Int32 nType = 0;
@@ -1161,16 +1161,16 @@ sal_Bool OSelectionBrowseBox::SaveModified()
;
}
::connectivity::OSQLParser& rParser = static_cast<OQueryController&>(getDesignView()->getController()).getParser();
- pParseNode = rParser.predicateTree(aErrorMsg,
- aText,
- static_cast<OQueryController&>(getDesignView()->getController()).getNumberFormatter(),
+ pParseNode = rParser.predicateTree(aErrorMsg,
+ aText,
+ static_cast<OQueryController&>(getDesignView()->getController()).getNumberFormatter(),
xColumn);
if (pParseNode)
{
- pParseNode->parseNodeToPredicateStr(aCrit,
+ pParseNode->parseNodeToPredicateStr(aCrit,
xConnection,
- static_cast<OQueryController&>(getDesignView()->getController()).getNumberFormatter(),
- xColumn,
+ static_cast<OQueryController&>(getDesignView()->getController()).getNumberFormatter(),
+ xColumn,
getDesignView()->getLocale(),
static_cast<sal_Char>(getDesignView()->getDecimalSeparator().toChar()),
&(static_cast<OQueryController&>(getDesignView()->getController()).getParser().getContext()));
@@ -1194,7 +1194,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
bError = sal_True;
}
}
- // }
+ // }
}
strOldCellContents = pEntry->GetCriteria(nIdx);
pEntry->SetCriteria(nIdx, aCrit);
@@ -1219,7 +1219,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
// und noch die Undo-Action fuer das Ganze
appendUndoAction(strOldCellContents,sNewValue,nRow);
-
+
}
}
@@ -1284,7 +1284,7 @@ void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& r
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
Rectangle aRect(rRect);
aRect.TopLeft().Y() -= 2;
- String aLabel(ModuleRes(STR_QUERY_HANDLETEXT));
+ String aLabel(ModuleRes(STR_QUERY_HANDLETEXT));
// ab BROW_CRIT2_ROW werden alle Zeilen mit "oder" angegeben
xub_StrLen nToken = (xub_StrLen) (m_nSeekRow >= GetBrowseRow(BROW_CRIT2_ROW))
@@ -1338,7 +1338,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId )
OSL_ENSURE(getFields().size() > sal_uInt16(nPos-1),"ID is to great!");
OTableFieldDescRef pDesc = getEntry((sal_uInt32)(nPos - 1)) ;
- pDesc->SetColWidth( (sal_uInt16)GetColumnWidth(nColumnId) ); // hat er sich vorher leider nicht gemerkt
+ pDesc->SetColWidth( (sal_uInt16)GetColumnWidth(nColumnId) ); // hat er sich vorher leider nicht gemerkt
// UndoAction erzeugen
if ( !m_bInUndoMode )
@@ -1410,7 +1410,7 @@ void OSelectionBrowseBox::KeyInput( const KeyEvent& rEvt )
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
if (IsColumnSelected(GetCurColumnId()))
{
- if (rEvt.GetKeyCode().GetCode() == KEY_DELETE && // Delete rows
+ if (rEvt.GetKeyCode().GetCode() == KEY_DELETE && // Delete rows
!rEvt.GetKeyCode().IsShift() &&
!rEvt.GetKeyCode().IsMod1())
{
@@ -1427,7 +1427,7 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
sal_Int8 nDropAction = DND_ACTION_NONE;
- if ( rEvt.GetRow() >= -1 )
+ if ( rEvt.GetRow() >= -1 )
{
if ( IsEditing() )
{
@@ -1478,7 +1478,7 @@ OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt)
getFields().push_back(pEmptyEntry);
USHORT nColumnId = sal::static_int_cast< USHORT >(getFields().size());
pEmptyEntry->SetColumnId( nColumnId );
-
+
InsertDataColumn( nColumnId , String(), DEFAULT_SIZE, HIB_STDSTYLE, HEADERBAR_APPEND);
}
@@ -1545,7 +1545,7 @@ Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId )
//////////////////////////////////////////////////////////////////////
// Dann wird die linke Seite angepasst
- Rectangle aFieldRect(GetCellRect( 0, nColId )); // used instead of GetFieldRectPixel
+ Rectangle aFieldRect(GetCellRect( 0, nColId )); // used instead of GetFieldRectPixel
aInvalidRect.Left() = aFieldRect.Left();
return aInvalidRect;
@@ -1567,9 +1567,9 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu
// remember the column id of the current positon
USHORT nColumnId = GetColumnId(_nColumnPostion);
// Wenn zu klein oder zu gross, auf Ende der Liste setzen
- if ((_nColumnPostion == BROWSER_INVALIDID) || (_nColumnPostion >= getFields().size())) // Anhaengen des Feldes
+ if ((_nColumnPostion == BROWSER_INVALIDID) || (_nColumnPostion >= getFields().size())) // Anhaengen des Feldes
{
- if (FindFirstFreeCol(_nColumnPostion) == NULL) // keine freie Column mehr
+ if (FindFirstFreeCol(_nColumnPostion) == NULL) // keine freie Column mehr
{
AppendNewCol(1);
_nColumnPostion = sal::static_int_cast< USHORT >(
@@ -1581,7 +1581,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu
pEntry->SetColumnId( nColumnId );
getFields()[ _nColumnPostion - 1] = pEntry;
}
-
+
// check if the column ids are identical, if not we have to move
if ( pEntry->GetColumnId() != nColumnId )
{
@@ -1731,7 +1731,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
const Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
const ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
//sal_Bool bAppend = sal_False;
-
+
OTableFields& rFields = getFields();
OTableFields::iterator aIter = rFields.begin();
OTableFields::iterator aEnd = rFields.end();
@@ -1740,11 +1740,11 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
pEntry = *aIter;
OSL_ENSURE(pEntry.is(),"OTableFieldDescRef was null!");
- const ::rtl::OUString aField = pEntry->GetField();
- const ::rtl::OUString aAlias = pEntry->GetAlias();
+ const ::rtl::OUString aField = pEntry->GetField();
+ const ::rtl::OUString aAlias = pEntry->GetAlias();
- if (bCase(aField,rInfo->GetField()) &&
- bCase(aAlias,rInfo->GetAlias()) &&
+ if (bCase(aField,rInfo->GetField()) &&
+ bCase(aAlias,rInfo->GetAlias()) &&
pEntry->GetFunctionType() == rInfo->GetFunctionType() &&
pEntry->GetFunction() == rInfo->GetFunction())
{
@@ -1764,7 +1764,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
break;
}
}
-
+
}
}
@@ -1820,20 +1820,20 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
for(;aIter != aEnd;++aIter)
{
OTableFieldDescRef pEntry = *aIter;
- const ::rtl::OUString aField = pEntry->GetField();
- const ::rtl::OUString aAlias = pEntry->GetAlias();
+ const ::rtl::OUString aField = pEntry->GetField();
+ const ::rtl::OUString aAlias = pEntry->GetAlias();
- if (bCase(aField,rInfo->GetField()) &&
- bCase(aAlias,rInfo->GetAlias()) &&
+ if (bCase(aField,rInfo->GetField()) &&
+ bCase(aAlias,rInfo->GetAlias()) &&
pEntry->GetFunctionType() == rInfo->GetFunctionType() &&
- pEntry->GetFunction() == rInfo->GetFunction() &&
+ pEntry->GetFunction() == rInfo->GetFunction() &&
pEntry->IsGroupBy() == rInfo->IsGroupBy() )
{
if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() )
pEntry->SetGroupBy(sal_False);
else
{
-// pEntry->SetGroupBy(rInfo->IsGroupBy());
+// pEntry->SetGroupBy(rInfo->IsGroupBy());
if(!m_bGroupByUnRelated && pEntry->IsGroupBy())
pEntry->SetVisible(sal_True);
}
@@ -1914,10 +1914,10 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
for(;aIter != aEnd;++aIter)
{
pEntry = *aIter;
- ::rtl::OUString aField = pEntry->GetField();
- ::rtl::OUString aAlias = pEntry->GetAlias();
+ ::rtl::OUString aField = pEntry->GetField();
+ ::rtl::OUString aAlias = pEntry->GetAlias();
- if (bCase(aField,rInfo->GetField()) &&
+ if (bCase(aField,rInfo->GetField()) &&
bCase(aAlias,rInfo->GetAlias()))
{
sal_uInt32 nPos = aIter - rFields.begin();
@@ -1972,12 +1972,12 @@ void OSelectionBrowseBox::CellModified()
{
case BROW_VIS_ROW:
{
- OTableFieldDescRef pEntry = getEntry(GetColumnPos(GetCurColumnId()) - 1);
+ OTableFieldDescRef pEntry = getEntry(GetColumnPos(GetCurColumnId()) - 1);
sal_uInt16 nIdx = m_pOrderCell->GetSelectEntryPos();
- if(!m_bOrderByUnRelated && nIdx > 0 &&
- nIdx != sal_uInt16(-1) &&
- !pEntry->IsEmpty() &&
+ if(!m_bOrderByUnRelated && nIdx > 0 &&
+ nIdx != sal_uInt16(-1) &&
+ !pEntry->IsEmpty() &&
pEntry->GetOrderDir() != ORDER_NONE)
{
m_pVisibleCell->GetBox().Check();
@@ -2008,7 +2008,7 @@ 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
+ aReturn.Height() += 40; // just some space
return aReturn;
}
@@ -2025,7 +2025,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
if (!rEvt.IsMouseEvent())
{
- if ( 1 == GetSelectColumnCount() )
+ if ( 1 == GetSelectColumnCount() )
{
sal_uInt16 nSelId = GetColumnId(
sal::static_int_cast< USHORT >(
@@ -2233,7 +2233,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
case BROW_FIELD_ROW:
{
String aField = pEntry->GetField();
- if (aField.GetChar(0) == '*') // * durch alias.* ersetzen
+ if (aField.GetChar(0) == '*') // * durch alias.* ersetzen
{
aField = pEntry->GetAlias();
if(aField.Len())
@@ -2241,7 +2241,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
aField += '*';
}
aText = aField;
- } break;
+ } break;
case BROW_ORDER_ROW:
if (pEntry->GetOrderDir() != ORDER_NONE)
aText = String(ModuleRes(STR_QUERY_SORTTEXT) ).GetToken(sal::static_int_cast< USHORT >(pEntry->GetOrderDir()));
@@ -2339,7 +2339,7 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin
String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, USHORT nColId)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- // DBG_ASSERT(nCellIndex < (GetRowCount()-1),"CellIndex ist zu gross");
+ // DBG_ASSERT(nCellIndex < (GetRowCount()-1),"CellIndex ist zu gross");
if ( GetCurColumnId() == nColId && !m_bInUndoMode )
SaveModified();
@@ -2375,7 +2375,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const S
OTableFieldDescRef pEntry = getEntry(nPos - 1);
DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
-
+
switch (nRow)
{
case BROW_VIS_ROW:
@@ -2391,7 +2391,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const S
{
sal_uInt16 nIdx = (sal_uInt16)strNewText.ToInt32();
pEntry->SetOrderDir(EOrderDir(nIdx));
- } break;
+ } break;
case BROW_COLUMNALIAS_ROW:
pEntry->SetFieldAlias(strNewText);
break;
@@ -2406,8 +2406,8 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const S
pEntry->SetFunctionType(nFunctionType);
if ( pEntry->IsGroupBy() && !sGroupFunctionName.EqualsIgnoreCaseAscii(strNewText) )
pEntry->SetGroupBy(sal_False);
-
-
+
+
if ( sGroupFunctionName.EqualsIgnoreCaseAscii(strNewText) )
pEntry->SetGroupBy(sal_True);
else if ( strNewText.Len() )
@@ -2415,7 +2415,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const S
nFunctionType |= FKT_AGGREGATE;
pEntry->SetFunctionType(nFunctionType);
}
- } break;
+ } break;
default:
pEntry->SetCriteria(sal_uInt16(nRow - BROW_CRIT1_ROW), strNewText);
}
@@ -2632,7 +2632,7 @@ void OSelectionBrowseBox::stopTimer()
{
m_bStopTimer = sal_True;
if (m_timerInvalidate.IsActive())
- m_timerInvalidate.Stop();
+ m_timerInvalidate.Stop();
}
// -----------------------------------------------------------------------------
void OSelectionBrowseBox::startTimer()
@@ -2661,7 +2661,7 @@ void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,c
m_pTextCell->ClearModifyFlag();
if (!m_pTextCell->HasFocus())
m_pTextCell->GrabFocus();
-
+
enableControl(_rEntry,m_pTextCell);
if (m_pTextCell->GetHelpId() != _nHelpId)
@@ -2712,7 +2712,7 @@ void OSelectionBrowseBox::DeactivateCell(sal_Bool _bUpdate)
// -----------------------------------------------------------------------------
::rtl::OUString OSelectionBrowseBox::GetRowDescription( sal_Int32 _nRow ) const
{
- String aLabel(ModuleRes(STR_QUERY_HANDLETEXT));
+ String aLabel(ModuleRes(STR_QUERY_HANDLETEXT));
// ab BROW_CRIT2_ROW werden alle Zeilen mit "oder" angegeben
xub_StrLen nToken = (xub_StrLen) (_nRow >= GetBrowseRow(BROW_CRIT2_ROW))
@@ -2721,7 +2721,7 @@ void OSelectionBrowseBox::DeactivateCell(sal_Bool _bUpdate)
return ::rtl::OUString(aLabel.GetToken(nToken));
}
// -----------------------------------------------------------------------------
-::rtl::OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType _eObjType,sal_Int32 _nPosition) const
+::rtl::OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType _eObjType,sal_Int32 _nPosition) const
{
::rtl::OUString sRetText;
switch( _eObjType )