22#include <com/sun/star/inspection/PropertyControlType.hpp>
38 using ::com::sun::star::uno::Any;
39 using ::com::sun::star::uno::Type;
41 namespace PropertyControlType = ::com::sun::star::inspection::PropertyControlType;
46 sal_uInt16 nKey = rKeyEvent.GetKeyCode().GetCode();
49 m_xSpinButton->set_text(
"");
50 m_xEntry->set_text(
"");
66 rFieldFormatter.
SetValue( 1234.56789 );
80 , m_xSpinButton(m_xBuilder->weld_formatted_spin_button(
"sample"))
81 , m_xEntry(m_xBuilder->weld_entry(
"entry"))
92 sal_Int32 nFormatKey = 0;
93 if ( _rValue >>= nFormatKey )
101 OSL_ENSURE( pEntry,
"OFormatSampleControl::setValue: invalid format entry!" );
103 const bool bIsTextFormat = ( pEntry && pEntry->
IsTextFormat() );
117 double nValue = 1234.56789;
118 switch ( i_rEntry.
GetType() & ~SvNumFormatType::DEFINED )
120 case SvNumFormatType::DATE:
123 static css::util::Date STANDARD_DB_DATE(30,12,1899);
124 nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(aCurrentDate.
GetDate()),STANDARD_DB_DATE);
127 case SvNumFormatType::TIME:
128 case SvNumFormatType::DATETIME:
131 nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.
GetTime()));
144 DBG_ASSERT( pEntry,
"OFormattedNumericControl::SetFormatDescription: invalid format key!" );
145 double nValue = 1234.56789;
157 aPropValue <<= rFieldFormatter.
GetValue();
164 return ::cppu::UnoType<sal_Int32>::get();
199 return ::cppu::UnoType<double>::get();
204 bool bFallback =
true;
217 DBG_ASSERT( pEntry,
"OFormattedNumericControl::SetFormatDescription: invalid format key!" );
249 bool bSuccess = rValue >>= sURL;
265 return ::cppu::UnoType<OUString>::get();
sal_Int32 GetDate() const
static bool isGraphicObjectUniqueIdURL(std::u16string_view rURL)
void set_entry_text(const OUString &rStr)
const OUString & GetPlaceHolder() const
implements a base class for <type scope="css::inspection">XPropertyControl</type> implementations
TControlWindow * getTypedControlWindow()
OFileUrlControl(std::unique_ptr< SvtURLBox > xWidget, std::unique_ptr< weld::Builder > xBuilder, bool bReadOnly)
virtual css::uno::Any SAL_CALL getValue() override
virtual ~OFileUrlControl() override
virtual css::uno::Type SAL_CALL getValueType() override
virtual void SAL_CALL setValue(const css::uno::Any &_value) override
#define DBG_ASSERT(sCon, aError)
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_BACKSPACE
#define LINK(Instance, Class, Member)
a property handler for any virtual string properties
OUString PcrRes(TranslateId aId)
IMPL_LINK(OBrowserLine, OnButtonClicked, weld::Button &, rButton, void)
IMPL_LINK_NOARG(OBrowserLine, OnButtonFocus, weld::Widget &, void)