20#include <config_wasm_strip.h>
28#include <unordered_map>
34#include <rtl/ustrbuf.hxx>
106 if ( tmpSelected >= 0 )
124 while(cChar <= sub->GetRangeMax() && nMapIndex == 0)
127 [&cChar](
const std::pair<const sal_Int32, sal_UCS4>& rItem) { return rItem.second == cChar; });
129 nMapIndex = it->first;
187 std::unordered_map<sal_Int32, sal_UCS4>::const_iterator got =
m_aItemList.find (
i);
195 buf.appendUtf32(
sName);
196 OUString aCharStr(buf.makeStringAndClear());
198 int tx =
x + (
nX - nTextWidth + 1) / 2;
199 int ty =
y + (
nY - nTextHeight + 1) / 2;
200 Point aPointTxTy(tx, ty);
208 aPointTxTy.setX(
x - aBoundRect.
Left() + (
nX - aBoundRect.
GetWidth() + 1) / 2 );
211 aBoundRect += aPointTxTy;
214 int nYLDelta = aBoundRect.
Top() -
y;
215 int nYHDelta = (
y +
nY) - aBoundRect.
Bottom();
217 aPointTxTy.AdjustY( -(nYLDelta - 1) );
218 else if (nYHDelta <= 0)
219 aPointTxTy.AdjustY(nYHDelta - 1 );
222 int nXLDelta = aBoundRect.
Left() -
x;
223 int nXHDelta = (
x +
nX) - aBoundRect.
Right();
225 aPointTxTy.AdjustX( -(nXLDelta - 1) );
226 else if (nXHDelta <= 0)
227 aPointTxTy.AdjustX(nXHDelta - 1 );
247 rRenderContext.
DrawText(aPointTxTy, aCharStr);
261 rRenderContext.
DrawText(aPointTxTy, aCharStr);
276 rRenderContext.
DrawText(aPointTxTy, aCharStr);
381 else if (nOldPos !=
mxScrollArea->vadjustment_get_value())
404 assert(pItem->
m_xItem.is() &&
"No accessible created!");
405 Any aOldAny, aNewAny;
406 aNewAny <<= AccessibleStateType::FOCUSED;
409 pItem->
m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
411 aNewAny <<= AccessibleStateType::SELECTED;
412 pItem->
m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
429#if !ENABLE_WASM_STRIP_ACCESSIBILITY
430 OSL_ENSURE(
m_xAccessible.is(),
"Who wants to create a child of my table without a parent?");
432 auto xItem = std::make_shared<svx::SvxShowCharSetItem>(*
this,
436 std::unordered_map<sal_Int32,sal_UCS4>::const_iterator got =
m_aItemList.find (
_nPos);
438 buf.appendUtf32(got->second);
439 aFind->second->maText = buf.makeStringAndClear();
444 return aFind->second.get();
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
const vcl::KeyCode & GetKeyCode() const
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rNewFont)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
void SetTextColor(const Color &rColor)
bool GetFontCharMap(FontCharMapRef &rxFontCharMap) const
const Color & GetLineColor() const
const Color & GetTextColor() const
tools::Long GetTextHeight() 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)
const Color & GetFillColor() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetFieldTextColor() const
const Color & GetShadowColor() const
const Color & GetLightColor() const
const Color & GetHighlightColor() const
const Color & GetFaceColor() const
const Color & GetHighlightTextColor() const
const Color & GetDisableColor() const
sal_UCS4 GetRangeMin() const
virtual void DrawChars_Impl(vcl::RenderContext &rRenderContext, int n1, int n2) override
void SelectCharacter(const Subset *sub)
std::unordered_map< sal_Int32, sal_UCS4 > m_aItemList
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual ~SvxSearchCharSet() override
virtual void SelectIndex(int index, bool bFocus=false) override
void AppendCharToList(sal_UCS4 cChar)
virtual void RecalculateFont(vcl::RenderContext &rRenderContext) override
virtual sal_Int32 getMaxCharCount() const override
SvxSearchCharSet(std::unique_ptr< weld::ScrolledWindow > pScrolledWindow, const VclPtr< VirtualDevice > &rDevice)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual int LastInView() const override
virtual sal_UCS4 GetSelectCharacter() const override
virtual svx::SvxShowCharSetItem * ImplGetItem(int _nPos) override
FontCharMapRef mxFontCharMap
VclPtr< VirtualDevice > mxVirDev
void InitSettings(vcl::RenderContext &rRenderContext)
void getFavCharacterList()
Point MapIndexToPixel(int) const
Link< SvxShowCharSet *, void > aHighHdl
std::unique_ptr< weld::ScrolledWindow > mxScrollArea
Link< SvxShowCharSet *, void > aSelectHdl
bool isFavChar(std::u16string_view sTitle, std::u16string_view rFont)
Link< SvxShowCharSet *, void > aDoubleClkHdl
Link< SvxShowCharSet *, void > aPreSelectHdl
virtual bool KeyInput(const KeyEvent &) override
tools::Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize) const
rtl::Reference< svx::SvxShowCharSetAcc > m_xAccessible
void SetFontSize(const Size &)
void SetTransparent(bool bTransparent)
void SetWeight(FontWeight)
void SetAlignment(TextAlign)
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_END
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)
Simple struct to hold some information about the single items of the table.
css::uno::Reference< css::accessibility::XAccessible > GetAccessible()
rtl::Reference< SvxShowCharSetItemAcc > m_xItem