34#include <svx/strings.hrc>
38#include <bitmaps.hlst>
41#include <com/sun/star/beans/PropertyValue.hpp>
58 mpImpl->mnState = SignatureState::UNKNOWN;
60 mpImpl->maImage =
Image(StockImage::Yes, RID_SVXBMP_SIGNET);
61 mpImpl->maImageBroken =
Image(StockImage::Yes, RID_SVXBMP_SIGNET_BROKEN);
62 mpImpl->maImageNotValidated =
Image(StockImage::Yes, RID_SVXBMP_SIGNET_NOTVALIDATED);
71 if( SfxItemState::DEFAULT != eState )
73 mpImpl->mnState = SignatureState::UNKNOWN;
75 else if(
auto pUint16Item =
dynamic_cast< const SfxUInt16Item*
>(pState) )
81 SAL_WARN(
"svx.stbcrtls",
"+XmlSecStatusBarControl::StateChangedAtStatusBarControl(): invalid item type" );
82 mpImpl->mnState = SignatureState::UNKNOWN;
90 if (
mpImpl->mnState == SignatureState::OK )
91 pResId = RID_SVXSTR_XMLSEC_SIG_OK;
92 else if (
mpImpl->mnState == SignatureState::BROKEN )
93 pResId = RID_SVXSTR_XMLSEC_SIG_NOT_OK;
94 else if (
mpImpl->mnState == SignatureState::NOTVALIDATED )
95 pResId = RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY;
96 else if (
mpImpl->mnState == SignatureState::PARTIAL_OK )
97 pResId = RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG;
104 if( rCEvt.
GetCommand() == CommandEventId::ContextMenu )
109 std::unique_ptr<weld::Menu> xPopMenu(xBuilder->weld_menu(
"menu"));
110 if (!xPopMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
139 if(
mpImpl->mnState == SignatureState::OK )
144 else if(
mpImpl->mnState == SignatureState::BROKEN )
149 else if(
mpImpl->mnState == SignatureState::NOTVALIDATED
150 ||
mpImpl->mnState == SignatureState::PARTIAL_OK)
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
OUString GetURLPath(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
void DrawRect(const tools::Rectangle &rRect)
const Wallpaper & GetBackground() const
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
const Color & GetLineColor() const
const Color & GetFillColor() const
StatusBar & GetStatusBar() const
virtual void Command(const CommandEvent &rCEvt)
sal_uInt16 GetSlotId() const
void SetItemText(sal_uInt16 nItemId, const OUString &rText, int nCharsWidth=-1)
void SetQuickHelpText(sal_uInt16 nItemId, const OUString &rText)
void SetItemData(sal_uInt16 nItemId, void *pNewData)
vcl::RenderContext * GetRenderContext() const
const tools::Rectangle & GetRect() const
const Color & GetColor() const
std::unique_ptr< XmlSecStatusBarControl_Impl > mpImpl
virtual ~XmlSecStatusBarControl() override
virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
virtual void Paint(const UserDrawEvent &rEvt) override
XmlSecStatusBarControl(sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar &_rStb)
virtual void Command(const CommandEvent &rCEvt) override
OUString SvxResId(TranslateId aId)
#define SAL_WARN(area, stream)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
Image maImageNotValidated
SFX_IMPL_STATUSBAR_CONTROL(XmlSecStatusBarControl, SfxUInt16Item)