24#include <svx/strings.hrc>
30#include <com/sun/star/awt/LineEndFormat.hpp>
31#include <com/sun/star/awt/MouseWheelBehavior.hpp>
32#include <com/sun/star/awt/VisualEffect.hpp>
33#include <com/sun/star/container/XChild.hpp>
34#include <com/sun/star/container/XIndexAccess.hpp>
35#include <com/sun/star/form/FormComponentType.hpp>
36#include <com/sun/star/form/XBoundComponent.hpp>
37#include <com/sun/star/script/XEventAttacherManager.hpp>
38#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
39#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
40#include <com/sun/star/sdbc/DataType.hpp>
41#include <com/sun/star/sdbc/SQLException.hpp>
42#include <com/sun/star/sdbc/XRowSet.hpp>
43#include <com/sun/star/sdbc/XStatement.hpp>
44#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
45#include <com/sun/star/util/XNumberFormatter.hpp>
46#include <com/sun/star/util/Time.hpp>
47#include <com/sun/star/util/Date.hpp>
85using ::com::sun::star::util::XNumberFormatter;
95 LineEnd getModelLineEndSetting(
const Reference< XPropertySet >& _rxModel )
101 sal_Int16 nLineEndFormat = awt::LineEndFormat::LINE_FEED;
103 Reference< XPropertySetInfo > xPSI;
105 xPSI = _rxModel->getPropertySetInfo();
107 OSL_ENSURE( xPSI.is(),
"getModelLineEndSetting: invalid column model!" );
112 switch ( nLineEndFormat )
114 case awt::LineEndFormat::CARRIAGE_RETURN: eFormat =
LINEEND_CR;
break;
115 case awt::LineEndFormat::LINE_FEED: eFormat =
LINEEND_LF;
break;
116 case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: eFormat =
LINEEND_CRLF;
break;
118 OSL_FAIL(
"getModelLineEndSetting: what's this?" );
141 m_nTypeId =
static_cast<sal_Int16
>(nTypeId);
156 case DataType::TIMESTAMP:
158 case DataType::BOOLEAN:
159 case DataType::TINYINT:
160 case DataType::SMALLINT:
161 case DataType::INTEGER:
162 case DataType::BIGINT:
163 case DataType::FLOAT:
165 case DataType::DOUBLE:
166 case DataType::NUMERIC:
167 case DataType::DECIMAL:
168 m_nAlign = css::awt::TextAlign::RIGHT;
172 m_nAlign = css::awt::TextAlign::LEFT;
177 std::unique_ptr<DbCellControl> pCellControl;
198 OSL_FAIL(
"DbGridColumn::CreateControl: Unknown Column");
203 Reference< XRowSet > xCur;
211 auto pTempCellControl = pCellControl.get();
240 Reference< container::XChild > xChild(
m_xModel, UNO_QUERY_THROW );
241 Reference< script::XEventAttacherManager > xManager( xChild->getParent(), UNO_QUERY_THROW );
242 Reference< container::XIndexAccess > xContainer( xChild->getParent(), UNO_QUERY_THROW );
246 Reference< XInterface > xCellInterface( *
m_pCell, UNO_QUERY );
248 xManager->attach( nIndexInParent, xCellInterface,
Any( xCellInterface ) );
250 xManager->detach( nIndexInParent, xCellInterface );
278 if (bResult && pDataCell)
280 Reference< css::form::XBoundComponent > xComp(
m_xModel, UNO_QUERY);
282 bResult = xComp->commit();
338 case DataType::NUMERIC:
339 case DataType::DECIMAL:
340 case DataType::DOUBLE:
342 case DataType::BIGINT:
343 case DataType::INTEGER:
344 case DataType::SMALLINT:
345 case DataType::TINYINT:
348 case DataType::TIMESTAMP:
349 _nAlign = css::awt::TextAlign::RIGHT;
352 case DataType::BOOLEAN:
353 _nAlign = css::awt::TextAlign::CENTER;
356 _nAlign = css::awt::TextAlign::LEFT;
361 _nAlign = css::awt::TextAlign::LEFT;
375 if (aAlign.hasValue())
377 sal_Int16 nTest = sal_Int16();
378 if (aAlign >>= nTest)
379 nStandardAlign = nTest;
418OUString
DbGridColumn::GetCellText(
const Reference< css::sdb::XColumn >& xField,
const Reference< XNumberFormatter >& xFormatter)
const
425 aText = pTextCell->
GetText(xField, xFormatter);
434 Reference< css::sdb::XColumn > xField;
447 const Reference< XNumberFormatter >& xFormatter)
457 DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center;
459 nStyle |= DrawTextFlags::Disable;
465 DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter;
467 nStyle |= DrawTextFlags::Disable;
471 case css::awt::TextAlign::RIGHT:
472 nStyle |= DrawTextFlags::Right;
474 case css::awt::TextAlign::CENTER:
475 nStyle |= DrawTextFlags::Center;
478 nStyle |= DrawTextFlags::Left;
492 DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center;
494 nStyle |= DrawTextFlags::Disable;
500 DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center;
502 nStyle |= DrawTextFlags::Disable;
507 pFilterCell->PaintCell( rDev, rRect );
514 m_pCell->ImplInitWindow( rParent, _eInitWhat );
523 ,m_bTransparent( false )
524 ,m_bAlignedController( true )
525 ,m_bAccessingValueProperty( false )
526 ,m_rColumn( _rColumn )
527 ,m_pPainter( nullptr )
528 ,m_pWindow( nullptr )
530 Reference< XPropertySet > xColModelProps = _rColumn.
getModel();
531 if ( !xColModelProps.is() )
553 Reference< XPropertySetInfo > xPSI( xColModelProps->getPropertySetInfo(), UNO_SET_THROW );
556 Reference< XPropertySet > xField;
577 Reference< XPropertySetInfo > xPSI;
578 if ( xColModelProps.is() )
579 xPSI = xColModelProps->getPropertySetInfo();
581 DBG_ASSERT( !_bWarnIfNotExistent || ( xPSI.is() && xPSI->hasPropertyByName( _rPropertyName ) ),
582 "DbCellControl::doPropertyListening: no property set info or non-existent property!" );
584 if ( xPSI.is() && xPSI->hasPropertyByName( _rPropertyName ) )
601 if ( _pBroadcaster.is() )
603 _pBroadcaster->dispose();
604 _pBroadcaster.clear();
621 "DbCellControl::implValuePropertyChanged: not to be called with the value property locked!" );
641 Reference< XPropertySet > xSourceProps( _rEvent.Source, UNO_QUERY );
681 bool bReturn =
false;
733 pWindow->SetPointFont(aFont);
748 pWindow->SetTextColor(aTextColor);
750 pWindow->SetControlForeground(aTextColor);
753 pWindow->SetTextLineColor();
755 pWindow->SetTextLineColor(aTextLineColor);
771 pWindow->SetBackground();
774 pWindow->SetBackground(aColor);
775 pWindow->SetControlBackground(aColor);
777 pWindow->GetOutDev()->SetFillColor(aColor);
804 DBG_ASSERT(
m_pWindow,
"DbCellControl::implAdjustReadOnly: not to be called without window!" );
805 DBG_ASSERT( _rxModel.is(),
"DbCellControl::implAdjustReadOnly: invalid model!" );
819 DBG_ASSERT(
m_pWindow,
"DbCellControl::implAdjustEnabled: not to be called without window!" );
820 DBG_ASSERT( _rxModel.is(),
"DbCellControl::implAdjustEnabled: invalid model!" );
843 Reference< XPropertySetInfo > xModelPSI(
xModel->getPropertySetInfo(), UNO_SET_THROW );
857 sal_Int16 nWheelBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY;
860 switch ( nWheelBehavior )
862 case css::awt::MouseWheelBehavior::SCROLL_DISABLED: nVclSetting = MouseWheelBehaviour::Disable;
break;
863 case css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MouseWheelBehaviour::FocusOnly;
break;
864 case css::awt::MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MouseWheelBehaviour::ALWAYS;
break;
866 OSL_FAIL(
"DbCellControl::Init: invalid MouseWheelBehavior!" );
874 m_pWindow->SetSettings( aSettings,
true );
909 if (EditControlBase* pControl =
dynamic_cast<EditControlBase*
>(_pWindow))
911 switch (_nAlignmentBit)
914 pControl->get_widget().set_alignment(TxtAlign::Left);
917 pControl->get_widget().set_alignment(TxtAlign::Center);
920 pControl->get_widget().set_alignment(TxtAlign::Right);
928 _pWindow->
SetStyle( nStyle | _nAlignmentBit );
937 case css::awt::TextAlign::RIGHT:
940 case css::awt::TextAlign::CENTER:
947 lcl_implAlign(
m_pWindow, nAlignmentBit );
964double DbCellControl::GetValue(
const Reference< css::sdb::XColumn >& _rxField,
const Reference< XNumberFormatter >& xFormatter)
const
971 fValue = _rxField->getDouble();
977 bool bSuccess =
false;
980 fValue = _rxField->getDouble();
988 fValue = xFormatter->convertStringToNumber(
m_rColumn.
GetKey(), _rxField->getString());
1012 DBG_ASSERT(
m_pWindow,
"DbLimitedLengthField::implAdjustGenericFieldSetting: not to be called without window!" );
1013 DBG_ASSERT( _rxModel.is(),
"DbLimitedLengthField::implAdjustGenericFieldSetting: invalid model!" );
1016 sal_Int16 nMaxLen = 0;
1024 dynamic_cast<EditControlBase&
>(*m_pWindow).get_widget().set_max_length(nMaxLen);
1026 dynamic_cast<EditControlBase&
>(*m_pPainter).get_widget().set_max_length(nMaxLen);
1031 ,m_bIsMultiLineEdit(false)
1047 bool bLeftAlign =
true;
1050 bool bIsMultiLine =
false;
1061 "caught an exception while determining the multi-line capabilities!");
1072 case awt::TextAlign::RIGHT:
1073 xEditControl->get_widget().set_alignment(TxtAlign::Right);
1074 xEditPainter->get_widget().set_alignment(TxtAlign::Right);
1077 case awt::TextAlign::CENTER:
1078 xEditControl->get_widget().set_alignment(TxtAlign::Center);
1079 xEditPainter->get_widget().set_alignment(TxtAlign::Center);
1085 m_pEdit.reset(
new MultiLineEditImplementation(*xEditControl));
1097 case awt::TextAlign::RIGHT:
1098 xEditControl->get_widget().set_alignment(TxtAlign::Right);
1099 xEditPainter->get_widget().set_alignment(TxtAlign::Right);
1102 case awt::TextAlign::CENTER:
1103 xEditControl->get_widget().set_alignment(TxtAlign::Center);
1104 xEditPainter->get_widget().set_alignment(TxtAlign::Center);
1110 m_pEdit.reset(
new EntryImplementation(*xEditControl));
1134 return new EditCellController(
m_pEdit.get() );
1150 const css::uno::Reference<css::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
1151 FormattedColumnValue fmter( xFormatter, xPS );
1155 return fmter.getFormattedValue();
1173 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbTextField::updateFromModel: invalid call!" );
1178 sal_Int32 nMaxTextLen =
m_pEdit->GetMaxTextLen();
1179 if (nMaxTextLen > 0 && sText.getLength() > nMaxTextLen)
1181 sal_Int32 nDiff = sText.getLength() - nMaxTextLen;
1182 sText = sText.replaceAt(sText.getLength() - nDiff,nDiff,
u"");
1193 sal_Int32 nMaxTextLen =
m_pEdit->GetMaxTextLen();
1194 if (nMaxTextLen > 0)
1199 if ( sOldValue.getLength() > nMaxTextLen && sOldValue.compareTo(aText,nMaxTextLen) == 0 )
1209 m_pEdit->SetMaxTextLen( _nMaxLen );
1242 case awt::TextAlign::RIGHT:
1243 xEditControl->get_widget().set_alignment(TxtAlign::Right);
1244 xEditPainter->get_widget().set_alignment(TxtAlign::Right);
1246 case awt::TextAlign::CENTER:
1247 xEditControl->get_widget().set_alignment(TxtAlign::Center);
1248 xEditPainter->get_widget().set_alignment(TxtAlign::Center);
1270 sal_Int32 nFormatKey = -1;
1275 if (aSupplier.hasValue())
1282 if (aFmtKey.hasValue())
1284 DBG_ASSERT(aFmtKey.getValueType().getTypeClass() == TypeClass_LONG,
"DbFormattedField::Init : invalid format key property (no sal_Int32) !");
1285 nFormatKey = ::comphelper::getINT32(aFmtKey);
1289 SAL_INFO(
"svx.fmcomp",
"DbFormattedField::Init : my uno-model has no format-key, but a formats supplier !");
1317 if (pImplementation)
1326 if (pFormatterUsed ==
nullptr)
1329 DBG_ASSERT(pFormatterUsed !=
nullptr,
"DbFormattedField::Init : no standard formatter given by the numeric field !");
1332 if (nFormatKey == -1)
1347 bool bClearMin =
true;
1351 if (aMin.getValueType().getTypeClass() != TypeClass_VOID)
1353 DBG_ASSERT(aMin.getValueType().getTypeClass() == TypeClass_DOUBLE,
"DbFormattedField::Init : the model has an invalid min value !");
1354 double dMin = ::comphelper::getDouble(aMin);
1365 bool bClearMax =
true;
1369 if (aMax.getValueType().getTypeClass() != TypeClass_VOID)
1371 DBG_ASSERT(aMax.getValueType().getTypeClass() == TypeClass_DOUBLE,
"DbFormattedField::Init : the model has an invalid max value !");
1372 double dMax = ::comphelper::getDouble(aMax);
1387 if (aDefault.hasValue())
1389 switch (aDefault.getValueType().getTypeClass())
1391 case TypeClass_DOUBLE:
1399 OUString sConverted;
1400 const Color* pDummy;
1401 pFormatterUsed->
GetOutputString(::comphelper::getDouble(aDefault), 0, sConverted, &pDummy);
1406 case TypeClass_STRING:
1408 OUString sDefault( ::comphelper::getString(aDefault) );
1412 sal_uInt32 nTestFormat(0);
1427 OSL_FAIL(
"DbFormattedField::Init: unexpected value type!" );
1436 return new ::svt::FormattedFieldCellController(
static_cast<FormattedControlBase*
>(
m_pWindow.
get()));
1443 sal_Int32 nNewKey = _rEvent.NewValue.hasValue() ? ::comphelper::getINT32(_rEvent.NewValue) : 0;
1447 static_cast<FormattedControlBase*
>(
m_pWindow.
get())->get_formatter().SetFormatKey(nNewKey);
1449 static_cast<FormattedControlBase*
>(
m_pPainter.
get())->get_formatter().SetFormatKey(nNewKey);
1460 if (ppColor !=
nullptr)
1467 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pPainter.
get());
1481 if (_rxField->wasNull())
1483 rPainterFormatter.
SetValue(dValue);
1489 aText = _rxField->getString();
1490 if (_rxField->wasNull())
1500 aText = pControl->get_widget().get_text();
1501 if (ppColor !=
nullptr)
1511 FormattedControlBase* pEditControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
1528 if (_rxField->wasNull())
1537 OUString sText( _rxField->getString());
1551 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbFormattedField::updateFromModel: invalid call!" );
1553 FormattedControlBase* pEditControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
1559 if ( !aValue.hasValue() || (aValue >>= sText) )
1577 FormattedControlBase* pEditControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
1584 aNewVal <<= rEditFormatter.
GetValue();
1602 void setCheckBoxStyle(
vcl::Window* _pWindow,
bool bMono )
1631 sal_Int16 nStyle = awt::VisualEffect::LOOK3D;
1634 setCheckBoxStyle(
m_pWindow, nStyle == awt::VisualEffect::FLAT );
1635 setCheckBoxStyle(
m_pPainter, nStyle == awt::VisualEffect::FLAT );
1637 bool bTristate =
true;
1639 static_cast< CheckBoxControl*
>(
m_pWindow.
get() )->EnableTriState( bTristate );
1640 static_cast< CheckBoxControl*
>(
m_pPainter.
get() )->EnableTriState( bTristate );
1652 return new CheckBoxCellController(
static_cast<CheckBoxControl*
>(
m_pWindow.
get()));
1656 CheckBoxControl* _pCheckBoxControl )
1663 bool bValue = _rxField->getBoolean();
1664 if (!_rxField->wasNull())
1672 _pCheckBoxControl->SetState(eState);
1681 const Reference< css::sdb::XColumn >& _rxField,
1682 const Reference< XNumberFormatter >& xFormatter)
1684 CheckBoxControl* pControl =
static_cast<CheckBoxControl*
>(
m_pPainter.
get());
1693 aBoxSize = pControl->GetBox().get_preferred_size();
1699 aBoxSize =
Size(nSize, nSize);
1724 MapMode aResMapMode(MapUnit::Map100thMM);
1762 Point aTempPos11(aPos11);
1763 Point aTempPos12(aPos12);
1764 Point aTempPos21(aPos21);
1765 Point aTempPos22(aPos22);
1768 for (
int i = 0;
i < nCheckWidth;
i++)
1772 aTempPos11.
setX(aPos11.
X() + nDX);
1773 aTempPos12.
setX(aPos12.
X() + nDX);
1774 aTempPos21.
setX(aPos21.
X() + nDX);
1775 aTempPos22.
setX(aPos22.
X() + nDX);
1780 aTempPos11.
setX(aPos11.
X() - nDX);
1781 aTempPos12.
setX(aPos12.
X() - nDX);
1782 aTempPos21.
setX(aPos21.
X() - nDX);
1783 aTempPos22.
setX(aPos22.
X() - nDX);
1785 rDev.
DrawLine(aTempPos11, aTempPos12);
1786 rDev.
DrawLine(aTempPos21, aTempPos22);
1798 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbCheckBox::updateFromModel: invalid call!" );
1808 Any(
static_cast<sal_Int16
>(
static_cast< CheckBoxControl*
>(
m_pWindow.
get() )->GetState() ) ) );
1828 DBG_ASSERT(
m_pWindow,
"DbPatternField::implAdjustGenericFieldSetting: not to be called without window!" );
1829 DBG_ASSERT( _rxModel.is(),
"DbPatternField::implAdjustGenericFieldSetting: invalid model!" );
1835 bool bStrict =
false;
1841 OString aAsciiEditMask(
OUStringToOString(aEditMask, RTL_TEXTENCODING_ASCII_US));
1844 rEditFormatter.
SetMask(aAsciiEditMask, aLitMask);
1848 rPaintFormatter.
SetMask(aAsciiEditMask, aLitMask);
1867 return new EditCellController(
static_cast<PatternControl*
>(
m_pWindow.
get()));
1885 rpFormatter = std::make_unique< FormattedColumnValue> (
1887 OSL_ENSURE(rpFormatter,
"DbPatternField::Init: no value formatter!");
1890 OSL_ENSURE( rpFormatter->getColumn() == _rxField,
"DbPatternField::GetFormatText: my value formatter is working for another field ...!" );
1895 sText = rpFormatter->getFormattedValue();
1909 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbPatternField::updateFromModel: invalid call!" );
1928 ,m_nStandardAlign( _nStandardAlign )
1939 bool bSpinButton(
false);
1955 return new ::svt::FormattedFieldCellController(
static_cast<FormattedControlBase*
>(
m_pWindow.
get()));
1971 DBG_ASSERT(
m_pWindow,
"DbNumericField::implAdjustGenericFieldSetting: not to be called without window!" );
1972 DBG_ASSERT( _rxModel.is(),
"DbNumericField::implAdjustGenericFieldSetting: invalid model!" );
1996 Reference< css::util::XNumberFormatsSupplier > xSupplier;
1997 Reference< XRowSet > xForm;
2003 if ( xSupplier.is() )
2008 if (
nullptr == pFormatterUsed )
2011 DBG_ASSERT( pFormatterUsed !=
nullptr,
"DbNumericField::implAdjustGenericFieldSetting: no standard formatter given by the numeric field !" );
2018 OUString sFormatString = pFormatterUsed->
GenerateFormat(0, aAppLanguage, bThousand,
false, nScale);
2020 rEditFormatter.
SetFormat( sFormatString, aAppLanguage );
2021 rPaintFormatter.
SetFormat( sFormatString, aAppLanguage );
2031 OUString lcl_setFormattedNumeric_nothrow( FormattedControlBase& _rField,
const DbCellControl& _rControl,
2032 const Reference< XColumn >& _rxField,
const Reference< XNumberFormatter >& _rxFormatter )
2035 if ( _rxField.is() )
2039 double fValue = _rControl.
GetValue( _rxField, _rxFormatter );
2040 if ( !_rxField->wasNull() )
2042 _rField.get_formatter().SetValue(fValue);
2043 sValue = _rField.get_widget().get_text();
2046 catch(
const Exception& )
2057 return lcl_setFormattedNumeric_nothrow(
dynamic_cast<FormattedControlBase&
>(*
m_pPainter), *
this, _rxField, _rxFormatter);
2062 lcl_setFormattedNumeric_nothrow(
dynamic_cast<FormattedControlBase&
>(*
m_pWindow), *
this, _rxField, _rxFormatter);
2067 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbNumericField::updateFromModel: invalid call!" );
2069 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2072 if ( _rxModel->getPropertyValue(
FM_PROP_VALUE ) >>= dValue )
2074 Formatter& rFormatter = pControl->get_formatter();
2078 pControl->get_widget().set_text(OUString());
2083 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2084 OUString aText(pControl->get_widget().get_text());
2087 if (!aText.isEmpty())
2089 Formatter& rFormatter = pControl->get_formatter();
2090 double fValue = rFormatter.
GetValue();
2111 DBG_ASSERT(
m_pWindow,
"DbCurrencyField::implAdjustGenericFieldSetting: not to be called without window!" );
2112 DBG_ASSERT( _rxModel.is(),
"DbCurrencyField::implAdjustGenericFieldSetting: invalid model!" );
2151 OUString lcl_setFormattedCurrency_nothrow( FormattedControlBase& _rField,
const DbCurrencyField& _rControl,
2152 const Reference< XColumn >& _rxField,
const Reference< XNumberFormatter >& _rxFormatter )
2155 if ( _rxField.is() )
2159 double fValue = _rControl.
GetValue( _rxField, _rxFormatter );
2160 if ( !_rxField->wasNull() )
2162 _rField.get_formatter().SetValue(fValue);
2163 sValue = _rField.get_widget().get_text();
2166 catch(
const Exception& )
2177 return lcl_setFormattedCurrency_nothrow(
dynamic_cast<FormattedControlBase&
>(*
m_pPainter), *
this, _rxField, _rxFormatter);
2182 lcl_setFormattedCurrency_nothrow(
dynamic_cast<FormattedControlBase&
>(*
m_pWindow), *
this, _rxField, _rxFormatter);
2187 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbCurrencyField::updateFromModel: invalid call!" );
2189 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2192 if ( _rxModel->getPropertyValue(
FM_PROP_VALUE ) >>= dValue )
2194 Formatter& rFormatter = pControl->get_formatter();
2198 pControl->get_widget().set_text(OUString());
2203 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2204 OUString aText(pControl->get_widget().get_text());
2207 if (!aText.isEmpty())
2209 Formatter& rFormatter = pControl->get_formatter();
2210 double fValue = rFormatter.
GetValue();
2240 DBG_ASSERT(
m_pWindow,
"DbDateField::implAdjustGenericFieldSetting: not to be called without window!" );
2241 DBG_ASSERT( _rxModel.is(),
"DbDateField::implAdjustGenericFieldSetting: invalid model!" );
2252 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2255 FormattedControlBase* pPainter =
static_cast<FormattedControlBase*
>(
m_pPainter.
get());
2259 if ( aCentury.getValueType().getTypeClass() != TypeClass_VOID )
2261 bool bShowDateCentury =
getBOOL( aCentury );
2268 rControlFormatter.
SetMin( aMin );
2269 rControlFormatter.
SetMax( aMax );
2274 rPainterFormatter.
SetMin( aMin );
2275 rPainterFormatter.
SetMax( aMax );
2282 OUString lcl_setFormattedDate_nothrow(DateControl& _rField,
const Reference<XColumn>& _rxField)
2285 if ( _rxField.is() )
2289 css::util::Date aValue = _rxField->getDate();
2290 if (!_rxField->wasNull())
2292 _rField.SetDate(
::Date(aValue.Day, aValue.Month, aValue.Year));
2293 sDate = _rField.get_widget().get_text();
2296 catch(
const Exception& )
2307 return lcl_setFormattedDate_nothrow(*
static_cast<DateControl*
>(
m_pPainter.
get()), _rxField);
2312 lcl_setFormattedDate_nothrow(*
static_cast<DateControl*
>(
m_pWindow.
get()), _rxField);
2317 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbDateField::updateFromModel: invalid call!" );
2319 DateControl* pControl =
static_cast<DateControl*
>(
m_pWindow.
get());
2322 if ( _rxModel->getPropertyValue(
FM_PROP_DATE ) >>= aDate )
2323 pControl->SetDate(
::Date(aDate));
2325 pControl->get_widget().set_text(OUString());
2330 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2331 OUString aText(pControl->get_widget().get_text());
2334 if (!aText.isEmpty())
2360 DBG_ASSERT(
m_pWindow,
"DbTimeField::implAdjustGenericFieldSetting: not to be called without window!" );
2361 DBG_ASSERT( _rxModel.is(),
"DbTimeField::implAdjustGenericFieldSetting: invalid model!" );
2372 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2376 rControlFormatter.
SetMin(aMin);
2377 rControlFormatter.
SetMax(aMax);
2381 FormattedControlBase* pPainter =
static_cast<FormattedControlBase*
>(
m_pPainter.
get());
2385 rPainterFormatter.
SetMin(aMin);
2386 rPainterFormatter.
SetMax(aMax);
2393 OUString lcl_setFormattedTime_nothrow(TimeControl& _rField,
const Reference<XColumn>& _rxField)
2396 if ( _rxField.is() )
2400 css::util::Time aValue = _rxField->getTime();
2401 if (!_rxField->wasNull())
2407 catch(
const Exception& )
2418 return lcl_setFormattedTime_nothrow(*
static_cast<TimeControl*
>(
m_pPainter.
get()), _rxField);
2423 lcl_setFormattedTime_nothrow(*
static_cast<TimeControl*
>(
m_pWindow.
get()), _rxField);
2428 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbTimeField::updateFromModel: invalid call!" );
2430 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2434 if ( _rxModel->getPropertyValue(
FM_PROP_TIME ) >>= aTime )
2437 pControl->get_widget().set_text(OUString());
2442 FormattedControlBase* pControl =
static_cast<FormattedControlBase*
>(
m_pWindow.
get());
2443 OUString aText(pControl->get_widget().get_text());
2446 if (!aText.isEmpty())
2483 css::uno::Sequence<OUString> aTest;
2484 if (rItems >>= aTest)
2486 for (
const OUString& rString : std::as_const(aTest))
2511 m_pWindow->SetSettings(aSettings,
true);
2528 const css::uno::Reference<css::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
2542 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbComboBox::updateFromModel: invalid call!" );
2555 pControl->TriggerAuxModify();
2592 ListBoxControl* pField =
static_cast<ListBoxControl*
>(
m_pWindow.
get());
2599 css::uno::Sequence<OUString> aTest;
2600 if (!(rItems >>= aTest))
2603 if (aTest.hasElements())
2605 for (
const OUString& rString : std::as_const(aTest))
2637 return new ListBoxCellController(
static_cast<ListBoxControl*
>(
m_pWindow.
get()));
2643 if ( _rxField.is() )
2647 sText = _rxField->getString();
2667 OUString sFormattedText(
GetFormatText( _rxField, xFormatter ) );
2669 if (!sFormattedText.isEmpty())
2677 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbListBox::updateFromModel: invalid call!" );
2679 Sequence< sal_Int16 > aSelection;
2682 sal_Int16 nSelection = -1;
2683 if ( aSelection.hasElements() )
2684 nSelection = aSelection[ 0 ];
2686 ListBoxControl* pControl =
static_cast<ListBoxControl*
>(
m_pWindow.
get());
2690 if (nSelection >= 0 && nSelection < rComboBox.
get_count())
2696 pControl->TriggerAuxModify();
2702 Sequence<sal_Int16> aSelectSeq;
2707 aSelectSeq.realloc(1);
2708 *aSelectSeq.getArray() =
static_cast<sal_Int16
>(nActive);
2710 aVal <<= aSelectSeq;
2717 ,OSQLParserClient(rxContext)
2718 ,m_nControlClass(css::form::FormComponentType::
TEXTFIELD)
2719 ,m_bFilterList(false)
2720 ,m_bFilterListFilled(false)
2735 static const DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter | DrawTextFlags::Left;
2738 case FormComponentType::CHECKBOX:
2741 CheckBoxControl* pControl =
static_cast<CheckBoxControl*
>(
m_pPainter.
get());
2742 Size aBoxSize = pControl->GetBox().get_preferred_size();
2750 case FormComponentType::LISTBOX:
2751 rDev.
DrawText(rRect,
static_cast<ListBoxControl*
>(
m_pWindow.
get())->get_widget().get_active_text(), nStyle);
2760 css::uno::Sequence<OUString> aTest;
2762 if (!aTest.hasElements())
2769 for (
const OUString& rString : std::as_const(aTest))
2774 ListBoxControl* pField =
static_cast<ListBoxControl*
>(
m_pWindow.
get());
2776 for (
const OUString& rString : std::as_const(aTest))
2787 case css::form::FormComponentType::CHECKBOX:
2796 case css::form::FormComponentType::LISTBOX:
2802 case css::form::FormComponentType::COMBOBOX:
2811 m_pWindow->SetSettings(aSettings,
true);
2828 m_pWindow->SetSettings(aSettings,
true);
2848 case FormComponentType::CHECKBOX:
2849 case FormComponentType::LISTBOX:
2850 case FormComponentType::COMBOBOX:
2874 case css::form::FormComponentType::CHECKBOX:
2877 case css::form::FormComponentType::LISTBOX:
2880 case css::form::FormComponentType::COMBOBOX:
2894 OSL_ENSURE( _rxModel.is() &&
m_pWindow,
"DbFilterField::updateFromModel: invalid call!" );
2896 OSL_FAIL(
"DbFilterField::updateFromModel: not implemented yet (how the hell did you reach this?)!" );
2906 case css::form::FormComponentType::CHECKBOX:
2908 case css::form::FormComponentType::LISTBOX:
2915 sal_Int16
nPos =
static_cast<sal_Int16
>(nActive);
2927 case css::form::FormComponentType::COMBOBOX:
2934 aText =
static_cast<EditControlBase*
>(
m_pWindow.
get())->get_widget().get_text();
2943 if (!aNewText.isEmpty())
2948 std::unique_ptr< OSQLParseNode > pParseNode = predicateTree(aErrorMsg, aNewText,xNumberFormatter,
m_rColumn.
GetField());
2949 if (pParseNode !=
nullptr)
2951 OUString aPreparedText;
2955 Reference< XRowSet > xDataSourceRowSet(
2957 Reference< XConnection > xConnection(
getConnection(xDataSourceRowSet));
2959 pParseNode->parseNodeToPredicateStr(aPreparedText,
2972 SQLException aError;
2973 aError.Message = aErrorMsg;
2995 case css::form::FormComponentType::CHECKBOX:
3000 else if (rText ==
"0")
3005 static_cast<CheckBoxControl*
>(
m_pWindow.
get())->SetState(eState);
3006 static_cast<CheckBoxControl*
>(
m_pPainter.
get())->SetState(eState);
3008 case css::form::FormComponentType::LISTBOX:
3011 static_cast<ListBoxControl*
>(
m_pWindow.
get())->get_widget().set_active(
nPos);
3013 case css::form::FormComponentType::COMBOBOX:
3045 Reference< css::container::XChild > xModelAsChild(
m_rColumn.
getModel(), UNO_QUERY);
3047 xModelAsChild.set(xModelAsChild->getParent(),UNO_QUERY);
3048 Reference< XRowSet > xForm(xModelAsChild->getParent(), UNO_QUERY);
3052 Reference<XPropertySet> xFormProp(xForm,UNO_QUERY);
3053 Reference< XTablesSupplier > xSupTab;
3054 xFormProp->getPropertyValue(
"SingleSelectQueryComposer") >>= xSupTab;
3061 Reference< XColumnsSupplier > xSupCol(xSupTab,UNO_QUERY);
3062 Reference< css::container::XNameAccess > xFieldNames = xSupCol->getColumns();
3063 if (!xFieldNames->hasByName(
aName))
3066 Reference< css::container::XNameAccess > xTablesNames = xSupTab->getTables();
3067 Reference< css::beans::XPropertySet > xComposerFieldAsSet(xFieldNames->getByName(
aName),UNO_QUERY);
3069 if (!xComposerFieldAsSet.is() ||
3074 OUString aFieldName;
3075 OUString aTableName;
3081 if (!xTablesNames->hasByName(aTableName))
3086 Reference< XStatement > xStatement;
3087 Reference< XResultSet > xListCursor;
3088 Reference< css::sdb::XColumn > xDataField;
3092 Reference< XDatabaseMetaData > xMeta = xConnection->getMetaData();
3094 OUString aQuote(xMeta->getIdentifierQuoteString());
3095 OUStringBuffer aStatement(
"SELECT DISTINCT "
3097 if (!aFieldName.isEmpty() &&
aName != aFieldName)
3099 aStatement.append(
" AS "
3103 aStatement.append(
" FROM ");
3105 Reference< XPropertySet > xTableNameAccess(xTablesNames->getByName(aTableName), UNO_QUERY_THROW);
3108 xStatement = xConnection->createStatement();
3109 Reference< css::beans::XPropertySet > xStatementProps(xStatement, UNO_QUERY);
3112 xListCursor = xStatement->executeQuery(aStatement.makeStringAndClear());
3114 Reference< css::sdbcx::XColumnsSupplier > xSupplyCols(xListCursor, UNO_QUERY);
3115 Reference< css::container::XIndexAccess > xFields(xSupplyCols->getColumns(), UNO_QUERY);
3116 xDataField.set(xFields->getByIndex(0), css::uno::UNO_QUERY);
3117 if (!xDataField.is())
3122 ::comphelper::disposeComponent(xStatement);
3133 sal_Int16 nKeyType = ::comphelper::getNumberFormatType(xFormatter->getNumberFormatsSupplier()->getNumberFormats(), nFormatKey);
3135 while (!xListCursor->isAfterLast() &&
i++ < SHRT_MAX)
3139 (void)xListCursor->next();
3156 OSL_FAIL(
"DbFilterField::UpdateFromField: cannot update a filter control from a field!" );
3161 TriState eState =
static_cast<CheckBoxControl*
>(m_pWindow.get())->
GetState();
3162 OUStringBuffer aTextBuf;
3164 Reference< XRowSet > xDataSourceRowSet(
3165 Reference< XInterface >(*m_rColumn.GetParent().getDataSource()), UNO_QUERY);
3166 Reference< XConnection > xConnection(
getConnection(xDataSourceRowSet));
3172 ::dbtools::getBooleanComparisonPredicate(
u"",
true, nBooleanComparisonMode, aTextBuf);
3175 ::dbtools::getBooleanComparisonPredicate(
u"",
false, nBooleanComparisonMode, aTextBuf);
3181 const OUString aText(aTextBuf.makeStringAndClear());
3183 if (m_aText != aText)
3186 m_aCommitLink.Call(*
this);
3193 ,m_pCellControl(
std::move(_pControl) )
3198 ,m_aMouseMotionListeners(
m_aMutex )
3226 if (!OComponentHelper::rBHelper.bDisposed)
3250 Sequence< uno::Type >
aTypes = ::comphelper::concatSequences(
3255 aTypes = ::comphelper::concatSequences(
3269 lang::EventObject
aEvent( *
this );
3270 m_aWindowListeners.disposeAndClear(
aEvent );
3271 m_aFocusListeners.disposeAndClear(
aEvent );
3272 m_aKeyListeners.disposeAndClear(
aEvent );
3273 m_aMouseListeners.disposeAndClear(
aEvent );
3274 m_aMouseMotionListeners.disposeAndClear(
aEvent );
3276 OComponentHelper::disposing();
3277 m_pColumn =
nullptr;
3278 m_pCellControl.reset();
3284 Any aReturn = OComponentHelper::queryAggregation( _rType );
3286 if ( !aReturn.hasValue() )
3299 return Reference< XInterface > ();
3325 ::osl::MutexGuard aGuard(
m_aMutex);
3333 OSL_FAIL(
"FmXGridCell::setPosSize: not implemented" );
3340 OSL_FAIL(
"FmXGridCell::getPosSize: not implemented" );
3341 return awt::Rectangle();
3347 OSL_FAIL(
"FmXGridCell::setVisible: not implemented" );
3354 OSL_FAIL(
"FmXGridCell::setEnable: not implemented" );
3361 OSL_FAIL(
"FmXGridCell::setFocus: not implemented" );
3437 OSL_FAIL(
"FmXGridCell::addPaintListener: not implemented" );
3442 OSL_FAIL(
"FmXGridCell::removePaintListener: not implemented" );
3459 if (!m_aFocusListeners.getLength())
3464 aEvent.Temporary =
false;
3471 if (!m_aFocusListeners.getLength())
3476 aEvent.Temporary =
false;
3483 if (!m_aMouseListeners.getLength())
3487 m_aMouseListeners.notifyEach(&awt::XMouseListener::mousePressed,
aEvent);
3492 if (!m_aMouseListeners.getLength())
3496 m_aMouseListeners.notifyEach(&awt::XMouseListener::mouseReleased,
aEvent);
3501 if ( rMouseEvent.IsEnterWindow() || rMouseEvent.IsLeaveWindow() )
3503 if ( m_aMouseListeners.getLength() != 0 )
3506 m_aMouseListeners.notifyEach( rMouseEvent.IsEnterWindow() ? &awt::XMouseListener::mouseEntered: &awt::XMouseListener::mouseExited,
aEvent );
3509 else if ( !rMouseEvent.IsEnterWindow() && !rMouseEvent.IsLeaveWindow() )
3511 if ( m_aMouseMotionListeners.getLength() != 0 )
3515 const bool bSimpleMove = bool( rMouseEvent.GetMode() & MouseEventModifiers::SIMPLEMOVE );
3516 m_aMouseMotionListeners.notifyEach( bSimpleMove ? &awt::XMouseMotionListener::mouseMoved: &awt::XMouseMotionListener::mouseDragged,
aEvent );
3523 if (!m_aKeyListeners.getLength())
3527 m_aKeyListeners.notifyEach(&awt::XKeyListener::keyPressed,
aEvent);
3532 if (!m_aKeyListeners.getLength())
3536 m_aKeyListeners.notifyEach(&awt::XKeyListener::keyReleased,
aEvent);
3540 const Reference< css::sdb::XColumn >& _rxField,
3541 const Reference< XNumberFormatter >& xFormatter)
3543 m_pCellControl->PaintFieldToCell( rDev, rRect, _rxField, xFormatter );
3555 ,m_bIsMultiLineText(false)
3561 const Reference< css::sdb::XColumn >& _rxField,
3562 const Reference< XNumberFormatter >& xFormatter)
3566 nStyle |= DrawTextFlags::Disable;
3570 case css::awt::TextAlign::RIGHT:
3571 nStyle |= DrawTextFlags::Right;
3573 case css::awt::TextAlign::CENTER:
3574 nStyle |= DrawTextFlags::Center;
3577 nStyle |= DrawTextFlags::Left;
3581 nStyle |= DrawTextFlags::VCenter;
3583 nStyle |= DrawTextFlags::Top | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak;
3587 const Color* pColor =
nullptr;
3588 OUString aText =
GetText(_rxField, xFormatter, &pColor);
3589 if (pColor !=
nullptr)
3593 rDev.
DrawText(rRect, aText, nStyle);
3597 rDev.
DrawText(rRect, aText, nStyle);
3609 ,m_pEditImplementation( nullptr )
3610 ,m_bOwnEditImplementation( false )
3630 if (!OComponentHelper::rBHelper.bDisposed)
3640 css::lang::EventObject aEvt(*
this);
3655 if ( !aReturn.hasValue() )
3663 return ::comphelper::concatSequences(
3672void SAL_CALL
FmXEditCell::addTextListener(const Reference< css::awt::XTextListener >& l)
3674 m_aTextListeners.addInterface( l );
3685 ::osl::MutexGuard aGuard(
m_aMutex );
3699 ::osl::MutexGuard aGuard(
m_aMutex );
3710 ::osl::MutexGuard aGuard(
m_aMutex );
3733 ::osl::MutexGuard aGuard(
m_aMutex );
3746 ::osl::MutexGuard aGuard(
m_aMutex );
3754 ::osl::MutexGuard aGuard(
m_aMutex );
3760 return css::awt::Selection(aSel.
Min(), aSel.
Max());
3765 ::osl::MutexGuard aGuard(
m_aMutex );
3772 ::osl::MutexGuard aGuard(
m_aMutex );
3780 ::osl::MutexGuard aGuard(
m_aMutex );
3787 ::osl::MutexGuard aGuard(
m_aMutex );
3805 css::awt::TextEvent
aEvent;
3822 lang::EventObject
aEvent( *
this );
3829 if (m_aTextListeners.getLength())
3837 ,m_pBox( & static_cast< CheckBoxControl& >( m_pCellControl->GetWindow() ) )
3844 if (!OComponentHelper::rBHelper.bDisposed)
3854 css::lang::EventObject aEvt(*
this);
3869 if ( !aReturn.hasValue() )
3878 return ::comphelper::concatSequences(
3887void SAL_CALL
FmXCheckBoxCell::addItemListener( const Reference< css::awt::XItemListener >& l )
3889 m_aItemListeners.addInterface( l );
3899 ::osl::MutexGuard aGuard(
m_aMutex );
3910 ::osl::MutexGuard aGuard(
m_aMutex );
3915 return static_cast<sal_Int16
>(
m_pBox->GetState());
3922 ::osl::MutexGuard aGuard(
m_aMutex );
3925 m_pBox->EnableTriState( b );
3959 m_pCellControl->Commit();
3961 Reference< XWindow > xKeepAlive(
this );
3962 if ( m_aItemListeners.getLength() && m_pBox )
3967 aEvent.Selected = m_pBox->GetState();
3968 m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged,
aEvent );
3970 if ( m_aActionListeners.getLength() )
3974 aEvent.ActionCommand = m_aActionCommand;
3975 m_aActionListeners.notifyEach( &awt::XActionListener::actionPerformed,
aEvent );
3983 , m_pBox(&static_cast<
svt::ListBoxControl&>(m_pCellControl->GetWindow()))
3984 , m_nLines(
Application::GetSettings().GetStyleSettings().GetListBoxMaximumLineCount())
3992 if (!OComponentHelper::rBHelper.bDisposed)
4002 css::lang::EventObject aEvt(*
this);
4016 if ( !aReturn.hasValue() )
4024 return ::comphelper::concatSequences(
4032void SAL_CALL
FmXListBoxCell::addItemListener(const Reference< css::awt::XItemListener >& l)
4034 m_aItemListeners.addInterface( l );
4054 ::osl::MutexGuard aGuard(
m_aMutex );
4064 ::osl::MutexGuard aGuard(
m_aMutex );
4068 sal_uInt16 nP =
nPos;
4069 for (
const auto& rItem : aItems )
4080 ::osl::MutexGuard aGuard(
m_aMutex );
4091 ::osl::MutexGuard aGuard(
m_aMutex );
4100 ::osl::MutexGuard aGuard(
m_aMutex );
4109 ::osl::MutexGuard aGuard(
m_aMutex );
4111 css::uno::Sequence<OUString>
aSeq;
4115 const sal_Int32 nEntries = rBox.
get_count();
4116 aSeq = css::uno::Sequence<OUString>( nEntries );
4117 for ( sal_Int32
n = nEntries;
n; )
4128 ::osl::MutexGuard aGuard(
m_aMutex );
4134 if (
nPos > SHRT_MAX ||
nPos < SHRT_MIN)
4135 throw std::out_of_range(
"awt::XListBox::getSelectedItemPos can only return a short");
4143 ::osl::MutexGuard aGuard(
m_aMutex );
4152 return { o3tl::narrowing<short>(nActive) };
4160 ::osl::MutexGuard aGuard(
m_aMutex );
4176 ::osl::MutexGuard aGuard(
m_aMutex );
4193 ::osl::MutexGuard aGuard(
m_aMutex );
4207 ::osl::MutexGuard aGuard(
m_aMutex );
4212 for ( sal_uInt16
n =
static_cast<sal_uInt16
>(aPositions.getLength());
n; )
4214 auto nPos =
static_cast<sal_uInt16
>(aPositions.getConstArray()[--
n]);
4225 ::osl::MutexGuard aGuard(
m_aMutex );
4240 ::osl::MutexGuard aGuard(
m_aMutex );
4247 ::osl::MutexGuard aGuard(
m_aMutex );
4254 ::osl::MutexGuard aGuard(
m_aMutex );
4260 ::osl::MutexGuard aGuard(
m_aMutex );
4281 css::awt::ItemEvent
aEvent;
4289 m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged,
aEvent );
4294 css::awt::ActionEvent
aEvent;
4306 ,m_pComboBox(&static_cast<
ComboBoxControl&>(m_pCellControl->GetWindow()))
4307 ,m_nLines(
Application::GetSettings().GetStyleSettings().GetListBoxMaximumLineCount())
4314 if ( !OComponentHelper::rBHelper.bDisposed )
4324 css::lang::EventObject aEvt(*
this);
4338 if ( !aReturn.hasValue() )
4346 return ::comphelper::concatSequences(
4356 m_aItemListeners.addInterface( l );
4377 ::osl::MutexGuard aGuard(
m_aMutex );
4386 ::osl::MutexGuard aGuard(
m_aMutex );
4390 sal_uInt16 nP =
Pos;
4391 for (
const auto& rItem : Items )
4401 ::osl::MutexGuard aGuard(
m_aMutex );
4405 for ( sal_uInt16
n =
Count;
n; )
4411 ::osl::MutexGuard aGuard(
m_aMutex );
4420 ::osl::MutexGuard aGuard(
m_aMutex );
4429 ::osl::MutexGuard aGuard(
m_aMutex );
4431 Sequence< OUString > aItems;
4435 const sal_Int32 nEntries = rBox.
get_count();
4436 aItems.realloc( nEntries );
4437 OUString* pItem = aItems.getArray();
4438 for ( sal_Int32
n=0;
n<nEntries; ++
n, ++pItem )
4446 ::osl::MutexGuard aGuard(
m_aMutex );
4452 ::osl::MutexGuard aGuard(
m_aMutex );
4474 m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged,
aEvent );
4486 if (!OComponentHelper::rBHelper.bDisposed)
4503 css::lang::EventObject aEvt(*
this);
4516 if ( !aReturn.hasValue() )
4525 return ::comphelper::concatSequences(
4536void SAL_CALL
FmXFilterCell::addTextListener(const Reference< css::awt::XTextListener >& l)
4538 m_aTextListeners.addInterface( l );
4549 ::osl::MutexGuard aGuard(
m_aMutex );
4559 ::osl::MutexGuard aGuard(
m_aMutex );
4574 return css::awt::Selection();
4597 css::awt::TextEvent aEvt;
4598 aEvt.Source = *
this;
4599 m_aTextListeners.notifyEach( &css::awt::XTextListener::textChanged, aEvt );
Reference< XComponentContext > m_xContext
const MouseSettings & GetMouseSettings() const
const LanguageTag & GetUILanguageTag() const
void SetMouseSettings(const MouseSettings &rSet)
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static const AllSettings & GetSettings()
sal_uInt16 GetColumnId(sal_uInt16 nPos) const
BrowserDataWin & GetDataWindow() const
sal_Int32 GetCurRow() const
void SetColumnTitle(sal_uInt16 nColumnId, const OUString &rTitle)
sal_uInt16 GetCurColumnId() const
weld::ComboBox * get_widget()
css::util::Date GetUNODate() const
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr)=0
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
void AlignControl(sal_Int16 nAlignment)
bool isTransparent() const
void implAdjustReadOnly(const css::uno::Reference< css::beans::XPropertySet > &_rxModel, bool i_bReadOnly)
updates the "readonly" setting on m_pWindow, according to the respective property value in the given ...
void setTransparent(bool _bSet)
void invalidatedController()
virtual bool commitControl()=0
commits the content of the control (e.g.
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pFieldChangeBroadcaster
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor)
void implAdjustEnabled(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)
updates the "enabled" setting on m_pWindow, according to the respective property value in the given m...
void unlockValueProperty()
unlocks the listening at the value property
const css::uno::Reference< css::sdbc::XRowSet > & getCursor() const
void doPropertyListening(const OUString &_rPropertyName)
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
VclPtr< svt::ControlBase > m_pWindow
VclPtr< svt::ControlBase > m_pPainter
void setAlignedController(bool _bAlign)
bool isAlignedController() const
bool isValuePropertyLocked() const
determined whether or not the value property is locked
double GetValue(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
virtual void PaintCell(OutputDevice &_rDev, const tools::Rectangle &_rRect)
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_pModelChangeBroadcaster
void implValuePropertyChanged()
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel)=0
updates the current content of the control (e.g.
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)
DbCellControl(DbGridColumn &_rColumn)
virtual ~DbCellControl() override
void implDoPropertyListening(const OUString &_rPropertyName, bool _bWarnIfNotExistent)
void lockValueProperty()
locks the listening at the value property.
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
DbCheckBox(DbGridColumn &_rColumn)
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual ::svt::CellControllerRef CreateController() const override
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
virtual bool commitControl() override
commits the content of the control (e.g.
DbComboBox(DbGridColumn &_rColumn)
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual bool commitControl() override
commits the content of the control (e.g.
virtual ::svt::CellControllerRef CreateController() const override
void SetList(const css::uno::Any &rItems)
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
virtual bool commitControl() override
commits the content of the control (e.g.
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour
DbCurrencyField(DbGridColumn &_rColumn)
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
DbDateField(DbGridColumn &_rColumn)
virtual bool commitControl() override
commits the content of the control (e.g.
void CreateControl(BrowserDataWin *pParent, const css::uno::Reference< css::beans::XPropertySet > &xModel)
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
css::uno::Sequence< OUString > m_aValueList
virtual bool commitControl() override
commits the content of the control (e.g.
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual void Update() override
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
DbFilterField(const css::uno::Reference< css::uno::XComponentContext > &rxContext, DbGridColumn &_rColumn)
virtual ::svt::CellControllerRef CreateController() const override
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect) override
void SetList(const css::uno::Any &rItems, bool bComboBox)
Link< DbFilterField &, void > m_aCommitLink
virtual ~DbFilterField() override
void SetText(const OUString &rText)
sal_Int16 m_nControlClass
DbGridControl & GetParent() const
void ImplInitWindow(vcl::Window const &rParent, const InitWindowFacet _eInitWhat)
sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign)
void SetReadOnly(bool bRead)
void UpdateFromField(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
OUString GetCellText(const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
void setModel(const css::uno::Reference< css::beans::XPropertySet > &_xModel)
sal_Int16 GetAlignment() const
::svt::CellControllerRef s_xEmptyController
rtl::Reference< FmXGridCell > m_pCell
void CreateControl(sal_Int32 _nFieldPos, const css::uno::Reference< css::beans::XPropertySet > &xField, sal_Int32 nTypeId)
sal_Int16 GetFieldPos() const
css::uno::Reference< css::beans::XPropertySet > m_xModel
DbGridControl & m_rParent
void setLock(bool _bLock)
css::uno::Reference< css::sdb::XColumn > GetCurrentFieldValue() const
sal_Int16 SetAlignment(sal_Int16 _nAlign)
const css::uno::Reference< css::beans::XPropertySet > & GetField() const
::svt::CellControllerRef m_xController
css::uno::Reference< css::beans::XPropertySet > m_xField
void Paint(OutputDevice &rDev, const tools::Rectangle &rRect, const DbGridRow *pRow, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
void impl_toggleScriptManager_nothrow(bool _bAttach)
attaches or detaches our cell object to the SctriptEventAttacherManager implemented by our model's pa...
const css::uno::Reference< css::beans::XPropertySet > & getModel() const
void refreshController(sal_uInt16 _nColId, GrantControlAccess _aAccess)
called when a controller needs to be re-initialized
CursorWrapper * getDataSource() const
const css::util::Date & getNullDate() const
const css::uno::Reference< css::util::XNumberFormatter > & getNumberFormatter() const
bool getDisplaySynchron() const
bool IsFilterMode() const
const DbGridRowRef & GetCurrentRow() const
const css::uno::Reference< css::uno::XComponentContext > & getContext() const
void RowModified(sal_Int32 nRow)
bool HasField(sal_uInt32 nPos) const
const ::svxform::DataColumn & GetField(sal_uInt32 nPos) const
a field which is bound to a column which supports the MaxTextLen property
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen)
void implSetMaxTextLen(sal_Int16 _nMaxLen)
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
DbLimitedLengthField(DbGridColumn &_rColumn)
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
css::uno::Sequence< OUString > m_aValueList
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
virtual bool commitControl() override
commits the content of the control (e.g.
DbListBox(DbGridColumn &_rColumn)
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
void SetList(const css::uno::Any &rItems)
virtual ::svt::CellControllerRef CreateController() const override
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
DbNumericField(DbGridColumn &_rColumn)
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
virtual bool commitControl() override
commits the content of the control (e.g.
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
virtual bool commitControl() override
DbCellControl.
DbPatternField(DbGridColumn &_rColumn, const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::svt::CellControllerRef CreateController() const override
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
OUString impl_formatText(const OUString &_rText)
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
DbSpinField(DbGridColumn &_rColumn, sal_Int16 _nStandardAlign=css::awt::TextAlign::RIGHT)
virtual ::svt::CellControllerRef CreateController() const override
sal_Int16 m_nStandardAlign
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &_rxCursor) override
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel)=0
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
virtual void implSetEffectiveMaxTextLen(sal_Int32 _nMaxLen) override
::svt::IEditImplementation * GetEditImplementation()
virtual void Init(BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) override
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual void PaintFieldToCell(OutputDevice &_rDev, const tools::Rectangle &_rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &_rxFormatter) override
DbTextField(DbGridColumn &_rColumn)
virtual bool commitControl() override
commits the content of the control (e.g.
bool IsMultiLineEdit() const
virtual ~DbTextField() override
virtual ::svt::CellControllerRef CreateController() const override
std::unique_ptr<::svt::IEditImplementation > m_pEdit
std::unique_ptr<::svt::IEditImplementation > m_pPainterImplementation
virtual void updateFromModel(css::uno::Reference< css::beans::XPropertySet > _rxModel) override
updates the current content of the control (e.g.
virtual void implAdjustGenericFieldSetting(const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
initializes everything which relates to the properties describing the numeric behaviour
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr) override
DbTimeField(DbGridColumn &_rColumn)
virtual VclPtr< svt::ControlBase > createField(BrowserDataWin *_pParent, bool bSpinButton, const css::uno::Reference< css::beans::XPropertySet > &_rxModel) override
virtual bool commitControl() override
commits the content of the control (e.g.
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
OUString m_aActionCommand
virtual void SAL_CALL disposing() override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
VclPtr<::svt::CheckBoxControl > m_pBox
virtual ~FmXCheckBoxCell() override
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
FmXCheckBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
virtual void SAL_CALL enableTriState(sal_Bool b) override
virtual void SAL_CALL setLabel(const OUString &Label) override
virtual sal_Int16 SAL_CALL getState() override
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
virtual void SAL_CALL setState(sal_Int16 n) override
virtual void SAL_CALL setActionCommand(const OUString &Command) override
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &Items, ::sal_Int16 Pos) override
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &Listener) override
virtual void SAL_CALL addItem(const OUString &Item, ::sal_Int16 Pos) override
virtual void SAL_CALL removeItems(::sal_Int16 nPos, ::sal_Int16 nCount) override
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
virtual ~FmXComboBoxCell() override
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &Listener) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual ::sal_Int16 SAL_CALL getDropDownLineCount() override
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
VclPtr<::svt::ComboBoxControl > m_pComboBox
FmXComboBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
virtual void SAL_CALL disposing() override
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &Listener) override
virtual ::sal_Int16 SAL_CALL getItemCount() override
virtual OUString SAL_CALL getItem(::sal_Int16 Pos) override
virtual void SAL_CALL setDropDownLineCount(::sal_Int16 Lines) override
void UpdateFromField(const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual void SAL_CALL setText(const OUString &aText) override
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent) override
FmXEditCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
virtual sal_Int16 SAL_CALL getMaxTextLen() override
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual OUString SAL_CALL getText() override
bool m_bOwnEditImplementation
virtual OUString SAL_CALL getSelectedText() override
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
::comphelper::OInterfaceContainerHelper3< css::awt::XTextListener > m_aTextListeners
virtual void SAL_CALL removeChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
virtual ~FmXEditCell() override
::svt::IEditImplementation * m_pEditImplementation
virtual sal_Bool SAL_CALL isEditable() override
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
virtual void SAL_CALL addChangeListener(const css::uno::Reference< css::form::XChangeListener > &aListener) override
virtual void SAL_CALL disposing() override
virtual css::awt::Selection SAL_CALL getSelection() override
::comphelper::OInterfaceContainerHelper3< css::form::XChangeListener > m_aChangeListeners
::comphelper::OInterfaceContainerHelper3< css::awt::XTextListener > m_aTextListeners
virtual ~FmXFilterCell() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) override
virtual void SAL_CALL setEditable(sal_Bool bEditable) override
virtual sal_Int16 SAL_CALL getMaxTextLen() override
virtual void SAL_CALL setSelection(const css::awt::Selection &aSelection) override
virtual void SAL_CALL setText(const OUString &aText) override
virtual OUString SAL_CALL getSelectedText() override
virtual void SAL_CALL insertText(const css::awt::Selection &Sel, const OUString &Text) override
virtual OUString SAL_CALL getText() override
void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect)
FmXFilterCell(DbGridColumn *pColumn, std::unique_ptr< DbFilterField > pControl)
virtual void SAL_CALL removeTextListener(const css::uno::Reference< css::awt::XTextListener > &l) override
virtual sal_Bool SAL_CALL isEditable() override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual css::awt::Selection SAL_CALL getSelection() override
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
virtual css::awt::Rectangle SAL_CALL getPosSize() override
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
::comphelper::OInterfaceContainerHelper3< css::awt::XKeyListener > m_aKeyListeners
virtual void SAL_CALL dispose() override
::comphelper::OInterfaceContainerHelper3< css::awt::XFocusListener > m_aFocusListeners
virtual void SAL_CALL setFocus() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL setEnable(sal_Bool Enable) override
virtual sal_Bool SAL_CALL getLock() override
virtual void onFocusLost(const css::awt::FocusEvent &_rEvent)
::comphelper::OInterfaceContainerHelper3< css::awt::XMouseMotionListener > m_aMouseMotionListeners
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
FmXGridCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
virtual void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
virtual void SAL_CALL setLock(sal_Bool _bLock) override
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual ~FmXGridCell() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
virtual void onFocusGained(const css::awt::FocusEvent &_rEvent)
::comphelper::OInterfaceContainerHelper3< css::awt::XMouseListener > m_aMouseListeners
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
::comphelper::OInterfaceContainerHelper3< css::awt::XWindowListener > m_aWindowListeners
virtual void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
virtual void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
virtual void SAL_CALL setPosSize(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags) override
virtual void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
virtual void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
svt::ControlBase * getEventWindow() const
virtual void SAL_CALL setVisible(sal_Bool Visible) override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
std::unique_ptr< DbCellControl > m_pCellControl
virtual sal_Bool SAL_CALL isMutipleMode() override
virtual ~FmXListBoxCell() override
virtual void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
virtual OUString SAL_CALL getItem(sal_Int16 nPos) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override
FmXListBoxCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override
virtual sal_Int16 SAL_CALL getDropDownLineCount() override
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &aItems, sal_Int16 nPos) override
virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
virtual void SAL_CALL selectItem(const OUString &aItem, sal_Bool bSelect) override
VclPtr<::svt::ListBoxControl > m_pBox
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Int16 SAL_CALL getItemCount() override
virtual OUString SAL_CALL getSelectedItem() override
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
virtual sal_Int16 SAL_CALL getSelectedItemPos() override
virtual void SAL_CALL makeVisible(sal_Int16 nEntry) override
virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 > &aPositions, sal_Bool bSelect) override
virtual void SAL_CALL disposing() override
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
virtual void SAL_CALL addItem(const OUString &aItem, sal_Int16 nPos) override
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override
virtual void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override
FmXTextCell(DbGridColumn *pColumn, std::unique_ptr< DbCellControl > pControl)
virtual void PaintFieldToCell(OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &xField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) override
OUString GetText(const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr)
sal_Int32 GetNumerator() const
sal_Int32 GetDenominator() const
LanguageType getLanguageType(bool bResolveSystem=true) const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
void SetWheelBehavior(MouseWheelBehaviour nBehavior)
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetTextColor(const Color &rColor)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const Color & GetTextColor() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
OutDevType GetOutDevType() const
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)
virtual vcl::Window * GetOwnerWindow() const
const Color & GetFillColor() const
void setX(tools::Long nX)
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
SelectionOptions GetSelectionOptions() const
StyleSettingsOptions GetOptions() const
const vcl::Font & GetFieldFont() const
void SetSelectionOptions(SelectionOptions nOptions)
void SetOptions(StyleSettingsOptions nOptions)
static css::awt::KeyEvent createKeyEvent(const ::KeyEvent &_rVclEvent, const css::uno::Reference< css::uno::XInterface > &_rxContext)
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
static css::awt::MouseEvent createMouseEvent(const ::MouseEvent &_rVclEvent, const css::uno::Reference< css::uno::XInterface > &_rxContext)
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
void SetMouseReleaseHdl(const Link< const MouseEvent &, void > &rHdl)
void SetMouseMoveHdl(const Link< const MouseEvent &, void > &rHdl)
void SetFocusOutHdl(const Link< LinkParamNone *, void > &rHdl)
void SetKeyReleaseHdl(const Link< const KeyEvent &, void > &rHdl)
void SetKeyInputHdl(const Link< const KeyEvent &, void > &rHdl)
void SetMousePressHdl(const Link< const MouseEvent &, void > &rHdl)
void SetFocusInHdl(const Link< LinkParamNone *, void > &rHdl)
virtual void DeactivateCell(bool bUpdate=true)
virtual void ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus=true)
virtual OUString GetText(LineEnd aSeparator) const=0
virtual void SetReadOnly(bool bReadOnly)=0
virtual void SetMaxTextLen(sal_Int32 _nMaxLen)=0
virtual bool IsReadOnly() const=0
virtual void SetSelection(const Selection &_rSelection)=0
virtual void ReplaceSelected(const OUString &_rStr)=0
virtual ControlBase & GetControl()=0
virtual Selection GetSelection() const=0
void SetAuxModifyHdl(const Link< LinkParamNone *, void > &rLink)
virtual sal_Int32 GetMaxTextLen() const=0
virtual void SetText(const OUString &_rStr)=0
virtual OUString GetSelected(LineEnd aSeparator) const=0
void SetFontSize(const Size &)
void SetTransparent(bool bTransparent)
void Merge(const Font &rFont)
const Size & GetFontSize() const
const Wallpaper & GetBackground() const
void SetStyle(WinBits nStyle)
bool IsControlFont() const
const Color & GetControlForeground() const
const Color & GetTextLineColor() const
bool IsControlForeground() const
const Fraction & GetZoom() const
const AllSettings & GetSettings() const
vcl::Font GetControlFont() const
::OutputDevice const * GetOutDev() const
bool IsTextLineColor() const
void SetSettings(const AllSettings &rSettings)
const Color & GetTextColor() const
bool IsRTLEnabled() const
bool IsControlBackground() const
const Color & GetControlBackground() const
virtual int find_text(const OUString &rStr) const=0
virtual OUString get_active_text() const=0
virtual void select_entry_region(int nStartPos, int nEndPos)=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
void append_text(const OUString &rStr)
virtual bool changed_by_direct_pick() const=0
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
void set_active_text(const OUString &rStr)
virtual SAL_DLLPRIVATE void SetMinValue(double dMin) override
virtual SAL_DLLPRIVATE void SetMaxValue(double dMin) override
virtual SAL_DLLPRIVATE void ClearMaxValue() override
weld::Entry & get_widget()
void SetEntrySelectionOptions(SelectionOptions eOptions)
virtual SAL_DLLPRIVATE void ClearMinValue() override
virtual SAL_DLLPRIVATE SelectionOptions GetEntrySelectionOptions() const override
virtual void select_region(int nStartPos, int nEndPos)=0
virtual void set_text(const OUString &rText)=0
virtual OUString get_text() const=0
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
OUString SvxResId(TranslateId aId)
virtual void SetText(const OUString &rStr) override
constexpr OUStringLiteral FM_PROP_READONLY
constexpr OUStringLiteral FM_PROP_DECIMAL_ACCURACY
constexpr OUStringLiteral FM_PROP_DATEFORMAT
constexpr OUStringLiteral FM_PROP_DATEMIN
constexpr OUStringLiteral FM_PROP_FORMATSSUPPLIER
constexpr OUStringLiteral FM_PROP_TIME
constexpr OUStringLiteral FM_PROP_CLASSID
constexpr OUStringLiteral FM_PROP_EFFECTIVE_DEFAULT
constexpr OUStringLiteral FM_PROP_EFFECTIVE_VALUE
constexpr OUStringLiteral FM_PROP_LITERALMASK
constexpr OUStringLiteral FM_PROP_BOUNDFIELD
constexpr OUStringLiteral FM_PROP_STRINGITEMLIST
constexpr OUStringLiteral FM_PROP_TIMEFORMAT
constexpr OUStringLiteral FM_PROP_MULTILINE
constexpr OUStringLiteral FM_PROP_ENABLED
constexpr OUStringLiteral FM_PROP_EDITMASK
constexpr OUStringLiteral FM_PROP_LINEENDFORMAT
constexpr OUStringLiteral FM_PROP_TEXT
constexpr OUStringLiteral FM_PROP_ESCAPE_PROCESSING
constexpr OUStringLiteral FM_PROP_ISREADONLY
constexpr OUStringLiteral FM_PROP_TIMEMAX
constexpr OUStringLiteral FM_PROP_NAME
constexpr OUStringLiteral FM_PROP_DATE_SHOW_CENTURY
constexpr OUStringLiteral FM_PROP_VALUEMIN
constexpr OUStringLiteral FM_PROP_VALUESTEP
constexpr OUStringLiteral FM_PROP_LINECOUNT
constexpr OUStringLiteral FM_PROP_ALIGN
constexpr OUStringLiteral FM_PROP_EFFECTIVE_MIN
constexpr OUStringLiteral FM_PROP_STRICTFORMAT
constexpr OUStringLiteral FM_PROP_MOUSE_WHEEL_BEHAVIOR
constexpr OUStringLiteral FM_PROP_STATE
constexpr OUStringLiteral FM_PROP_SHOWTHOUSANDSEP
constexpr OUStringLiteral FM_PROP_DATE
constexpr OUStringLiteral FM_PROP_VISUALEFFECT
constexpr OUStringLiteral FM_PROP_FIELDSOURCE
constexpr OUStringLiteral FM_PROP_DROPDOWN
constexpr OUStringLiteral FM_PROP_VALUEMAX
constexpr OUStringLiteral FM_PROP_FILTERPROPOSAL
constexpr OUStringLiteral FM_PROP_SPIN
constexpr OUStringLiteral FM_PROP_FORMATKEY
constexpr OUStringLiteral FM_PROP_AUTOINCREMENT
constexpr OUStringLiteral FM_PROP_MAXTEXTLEN
constexpr OUStringLiteral FM_PROP_VALUE_SEQ
constexpr OUStringLiteral FM_PROP_TABLENAME
constexpr OUStringLiteral FM_PROP_TRISTATE
constexpr OUStringLiteral FM_PROP_DATEMAX
constexpr OUStringLiteral FM_PROP_TIMEMIN
constexpr OUStringLiteral FM_PROP_FIELDTYPE
constexpr OUStringLiteral FM_PROP_VALUE
constexpr OUStringLiteral FM_PROP_SELECT_SEQ
constexpr OUStringLiteral FM_PROP_CURRENCYSYMBOL
constexpr OUStringLiteral FM_PROP_EFFECTIVE_MAX
constexpr OUStringLiteral INVALIDTEXT
IMPL_LINK(FmXGridCell, OnMousePress, const MouseEvent &, rEventData, void)
constexpr OUStringLiteral OBJECTTEXT
static void lcl_setCheckBoxState(const Reference< css::sdb::XColumn > &_rxField, CheckBoxControl *_pCheckBoxControl)
IMPL_LINK_NOARG(DbFilterField, OnToggle, weld::CheckButton &, void)
static void lcl_clearBroadCaster(rtl::Reference<::comphelper::OPropertyChangeMultiplexer > &_pBroadcaster)
#define TYPE_FORMATTEDFIELD
#define TYPE_NUMERICFIELD
#define TYPE_PATTERNFIELD
#define TYPE_CURRENCYFIELD
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
#define SAL_INFO(area, stream)
OString stripEnd(const OString &rIn, char c)
class SvxPropertySetInfoPool
bool hasProperty(const OUString &_rName, const Reference< XPropertySet > &_rxSet)
bool getBOOL(const Any &_rAny)
sal_Int16 getINT16(const Any &_rAny)
double getDouble(const Any &_rAny)
OUString getString(const Any &_rAny)
void checkDisposed(bool _bThrow)
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
IMPLEMENT_GET_IMPLEMENTATION_ID(DrawController)
Reference< XController > xController
Reference< XModel > xModel
const std::u16string_view aStringList[]