Add bits to change appearance of the edit box upon invalid references.
This commit is contained in:
parent
81d22042d2
commit
19e769e697
@ -34,10 +34,9 @@
|
||||
#include <vcl/edit.hxx>
|
||||
#include "formula/formuladllapi.h"
|
||||
|
||||
namespace formula {
|
||||
|
||||
namespace formula
|
||||
{
|
||||
class IControlReferenceHandler;
|
||||
class IControlReferenceHandler;
|
||||
|
||||
class FORMULA_DLLPUBLIC RefEdit : public Edit
|
||||
{
|
||||
@ -59,6 +58,13 @@ public:
|
||||
virtual ~RefEdit();
|
||||
|
||||
void SetRefString( const XubString& rStr );
|
||||
|
||||
/**
|
||||
* Flag reference valid or invalid, which in turn changes the visual
|
||||
* appearance of the control accordingly.
|
||||
*/
|
||||
void SetRefValid(bool bValid);
|
||||
|
||||
using Edit::SetText;
|
||||
virtual void SetText( const XubString& rStr );
|
||||
virtual void Modify();
|
||||
@ -100,6 +106,7 @@ public:
|
||||
};
|
||||
|
||||
} // formula
|
||||
|
||||
#endif // FORMULA_FUNCUTL_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -954,6 +954,20 @@ void RefEdit::SetRefString( const XubString& rStr )
|
||||
Edit::SetText( rStr );
|
||||
}
|
||||
|
||||
void RefEdit::SetRefValid(bool bValid)
|
||||
{
|
||||
if (bValid)
|
||||
{
|
||||
SetControlForeground();
|
||||
SetControlBackground();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetControlForeground(COL_WHITE);
|
||||
SetControlBackground(0xff6563);
|
||||
}
|
||||
}
|
||||
|
||||
void RefEdit::SetText( const XubString& rStr )
|
||||
{
|
||||
Edit::SetText( rStr );
|
||||
|
Loading…
x
Reference in New Issue
Block a user