25#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
26#include <com/sun/star/sdbc/DataType.hpp>
30#include <sqlbison.hxx>
36#include <core_resource.hxx>
47#include <osl/diagnose.h>
55using namespace ::
dbaui;
64#define DEFAULT_QUERY_COLS 20
65#define DEFAULT_SIZE GetTextWidth("0") * 30
67#define HANDLE_COLUMN_WIDTH 70
68#define SORT_COLUMN_NONE 0xFFFFFFFF
72 bool isFieldNameAsterisk(std::u16string_view _sFieldName )
74 bool bAsterisk = _sFieldName.empty() || _sFieldName[0] ==
'*';
78 if ( (nTokenCount == 2 &&
o3tl::getToken(_sFieldName,1,
'.')[0] ==
'*' )
79 || (nTokenCount == 3 &&
o3tl::getToken(_sFieldName,2,
'.')[0] ==
'*' ) )
86 bool lcl_SupportsCoreSQLGrammar(
const Reference< XConnection>& _xConnection)
88 bool bSupportsCoreGrammar =
false;
89 if ( _xConnection.is() )
93 Reference< XDatabaseMetaData > xMetaData = _xConnection->getMetaData();
94 bSupportsCoreGrammar = xMetaData.is() && xMetaData->supportsCoreSQLGrammar();
100 return bSupportsCoreGrammar;
107 ,m_timerInvalidate(
"dbaccess OSelectionBrowseBox m_timerInvalidate")
110 ,m_aFunctionStrings(
DBA_RES(STR_QUERY_FUNCTIONS))
113 ,m_bOrderByUnRelated(true)
114 ,m_bGroupByUnRelated(true)
116 ,m_bWasEditing(false)
117 ,m_bDisableErrorBox(false)
118 ,m_bInUndoMode(false)
122 m_nMode = BrowserMode::COLUMNSELECTION | BrowserMode::HIDESELECT
123 | BrowserMode::KEEPHIGHLIGHT | BrowserMode::HIDECURSOR
124 | BrowserMode::HLINES | BrowserMode::VLINES
125 | BrowserMode::HEADERBAR_NEW ;
148 const OUString aTxt(
DBA_RES(STR_QUERY_SORTTEXT));
149 for (sal_Int32 nIdx {0}; nIdx>=0;)
184 IParseContext::InternationalKeyCode::Avg,IParseContext::InternationalKeyCode::Count,IParseContext::InternationalKeyCode::Max
185 ,IParseContext::InternationalKeyCode::Min,IParseContext::InternationalKeyCode::Sum
186 ,IParseContext::InternationalKeyCode::Every
187 ,IParseContext::InternationalKeyCode::Any
188 ,IParseContext::InternationalKeyCode::Some
189 ,IParseContext::InternationalKeyCode::StdDevPop
190 ,IParseContext::InternationalKeyCode::StdDevSamp
191 ,IParseContext::InternationalKeyCode::VarSamp
192 ,IParseContext::InternationalKeyCode::VarPop
193 ,IParseContext::InternationalKeyCode::Collect
194 ,IParseContext::InternationalKeyCode::Fusion
195 ,IParseContext::InternationalKeyCode::Intersection
209 if ( lcl_SupportsCoreSQLGrammar(xConnection) )
212 for (sal_Int32 nIdx {0}; nIdx>=0;)
224 if ( xMetaData.is() )
240 OSL_ENSURE(
static_cast<const OQueryDesignView*
>(GetParent()),
"Parent isn't an OQueryDesignView!");
246 OSL_ENSURE(
static_cast<const OQueryDesignView*
>(GetParent()),
"Parent isn't an OQueryDesignView!");
256 virtual void Select()
override;
259 virtual ~OSelectionBrwBoxHeader()
override { disposeOnce(); }
262 OSelectionBrwBoxHeader::OSelectionBrwBoxHeader(OSelectionBrowseBox* pParent)
264 ,m_pBrowseBox(pParent)
268 void OSelectionBrwBoxHeader::Select()
270 EditBrowserHeader::Select();
271 m_pBrowseBox->GrabFocus();
274 if ( 0 == m_pBrowseBox->GetSelectColumnCount() )
276 m_pBrowseBox->DeactivateCell();
278 if ( nMode & BrowserMode::HIDESELECT )
281 nMode |= BrowserMode::MULTISELECTION;
282 m_pBrowseBox->SetMode( nMode );
285 m_pBrowseBox->SelectColumnId( GetCurItemId() );
286 m_pBrowseBox->DeactivateCell();
303 sal_uInt16 nOldPos = 0;
304 bool bFoundElem =
false;
305 for (
auto const& field : rFields)
307 if (field->GetColumnId() == nColId)
315 OSL_ENSURE( (nNewPos-1) != nOldPos && nOldPos < rFields.size(),
"Old and new position are equal!");
319 rFields.erase(rFields.begin() + nOldPos);
320 rFields.insert(rFields.begin() + nNewPos - 1,pOldEntry);
326 pUndoAct->SetColumnPosition( nOldPos + 1);
327 pUndoAct->SetTabFieldDescr(pOldEntry);
334 OSL_FAIL(
"Invalid column id!");
344 pNewHeaderBar->SetMouseTransparent(
false);
356 for (
const Control* pControl : pControls)
358 const Size aTemp(pControl->GetOptimalSize());
377 m_nMaxColumns = xMetaData.is() ? xMetaData->getMaxColumnsInSelect() : 0;
383 catch(
const SQLException&)
385 TOOLS_WARN_EXCEPTION(
"dbaccess",
"Caught Exception when asking for database metadata options!");
410 OTableFields::const_reverse_iterator aIter =
getFields().rbegin();
411 for ( ;aIter !=
getFields().rend(); ++aIter )
413 if ( !(*aIter)->IsEmpty() )
433 m_nMode |= BrowserMode::HIDECURSOR;
444 OSL_ENSURE(pEntry.is(),
"OSelectionBrowseBox::GetController : invalid FieldDescription !");
479 OSL_ENSURE(pEntry.is(),
"OSelectionBrowseBox::InitController : invalid FieldDescription !");
490 OUString aField(pEntry->GetField());
491 OUString aTable(pEntry->GetAlias());
498 aField = aTable +
".*";
507 if ( !pEntry->isCondition() )
509 for (
auto const& tabWin :
getDesignView()->getTableView()->GetTabWinMap())
513 if (!pEntry->GetAlias().isEmpty())
529 pEntry->SetVisible();
533 OUString aMessage(
DBA_RES(STR_QRY_ORDERBY_UNRELATED));
536 VclMessageType::Info, VclButtonsType::Ok,
545 sal::static_int_cast< sal_uInt16 >(pEntry->GetOrderDir()));
581 if ( !(isFieldNameAsterisk( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy())) )
584 OUString sFunctionName;
586 OUString sOldLocalizedFunctionName = _pEntry->GetFunction();
587 if ( sOldLocalizedFunctionName != sFunctionName || _pEntry->IsGroupBy() )
591 _pEntry->SetFunction(OUString());
592 _pEntry->SetGroupBy(
false);
599 OSL_ENSURE(_pColumnRef,
"No valid parsenode!");
600 OUString sColumnName,sTableRange;
602 return fillColumnRef(sColumnName,sTableRange,_rxConnection->getMetaData(),_pEntry,_bListAction);
610 if ( !_sTableRange.empty() && (bCase(_pEntry->GetTable(),_sTableRange) || bCase(_pEntry->GetAlias(),_sTableRange)) )
613 if ( !_pEntry->GetTabWindow() )
615 OUString sOldAlias = _pEntry->GetAlias();
618 if ( !bCase(sOldAlias,_pEntry->GetAlias()) )
623 OQueryTableWindow* pEntryTab =
static_cast<OQueryTableWindow*
>(_pEntry->GetTabWindow());
626 sal_uInt16 nTabCount = 0;
627 if ( !
static_cast<OQueryTableView*
>(
getDesignView()->getTableView())->FindTableFromField(_sColumnName,_pEntry,nTabCount) )
629 OUString sErrorMsg(
DBA_RES(RID_STR_FIELD_DOESNT_EXIST));
630 sErrorMsg = sErrorMsg.replaceFirst(
"$name$",_sColumnName);
637 pEntryTab =
static_cast<OQueryTableWindow*
>(_pEntry->GetTabWindow());
642 _pEntry->SetField(_sColumnName);
654 sal_uInt16 nTabCount = 0;
655 OUString sOldAlias = _pEntry->GetAlias();
659 _pEntry->SetField(_sFieldName);
667 if ( xConnection.is() )
668 xMetaData = xConnection->getMetaData();
669 OSL_ENSURE( xMetaData.is(),
"OSelectionBrowseBox::saveField: invalid connection/meta data!" );
670 if ( !xMetaData.is() )
677 const OUString sFieldAlias = _pEntry->GetFieldAlias();
682 std::unique_ptr<OSQLParseNode> pParseNode = rParser.
parseTree( devnull, _sFieldName,
true );
683 if (pParseNode ==
nullptr)
684 pParseNode = rParser.
parseTree( devnull, _sFieldName );
685 if (pParseNode !=
nullptr &&
SQL_ISRULE(pParseNode, select_statement))
686 _sFieldName =
"(" + _sFieldName +
")";
689 std::unique_ptr<OSQLParseNode> pParseNode;
697 OUString sQuotedFullFieldName(::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), _sFieldName ));
698 OUString sFullFieldName(_sFieldName);
700 if ( _pEntry->isAggregateFunction() )
702 OSL_ENSURE(!_pEntry->GetFunction().isEmpty(),
"No empty Function name allowed here! ;-(");
703 sQuotedFullFieldName = _pEntry->GetFunction() +
"(" + sQuotedFullFieldName +
")";
704 sFullFieldName = _pEntry->GetFunction() +
"(" + sFullFieldName +
")";
709 bool bQuote = ( nPass <= 2 );
710 bool bInternational = ( nPass % 2 ) == 0;
712 OUString sSql {
"SELECT "};
714 sSql += sQuotedFullFieldName;
716 sSql += sFullFieldName;
718 if ( !sFieldAlias.isEmpty() )
720 sSql +=
" " + ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), sFieldAlias );
724 pParseNode = rParser.
parseTree( sErrorMsg, sSql, bInternational );
726 while ( ( pParseNode ==
nullptr ) && ( --nPass > 0 ) );
729 if ( pParseNode ==
nullptr )
732 OUString sErrorMessage(
DBA_RES( STR_QRY_COLUMN_NOT_FOUND ) );
733 sErrorMessage = sErrorMessage.replaceFirst(
"$name$",_sFieldName);
745 _pEntry->SetField(_sFieldName);
751 sal_uInt16 nColumnId = aSelEntry->GetColumnId();
758 sal_uInt16 nColumnPosition;
760 if ( !aSelEntry.is() )
770 OSL_ENSURE(
SQL_ISRULE(pChild,derived_column),
"No derived column found!");
773 if ( !sColumnAlias.isEmpty() )
775 OUString aSelectionAlias = aSelEntry->GetFieldAlias();
776 aSelEntry->SetFieldAlias( sColumnAlias );
786 pColumnRef->
count() == 3 &&
790 pColumnRef = pColumnRef->
getChild(1);
795 bError =
fillColumnRef( pColumnRef, xConnection, aSelEntry, _bListAction );
802 else if (
SQL_ISRULE(pColumnRef,general_set_fct) )
804 OUString sLocalizedFunctionName;
807 OUString sOldLocalizedFunctionName = aSelEntry->GetFunction();
808 aSelEntry->SetFunction(sLocalizedFunctionName);
809 sal_uInt32 nFunCount = pColumnRef->
count() - 1;
815 else if ( nFunCount == 3 )
816 bError =
fillColumnRef(
"*", std::u16string_view(), xMetaData, aSelEntry, _bListAction );
821 aSelEntry->SetDataType(DataType::DOUBLE);
826 OUString sParameters;
827 for(sal_uInt32 function = 2; function < nFunCount; ++function)
830 aSelEntry->SetFunctionType(nFunctionType);
831 aSelEntry->SetField(sParameters);
832 if ( aSelEntry->IsGroupBy() )
835 aSelEntry->SetGroupBy(
false);
842 OSL_FAIL(
"Unsupported function inserted!");
857 if(
SQL_ISRULEOR3(pColumnRef, position_exp, extract_exp, fold) ||
858 SQL_ISRULEOR3(pColumnRef, char_substring_fct, length_exp, char_value_fct) )
862 sal_uInt32 nFunCount = pColumnRef->
count();
863 OUString sParameters;
864 for(sal_uInt32 function = 0; function < nFunCount; ++function)
867 sOldAlias = aSelEntry->GetAlias();
869 aSelEntry->SetFunctionType(nNewFunctionType);
870 aSelEntry->SetField(sParameters);
874 aSelEntry->SetFieldAlias(sColumnAlias);
881 aSelEntry->SetAlias(OUString());
887 OUString sErrorMessage(
DBA_RES( RID_STR_FIELD_DOESNT_EXIST ) );
888 sErrorMessage = sErrorMessage.replaceFirst(
"$name$",aSelEntry->GetField());
905 pEntry =
getEntry(nCurrentColumnPos - 1);
907 bool bWasEmpty = pEntry.is() && pEntry->IsEmpty();
909 bool bListAction =
false;
914 OUString strOldCellContents,sNewValue;
916 bool bAppendRow =
false;
923 = bOldValue ? std::u16string_view(
u"1") : std::u16string_view(
u"0");
925 = !bOldValue ? std::u16string_view(
u"1") : std::u16string_view(
u"0");
934 pEntry->SetVisible();
945 if (aFieldName.isEmpty())
948 pNewEntry->SetColumnId( pEntry->GetColumnId() );
956 strOldCellContents = pEntry->GetField();
962 OUString aAliasName = pEntry->GetAlias();
963 if (
nPos != -1 && aAliasName.isEmpty() && aFieldName.indexOf(
'.') >= 0 )
965 OUString sTableAlias = aFieldName.getToken(0,
'.');
966 pEntry->SetAlias(sTableAlias);
967 OUString sColumnName = aFieldName.copy(sTableAlias.getLength()+1);
969 if ( !xConnection.is() )
971 bError =
fillColumnRef( sColumnName, sTableAlias, xConnection->getMetaData(), pEntry, bListAction );
977 bError =
saveField(aFieldName,pEntry,bListAction);
986 sNewValue = aFieldName;
992 sNewValue = pEntry->GetField();
1001 strOldCellContents = pEntry->GetAlias();
1004 pEntry->SetAlias(aAliasName);
1007 OJoinTableView::OTableWindowMap::const_iterator aIter = rTabWinList.find(aAliasName);
1008 if(aIter != rTabWinList.end())
1014 pEntry->SetTabWindow(pEntryTab);
1020 pEntry->SetAlias(OUString());
1021 pEntry->SetTable(OUString());
1022 pEntry->SetTabWindow(
nullptr);
1024 sNewValue = pEntry->GetAlias();
1030 strOldCellContents = OUString::number(
static_cast<sal_uInt16
>(pEntry->GetOrderDir()));
1038 pEntry->SetVisible();
1042 sNewValue = OUString::number(
static_cast<sal_uInt16
>(pEntry->GetOrderDir()));
1046 strOldCellContents = pEntry->GetFieldAlias();
1047 pEntry->SetFieldAlias(
m_pTextCell->get_widget().get_text());
1048 sNewValue = pEntry->GetFieldAlias();
1052 strOldCellContents = pEntry->GetFunction();
1058 bool bGroupBy =
false;
1059 if ( sGroupFunctionName == sFunctionName )
1066 pEntry->SetVisible();
1072 pEntry->SetFunction(OUString());
1073 pEntry->SetFunctionType(pEntry->GetFunctionType() & ~
FKT_AGGREGATE );
1077 pEntry->SetFunctionType(pEntry->GetFunctionType() |
FKT_AGGREGATE );
1078 pEntry->SetFunction(sFunctionName);
1082 sFunctionName.clear();
1083 pEntry->SetFunction(OUString());
1084 pEntry->SetFunctionType(pEntry->GetFunctionType() & ~
FKT_AGGREGATE );
1087 pEntry->SetGroupBy(bGroupBy);
1089 sNewValue = sFunctionName;
1095 if(!xConnection.is())
1102 if(!aText.isEmpty())
1110 pParseNode->parseNodeToPredicateStr(aCrit,
1123 sal_Int32
nType = 0;
1127 case DataType::CHAR:
1128 case DataType::VARCHAR:
1129 case DataType::LONGVARCHAR:
1130 case DataType::CLOB:
1131 if(!aText.startsWith(
"'") || !aText.endsWith(
"'"))
1133 aText = aText.replaceAll(
"'",
"''");
1134 aText =
"'" + aText +
"'";
1147 pParseNode->parseNodeToPredicateStr(aCrit,
1177 strOldCellContents = pEntry->GetCriteria(nIdx);
1178 pEntry->SetCriteria(nIdx, aCrit);
1179 sNewValue = pEntry->GetCriteria(nIdx);
1205 if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError )
1208 pEntry->SetVisible();
1220 return pEntry !=
nullptr && !bError;
1268 OSL_ENSURE((
nPos == 0) || (
nPos <=
getFields().
size()),
"OSelectionBrowseBox::RemoveColumn : invalid parameter nColId");
1278 pEntry->SetColumnId(_nColumnId);
1286 Invalidate( aInvalidRect );
1290 rController.setModified(
true );
1303 pDesc->SetColWidth(
static_cast<sal_uInt16
>(
GetColumnWidth(nColumnId)) );
1309 pUndoAction->SetTabFieldDescr(pDesc);
1310 pUndoAction->SetColumnPosition(
nPos);
1322 if ( _bClickedOntoHeader )
1326 if ( BrowserMode::HIDESELECT == (
m_nMode & BrowserMode::HIDESELECT ) )
1329 m_nMode |= BrowserMode::MULTISELECTION;
1333 else if ( BrowserMode::HIDESELECT != (
m_nMode & BrowserMode::HIDESELECT ) )
1338 if ( _bClickedOntoHandleCol )
1340 m_nMode |= BrowserMode::HIDESELECT;
1352 bool bOnHeader = ( rEvt.
GetRow() < 0 ) && !bOnHandle;
1382 if ( rEvt.
GetRow() >= -1 )
1406 OSL_FAIL(
"OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
1421 for (sal_uInt16
i=0 ;
i<nCnt ;
i++)
1425 sal_uInt16 nColumnId = sal::static_int_cast< sal_uInt16 >(
getFields().
size());
1426 pEmptyEntry->SetColumnId( nColumnId );
1447 [&rAliasName](
const OTableFieldDescRef pEntry) {
return pEntry->GetAlias() == rAliasName; });
1450 sal_uInt16
nPos = sal::static_int_cast<sal_uInt16>(std::distance(aIter,
getFields().rend()));
1485 return aInvalidRect;
1500 sal_uInt16 nColumnId =
GetColumnId(_nColumnPosition);
1507 _nColumnPosition = sal::static_int_cast< sal_uInt16 >(
1513 pEntry->SetColumnId( nColumnId );
1514 getFields()[ _nColumnPosition - 1] = pEntry;
1518 if ( pEntry->GetColumnId() != nColumnId )
1520 sal_uInt16 nOldPosition =
GetColumnPos(pEntry->GetColumnId());
1521 OSL_ENSURE( nOldPosition != 0,
"Old position was 0. Not possible!");
1524 if ( nOldPosition > 0 && nOldPosition <=
getFields().
size() )
1532 OUString sFunctionName = pEntry->GetFunction();
1534 pEntry->SetFunction(sFunctionName);
1537 nColumnId = pEntry->GetColumnId();
1542 Invalidate( aInvalidRect );
1559 sal_uInt32 nFieldIndex = jxdSource.
nEntry;
1564 aInfo->SetTabWindow(pSourceWin);
1565 aInfo->SetFieldIndex(nFieldIndex);
1570 aInfo->SetVisible();
1585 pEntry->SetVisible(bVis);
1594 pUndoAction->SetTabFieldDescr( pEntry );
1595 pUndoAction->SetColumnPosition(_nColumnPosition);
1607 if (field.is() && !field->IsEmpty())
1623 if ( pEntry.is() && pEntry->IsEmpty() )
1643 if(!xConnection.is())
1645 OSL_ENSURE(!rInfo->IsEmpty(),
"AddGroupBy:: OTableFieldDescRef should not be empty!");
1648 const ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
1651 bool bAllFieldsSearched =
true;
1655 OSL_ENSURE(pEntry.is(),
"OTableFieldDescRef was null!");
1657 const OUString aField = pEntry->GetField();
1658 const OUString aAlias = pEntry->GetAlias();
1660 if (bCase(aField,rInfo->GetField()) &&
1661 bCase(aAlias,rInfo->GetAlias()) &&
1662 pEntry->GetFunctionType() == rInfo->GetFunctionType() &&
1663 pEntry->GetFunction() == rInfo->GetFunction())
1665 if ( pEntry->isNumericOrAggregateFunction() && rInfo->IsGroupBy() )
1667 pEntry->SetGroupBy(
false);
1674 if ( !pEntry->IsGroupBy() && !pEntry->HasCriteria() )
1676 pEntry->SetGroupBy(rInfo->IsGroupBy());
1678 pEntry->SetVisible();
1679 bAllFieldsSearched =
false;
1687 if (bAllFieldsSearched)
1690 if ( pTmp->isNumericOrAggregateFunction() && rInfo->IsGroupBy() )
1691 pTmp->SetGroupBy(
false);
1697 const sal_uInt16 nNewLevel = nLevel +1;
1701 OUString sValue = pEntry->GetCriteria(nLevel);
1702 if ( !sValue.isEmpty() )
1704 pEntry->SetCriteria( nNewLevel, sValue);
1719 if(!xConnection.is())
1721 OSL_ENSURE(rInfo.is() && !rInfo->IsEmpty(),
"AddCondition:: OTableFieldDescRef should not be Empty!");
1727 bool bAllFieldsSearched =
true;
1731 const OUString aField = pEntry->GetField();
1732 const OUString aAlias = pEntry->GetAlias();
1734 if (bCase(aField,rInfo->GetField()) &&
1735 bCase(aAlias,rInfo->GetAlias()) &&
1736 pEntry->GetFunctionType() == rInfo->GetFunctionType() &&
1737 pEntry->GetFunction() == rInfo->GetFunction() &&
1738 pEntry->IsGroupBy() == rInfo->IsGroupBy() )
1740 if ( pEntry->isNumericOrAggregateFunction() && rInfo->IsGroupBy() )
1741 pEntry->SetGroupBy(
false);
1745 pEntry->SetVisible();
1747 if (pEntry->GetCriteria(nLevel).isEmpty() )
1749 pEntry->SetCriteria( nLevel, rValue);
1757 bAllFieldsSearched =
false;
1760 if ( _bAddOrOnOneLine )
1762 pLastEntry = pEntry;
1766 if ( pLastEntry.is() )
1768 OUString sCriteria = rValue;
1769 OUString sOldCriteria = pLastEntry->GetCriteria( nLevel );
1770 if ( !sOldCriteria.isEmpty() )
1772 sCriteria =
"( " + sOldCriteria +
" OR " + rValue +
" )";
1774 pLastEntry->SetCriteria( nLevel, sCriteria);
1783 else if (bAllFieldsSearched)
1786 if ( pTmp->isNumericOrAggregateFunction() && rInfo->IsGroupBy() )
1787 pTmp->SetGroupBy(
false);
1790 pTmp->SetCriteria( nLevel, rValue);
1803 if (_nCurrentPos == 0)
1807 if(!xConnection.is())
1809 OSL_ENSURE(!rInfo->IsEmpty(),
"AddOrder:: OTableFieldDescRef should not be Empty!");
1814 bool bAppend =
false;
1815 sal_uInt32
nPos = 0;
1816 bool bAllFieldsSearched =
true;
1820 OUString aField = pEntry->GetField();
1821 OUString aAlias = pEntry->GetAlias();
1823 if (bCase(aField,rInfo->GetField()) &&
1824 bCase(aAlias,rInfo->GetAlias()))
1836 pEntry->SetVisible();
1837 pEntry->SetOrderDir( eDir );
1840 bAllFieldsSearched =
false;
1846 if (bAllFieldsSearched)
1854 pTmp->SetOrderDir( eDir );
1880 !pEntry->IsEmpty() &&
1884 pEntry->SetVisible();
1896 OSL_ENSURE(
ColCount() >= 1,
"OSelectionBrowseBox::Fill : please call only after inserting the handle column !");
1898 sal_uInt16 nColCount =
ColCount() - 1;
1917 case CommandEventId::ContextMenu:
1926 sal::static_int_cast< sal_uInt16 >(
1955 std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(
"menu"));
1956 OUString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
1957 if (sIdent ==
"delete")
1959 else if (sIdent ==
"width")
1963 else if(nRow >= 0 && nColId <=
HANDLE_ID)
1970 std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(
"menu"));
1976 OUString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
1977 if (sIdent ==
"functions")
1982 else if (sIdent ==
"tablename")
1987 else if (sIdent ==
"alias")
1992 else if (sIdent ==
"distinct")
2017 OSL_ENSURE(_nWhich<(
m_bVisibleRow.size()),
"OSelectionBrowseBox::IsRowVisible : invalid parameter !");
2023 OSL_ENSURE(_nWhich<
m_bVisibleRow.size(),
"OSelectionBrowseBox::SetRowVisible : invalid parameter !");
2051 for(sal_Int32
i = 0 ;
i < nRowId ; ++
i)
2092 for(std::size_t
i=0;
i<nSize;
i++)
2104 for(std::size_t
i=0;
i< nSize;
i++)
2116 OSL_ENSURE(pEntry !=
nullptr,
"OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
2117 if ( pEntry->IsEmpty() )
2124 aText = pEntry->GetAlias();
2128 OUString aField = pEntry->GetField();
2129 if (!aField.isEmpty() && aField[0] ==
'*')
2131 aField = pEntry->GetAlias();
2132 if(!aField.isEmpty())
2140 aText =
DBA_RES(STR_QUERY_SORTTEXT).getToken(sal::static_int_cast< sal_uInt16 >(pEntry->GetOrderDir()),
';');
2145 aText = pEntry->GetFieldAlias();
2149 if ( pEntry->IsGroupBy() )
2151 else if ( pEntry->isNumericOrAggregateFunction() )
2152 aText = pEntry->GetFunction();
2163 switch(_nFunctionTokenId)
2165 case SQL_TOKEN_COUNT:
2180 case SQL_TOKEN_EVERY:
2186 case SQL_TOKEN_SOME:
2189 case SQL_TOKEN_STDDEV_POP:
2192 case SQL_TOKEN_STDDEV_SAMP:
2195 case SQL_TOKEN_VAR_SAMP:
2198 case SQL_TOKEN_VAR_POP:
2201 case SQL_TOKEN_COLLECT:
2204 case SQL_TOKEN_FUSION:
2207 case SQL_TOKEN_INTERSECTION:
2213 for (sal_Int32 nIdx {0}; nIdx<nStopIdx;)
2216 if (rFkt.equalsIgnoreAsciiCase(sFunc))
2236 OSL_ENSURE(pEntry !=
nullptr,
"OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... ");
2241 return OUString(pEntry->IsVisible() ? std::u16string_view(
u"1") : std::u16string_view(
u"0"));
2244 sal_Int32 nIdx =
m_pOrderCell->get_widget().get_active();
2247 return OUString::number(nIdx);
2262 OSL_ENSURE(pEntry !=
nullptr,
"OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
2267 pEntry->SetVisible(strNewText ==
"1");
2270 pEntry->SetField(strNewText);
2273 pEntry->SetAlias(strNewText);
2277 sal_uInt16 nIdx =
static_cast<sal_uInt16
>(strNewText.toInt32());
2281 pEntry->SetFieldAlias(strNewText);
2286 pEntry->SetFunction(strNewText);
2288 sal_Int32 nFunctionType = pEntry->GetFunctionType();
2289 nFunctionType &= ~FKT_AGGREGATE;
2290 pEntry->SetFunctionType(nFunctionType);
2292 pEntry->SetGroupBy(
false);
2295 pEntry->SetGroupBy(
true);
2296 else if ( !strNewText.isEmpty() )
2299 pEntry->SetFunctionType(nFunctionType);
2303 pEntry->SetCriteria(sal_uInt16(nRow -
BROW_CRIT1_ROW), strNewText);
2311 if (pEntry->IsEmpty())
2312 pEntry->SetVisible(
false);
2329 OSL_ENSURE(
nPos <=
getFields().
size(),
"ColumnResized:: nColId should not be greater than List::count!");
2331 OSL_ENSURE(pEntry.is(),
"OSelectionBrowseBox::ColumnResized : invalid FieldDescription !");
2341 pUndo->SetColumnPosition(
nPos );
2342 pUndo->SetOriginalWidth(pEntry->GetColWidth());
2352 OSL_ENSURE((
nPos == 0) || (
nPos <=
getFields().
size()),
"OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
2355 OSL_ENSURE(pEntry.is(),
"OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
2364 bool bCutAllowed =
false;
2376 int nStartPos, nEndPos;
2383 int nStartPos, nEndPos;
2438 bool bPasteAllowed =
true;
2446 bPasteAllowed =
false;
2449 return bPasteAllowed;
2481 if ( !_bListAction )
2483 _bListAction =
true;
2495 pUndoAct->SetCellIndex(_nRow);
2498 pUndoAct->SetCellContents(_rOldValue);
2505 static_cast<OQueryController&
>(getDesignView()->getController()).InvalidateFeature(SID_CUT);
2506 static_cast<OQueryController&
>(getDesignView()->getController()).InvalidateFeature(SID_COPY);
2507 static_cast<OQueryController&
>(getDesignView()->getController()).InvalidateFeature(SID_PASTE);
2509 m_timerInvalidate.Start();
2534 bool bEnable = !_rEntry->isCondition();
2535 _pControl->
Enable(bEnable);
2567 OSL_ENSURE(aFields.size() >
_nPos,
"ColID is to great!");
2570 OSL_ENSURE(pEntry.is(),
"Invalid entry!");
2574 pEntry->SetColumnId(
2576 aFields[
_nPos] = pEntry;
2610 case AccessibleBrowseBoxObjType::RowHeaderCell:
2623 OJoinTableView::OTableWindowMap::const_iterator aIter = rTabWinList.find(_sTableName);
2624 if(aIter != rTabWinList.end())
2630 _pEntry->SetTabWindow(pEntryTab);
2640 if ( !xConnection.is() )
2644 if ( lcl_SupportsCoreSQLGrammar(xConnection) )
2651 if ( isFieldNameAsterisk(_pEntry->GetField()) )
2655 const bool bSkipLastToken {_pEntry->isNumeric()};
2659 if (bSkipLastToken && nIdx<0)
2665 if ( _pEntry->IsGroupBy() )
2667 OSL_ENSURE(!_pEntry->isNumeric(),
"Not allowed to combine group by and numeric values!");
2670 else if (rComboBox.
find_text(_pEntry->GetFunction()) != -1)
2680 bool bCountRemoved = !isFieldNameAsterisk(_pEntry->GetField());
2682 if ( bCountRemoved )
2685 if ( !bCountRemoved && rComboBox.
get_count() < 2)
2688 if (rComboBox.
find_text(_pEntry->GetFunction()) != -1)
2711 if ( field->GetFieldAlias() == rFieldName )
AccessibleBrowseBoxObjType
#define DEFAULT_QUERY_COLS
#define HANDLE_COLUMN_WIDTH
const tools::Long nVisibleRowMask[]
#define BROW_COLUMNALIAS_ROW
#define BROW_FUNCTION_ROW
#define ID_BROWSER_QUERY_EXECUTE
#define BROWSER_INVALIDID
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
void RowRemoved(sal_Int32 nRow, sal_Int32 nNumRows=1, bool bDoPaint=true)
tools::Long GetDataRowHeight() const
sal_uInt16 GetColumnId(sal_uInt16 nPos) const
void SetUpdateMode(bool bUpdate)
virtual void Command(const CommandEvent &rEvt) override
BrowserDataWin & GetDataWindow() const
void InsertDataColumn(sal_uInt16 nItemId, const OUString &rText, tools::Long nSize, HeaderBarItemBits nBits=HeaderBarItemBits::STDSTYLE, sal_uInt16 nPos=HEADERBAR_APPEND)
tools::Long GetTitleHeight() const
sal_Int32 FirstSelectedColumn() const
void SetTitleFont(const vcl::Font &rNewFont)
bool GoToRow(sal_Int32 nRow)
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 nRow, sal_uInt16 nColumnPos) override
sal_Int32 GetCurRow() const
sal_uInt16 GetSelectColumnCount() const
void SetColumnPos(sal_uInt16 nColumnId, sal_uInt16 nPos)
sal_Int32 GetRowAtYPosPixel(tools::Long nY, bool bRelToBrowser=true) const
sal_uInt16 ColCount() const
void InsertHandleColumn(sal_uLong nWidth)
void RowModified(sal_Int32 nRow, sal_uInt16 nColId=BROWSER_INVALIDID)
void SetMode(BrowserMode nMode)
void SetColumnWidth(sal_uInt16 nColumnId, sal_uLong nWidth)
sal_uInt16 GetColumnPos(sal_uInt16 nColumnId) const
void RemoveColumn(sal_uInt16 nColumnId)
void SelectColumnId(sal_uInt16 nColId)
const DataFlavorExVector & GetDataFlavors() const
virtual OUString GetAccessibleObjectDescription(AccessibleBrowseBoxObjType eObjType, sal_Int32 _nPosition=-1) const override
sal_uInt16 GetCurColumnId() const
tools::Rectangle GetFieldRectPixel(sal_Int32 nRow, sal_uInt16 nColId, bool bRelToBrowser=true) const
const vcl::Font & GetFont() const
void SetDataRowHeight(tools::Long nPixel)
void RowInserted(sal_Int32 nRow, sal_Int32 nNumRows=1, bool bDoPaint=true, bool bKeepSelection=false)
sal_uInt16 GetColumnAtXPosPixel(tools::Long nX) const
virtual sal_Int32 GetRowCount() const override
virtual void SetNoSelection() override
void SetTitleLines(sal_uInt16 nLines)
bool IsColumnSelected(sal_uInt16 nColumnId) const
sal_uLong GetColumnWidth(sal_uInt16 nColumnId) const
void SetHeaderBar(BrowserHeader *)
sal_uInt16 GetColumnId() const
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
bool IsMouseEvent() const
const vcl::KeyCode & GetKeyCode() const
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
constexpr tools::Long X() const
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
const DataFlavorExVector & GetDataFlavorExVector() const
static VclPtr< reference_type > Create(Arg &&... arg)
virtual OString getIntlKeywordAscii(InternationalKeyCode _eKey) const=0
void parseNodeToStr(OUString &rString, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const IParseContext *pContext=nullptr, bool _bIntl=false, bool _bQuote=true) const
sal_uInt32 getTokenID() const
Rule getKnownRuleID() const
OSQLParseNode * getChild(sal_uInt32 nPos) const
static OUString getColumnAlias(const OSQLParseNode *_pDerivedColumn)
void getColumnRange(const OSQLParseNode *_pColumnRef, OUString &_rColumnName, OUString &_rTableRange) const
std::unique_ptr< OSQLParseNode > predicateTree(OUString &rErrorMessage, const OUString &rStatement, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const css::uno::Reference< css::beans::XPropertySet > &xField, bool bUseRealName=true)
std::unique_ptr< OSQLParseNode > parseTree(OUString &rErrorMessage, const OUString &rStatement, bool bInternational=false)
const IParseContext & getContext() const
OJoinTableView * getTableView() const
OJoinController & getController() const
static bool isFormatAvailable(const DataFlavorExVector &_rFormats, SotClipboardFormatId _nSlotID=SotClipboardFormatId::SBA_JOIN)
static OJoinExchangeData GetSourceDescription(const css::uno::Reference< css::datatransfer::XTransferable > &_rxObject)
std::map< OUString, VclPtr< OTableWindow > > OTableWindowMap
OTableWindowMap & GetTabWinMap()
::connectivity::OSQLParser & getParser()
OTableFields & getTableFieldDesc()
void fillFunctionInfo(const ::connectivity::OSQLParseNode *pNode, const OUString &sFunctionTerm, OTableFieldDescRef &aInfo)
const OUString & getDecimalSeparator() const
std::unique_ptr<::connectivity::OSQLParseNode > getPredicateTreeFromEntry(const OTableFieldDescRef &pEntry, const OUString &_sCriteria, OUString &_rsErrorMessage, css::uno::Reference< css::beans::XPropertySet > &_rxColumn) const
const css::lang::Locale & getLocale() const
void fillValidFields(std::u16string_view strTableName, weld::ComboBox &rFieldList)
bool FindTableFromField(const OUString &rFieldName, OTableFieldDescRef const &rInfo, sal_uInt16 &rCnt)
OUString const & GetAliasName() const
bool saveField(OUString &_sFieldName, OTableFieldDescRef const &_pEntry, bool &_bListAction)
save the field change in save modified
sal_Int32 GetBrowseRow(sal_Int32 nRowId) const
tools::Rectangle GetInvalidRect(sal_uInt16 nColId)
void SetColWidth(sal_uInt16 nColId, tools::Long lNewWidth)
virtual VclPtr< BrowserHeader > imp_CreateHeaderBar(BrowseBox *pParent) override
OTableFieldDescRef InsertField(const OJoinExchangeData &jxdSource)
sal_Int32 GetNoneVisibleRows() const
virtual ::svt::CellController * GetController(sal_Int32 nRow, sal_uInt16 nCol) override
virtual void CellModified() override
void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const OUString &strNewText)
void RemoveColumn(sal_uInt16 _nColumnId)
OTableFieldDescRef FindFirstFreeCol(sal_uInt16 &_rColumnPosition)
virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const override
GetCellText returns the text at the given position.
void AddCondition(const OTableFieldDescRef &rInfo, const OUString &rValue, const sal_uInt16 nLevel, bool _bAddOrOnOneLine)
void AddGroupBy(const OTableFieldDescRef &rInfo)
virtual OUString GetAccessibleObjectName(AccessibleBrowseBoxObjType eObjType, sal_Int32 _nPosition=-1) const override
return the name of the specified object.
OQueryDesignView * getDesignView()
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override
void DuplicateConditionLevel(const sal_uInt16 nLevel)
void CheckFreeColumns(sal_uInt16 &_rColumnPosition)
bool fillColumnRef(const ::connectivity::OSQLParseNode *_pColumnRef, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, OTableFieldDescRef const &_pEntry, bool &_bListAction)
uses the parse node to fill all information into the field
virtual void Command(const CommandEvent &rEvt) override
bool isCutAllowed() const
VclPtr< ::svt::CheckBoxControl > m_pVisibleCell
bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString &rFkt)
void DeleteFields(const OUString &rAliasName)
void SetReadOnly(bool bRO)
void appendUndoAction(const OUString &_rOldValue, std::u16string_view _rNewValue, sal_Int32 _nRow, bool &_bListAction)
virtual void KeyInput(const KeyEvent &rEvt) override
OTableFields & getFields() const
virtual void GetFocus() override
void InsertColumn(const OTableFieldDescRef &pEntry, sal_uInt16 &_nColumnPosition)
bool isCopyAllowed() const
virtual void ColumnResized(sal_uInt16 nColId) override
void setFunctionCell(OTableFieldDescRef const &_pEntry)
remove or insert the necessary function types
sal_uInt16 m_nVisibleCount
VclPtr< ::svt::ListBoxControl > m_pTableCell
virtual bool SeekRow(sal_Int32 nRow) override
OUString m_aFunctionStrings
VclPtr< ::svt::ComboBoxControl > m_pFieldCell
bool HasFieldByAliasName(std::u16string_view rFieldName, OTableFieldDescRef const &rInfo) const
static void enableControl(const OTableFieldDescRef &_rEntry, Window *_pControl)
void setTextCellContext(const OTableFieldDescRef &_rEntry, const OUString &_sText, const OUString &_sHelpId)
virtual void MouseButtonUp(const BrowserMouseEvent &rEvt) override
virtual sal_Int8 AcceptDrop(const BrowserAcceptDropEvent &rEvt) override
virtual void dispose() override
virtual void PaintStatusCell(OutputDevice &rDev, const tools::Rectangle &rRect) const override
OUString GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId)
void notifyTableFieldChanged(const OUString &_sOldAlias, std::u16string_view _sAlias, bool &_bListAction, sal_uInt16 _nColumnId)
append an undo action for the table field
void SetNoneVisibleRow(sal_Int32 nRows)
VclPtr< ::svt::ListBoxControl > m_pFunctionCell
OTableFieldDescRef const & AppendNewCol(sal_uInt16 nCnt=1)
std::vector< bool > m_bVisibleRow
VclPtr< ::svt::ListBoxControl > m_pOrderCell
virtual void InitController(::svt::CellControllerRef &rController, sal_Int32 nRow, sal_uInt16 nCol) override
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 nRow, sal_uInt16 nColumnId) override
Creates the accessible object of a data table cell.
virtual sal_Int8 ExecuteDrop(const BrowserExecuteDropEvent &rEvt) override
virtual bool SaveModified() override
bool IsRowVisible(sal_uInt16 _nWhich) const
void invalidateUndoRedo()
void adjustSelectionMode(bool _bClickedOntoHeader, bool _bClickedOntoHandleCol)
Size CalcOptimalSize(const Size &_rAvailable)
void SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
VclPtr< ::svt::EditControl > m_pTextCell
void AddOrder(const OTableFieldDescRef &rInfo, const EOrderDir eDir, sal_uInt32 _nCurrentPos)
sal_Int32 GetRealRow(sal_Int32 nRow) const
virtual ~OSelectionBrowseBox() override
virtual void ColumnMoved(sal_uInt16 nColId) override
void RemoveField(sal_uInt16 nId)
virtual void MouseButtonDown(const BrowserMouseEvent &rEvt) override
void notifyFunctionFieldChanged(const OUString &_sOldFunctionName, std::u16string_view _sFunctionName, bool &_bListAction, sal_uInt16 _nColumnId)
append an undo action for the function field
bool fillEntryTable(OTableFieldDescRef const &_pEntry, const OUString &_sTableName)
sets the table window at the _pEntry
virtual OUString GetRowDescription(sal_Int32 _nRow) const override
returns the description of the row.
sal_uInt32 m_nLastSortColumn
virtual void Init() override
bool isPasteAllowed() const
virtual void DeactivateCell(bool bUpdate=true) override
void clearEntryFunctionField(std::u16string_view _sFieldName, OTableFieldDescRef const &_pEntry, bool &_bListAction, sal_uInt16 _nColumnId)
clears the function fields of the submitted entry if it doesn't match the SQL standard and append an ...
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect, sal_uInt16 nColumnId) const override
OTableFieldDescRef getEntry(OTableFields::size_type _nPos)
SfxUndoManager & GetUndoManager() const
need for undo's and redo's
void addUndoActionAndInvalidate(std::unique_ptr< SfxUndoAction > pAction)
addUndoActionAndInvalidate adds an undo action to the undoManager, additionally invalidates the UNDO ...
sal_Int32 GetDataType() const
ETableFieldType GetKeyType() const
OUString const & GetTableName() const
css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos, const TriState &eState)
virtual void ColumnResized(sal_uInt16 nColId) override
tools::Rectangle GetCellRect(sal_Int32 nRow, sal_uInt16 nColId, bool bRelToBrowser=true) const
virtual void DeactivateCell(bool bUpdate=true)
virtual void MouseButtonDown(const BrowserMouseEvent &rEvt) override
const CellControllerRef & Controller() const
virtual void KeyInput(const KeyEvent &rEvt) override
virtual VclPtr< BrowserHeader > CreateHeaderBar(BrowseBox *pParent) override
virtual void ColumnMoved(sal_uInt16 nId) override
void PaintTristate(const tools::Rectangle &rRect, const TriState &eState, bool _bEnabled=true) const
virtual void MouseButtonUp(const BrowserMouseEvent &rEvt) override
virtual bool IsModified() const
virtual void GetFocus() override
virtual void dispose() override
void SetFontSize(const Size &)
void SetWeight(FontWeight)
sal_uInt16 GetCode() const
void Enable(bool bEnable=true, bool bChild=true)
const AllSettings & GetSettings() const
weld::Window * GetFrameWeld() const
void EnableInput(bool bEnable=true, bool bChild=true)
virtual int find_text(const OUString &rStr) const=0
virtual void copy_entry_clipboard()=0
virtual OUString get_active_text() const=0
virtual void set_entry_text(const OUString &rStr)=0
virtual void set_active(int pos)=0
virtual OUString get_text(int pos) const=0
virtual void cut_entry_clipboard()=0
void append_text(const OUString &rStr)
void insert_text(int pos, const OUString &rStr)
virtual void remove(int pos)=0
virtual int get_active() const=0
virtual int get_count() const=0
virtual void paste_entry_clipboard()=0
void set_active_text(const OUString &rStr)
virtual bool get_entry_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual void cut_clipboard()=0
virtual void set_text(const OUString &rText)=0
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual void copy_clipboard()=0
virtual void paste_clipboard()=0
virtual OUString get_text(int row, int col=-1) const=0
virtual OUString get_id(int pos) const=0
#define TOOLS_WARN_EXCEPTION(area, stream)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
virtual void SetHelpId(const OUString &) override
@ NO_HANDLE_COLUMN_CONTENT
constexpr OUStringLiteral HID_QRYDGN_ROW_FUNCTION
constexpr OUStringLiteral HID_CTL_QRYDGNCRIT
constexpr OUStringLiteral HID_QRYDGN_ROW_ORDER
constexpr OUStringLiteral HID_QRYDGN_ROW_VISIBLE
constexpr OUStringLiteral HID_QRYDGN_ROW_ALIAS
constexpr OUStringLiteral HID_QRYDGN_ROW_TABLE
constexpr OUStringLiteral HID_QRYDGN_ROW_FIELD
constexpr OUStringLiteral HID_QRYDGN_ROW_CRIT
constexpr sal_uInt16 KEY_DELETE
#define LINK(Instance, Class, Member)
const LanguageTag & getLocale()
OString stripStart(const OString &rIn, char c)
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
::rtl::Reference< OTableFieldDesc > OTableFieldDescRef
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
void adjustBrowseBoxColumnWidth(::svt::EditBrowseBox *_pBox, sal_uInt16 _nColId)
css::uno::Reference< css::util::XNumberFormatter > getNumberFormatter(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
creates a number formatter
std::vector< OTableFieldDescRef > OTableFields
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
enumrange< T >::Iterator begin(enumrange< T >)
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
#define SQL_ISRULE(pParseNode, eRule)
#define SQL_ISPUNCTUATION(pParseNode, aString)
#define SQL_ISRULEOR3(pParseNode, e1, e2, e3)
constexpr OUStringLiteral PROPERTY_TYPE(u"Type")
VclPtr< OTableWindowListBox > pListBox