53#include <com/sun/star/accessibility/MSAAService.hpp>
55#include <config_features.h>
65 struct private_aImplSVData :
66 public rtl::Static<ImplSVData, private_aImplSVData> {};
68 struct private_aImplSVHelpData :
69 public rtl::Static<ImplSVHelpData, private_aImplSVHelpData> {};
72 struct private_aImplSVWinData :
73 public rtl::Static<ImplSVWinData, private_aImplSVWinData> {};
78 return &private_aImplSVData::get();
105 typedef ::std::map< basegfx::SystemDependentData_SharedPtr, sal_uInt32 > EntryMap;
111 std::unique_ptr<AutoTimer> maTimer;
117 SystemDependentDataBuffer(
const char* pDebugName)
120 maTimer->SetTimeout(1000);
121 maTimer->SetInvokeHandler(
LINK(
this, SystemDependentDataBuffer, implTimeoutHdl));
124 virtual ~SystemDependentDataBuffer()
override
131 std::unique_lock aGuard(m_aMutex);
132 EntryMap::iterator aFound(maEntries.find(rData));
134 if(aFound == maEntries.end())
136 if(maTimer && !maTimer->IsActive())
141 maEntries[rData] = rData->calculateCombinedHoldCyclesInSeconds();
147 std::unique_lock aGuard(m_aMutex);
148 EntryMap::iterator aFound(maEntries.find(rData));
150 if(aFound != maEntries.end())
152 maEntries.erase(aFound);
158 std::unique_lock aGuard(m_aMutex);
159 EntryMap::iterator aFound(maEntries.find(rData));
161 if(aFound != maEntries.end())
163 aFound->second = rData->calculateCombinedHoldCyclesInSeconds();
169 std::unique_lock aGuard(m_aMutex);
183 std::unique_lock aGuard(m_aMutex);
184 EntryMap::iterator aIter(maEntries.begin());
186 while(aIter != maEntries.end())
195 aIter = maEntries.erase(aIter);
199 if (maEntries.empty())
206 static SystemDependentDataBuffer aSystemDependentDataBuffer(
"vcl SystemDependentDataBuffer aSystemDependentDataBuffer");
208 return aSystemDependentDataBuffer;
235 SAL_INFO(
"vcl",
"ImplGetDefaultWindow(): No AppWindow" );
240 catch (
const css::uno::Exception&)
273 for (sal_uInt32
i = 0;
i < nUnits;
i++)
275 std::pair<OUString, FieldUnit> aElement(
VclResId(SV_FUNIT_STRINGS[
i].
first), SV_FUNIT_STRINGS[
i].second);
287 for (sal_uInt32
i = 0;
i < nUnits; ++
i)
290 return SV_FUNIT_STRINGS[
i].second;
292 return FieldUnit::NONE;
302 size_t nUnits = rUnits.size();
304 for (
size_t i = 0;
i < nUnits; ++
i)
306 OUString aUnit(rUnits[
i].
first);
307 aUnit = aUnit.replaceAll(
" ",
"");
308 aUnit = aUnit.toAsciiLowerCase();
309 std::pair<OUString, FieldUnit> aElement(aUnit, rUnits[
i].second);
335bool ImplInitAccessBridge()
342 if (!HasAtHook() && !getenv(
"SAL_FORCE_IACCESSIBLE2"))
344 SAL_INFO(
"vcl",
"Apparently no running AT -> "
345 "not enabling IAccessible2 integration");
351 = css::accessibility::MSAAService::create(xContext);
352 SAL_INFO(
"vcl",
"got IAccessible2 bridge");
354 }
catch (css::uno::DeploymentException &) {
357 "got no IAccessible2 bridge");
397 assert(pSVData !=
nullptr);
403 if (pSVData->
mpWinData == &private_aImplSVWinData::get())
411 pSVData->
mpWinData = &private_aImplSVWinData::get();
418 mpWinData = &private_aImplSVWinData::get();
434 rState.append(
"\nScaleCache:\t");
436 rState.append(
"\t items:");
441 rState.append(
"\n\t");
442 rState.append(
static_cast<sal_Int32
>(it->first.maDestSize.Width()));
444 rState.append(
static_cast<sal_Int32
>(it->first.maDestSize.Height()));
495 if (pSVData->
mpHelpData == &private_aImplSVHelpData::get())
503 pSVData->
mpHelpData = &private_aImplSVHelpData::get();
516 return private_aImplSVHelpData::get();
IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer *, void)
static SAL_DLLPRIVATE void LocaleSettingsChanged(ConfigurationHints nHint)
An auto-timer is a multi-shot timer re-emitting itself at interval until destroyed or stopped.
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
virtual SalSystem * CreateSalSystem()=0
virtual void SetText(const OUString &rStr) override
void reset(reference_type *pBody)
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
virtual void endUsage(basegfx::SystemDependentData_SharedPtr &rData)=0
virtual void flushAll()=0
virtual void startUsage(basegfx::SystemDependentData_SharedPtr &rData)=0
virtual void touchUsage(basegfx::SystemDependentData_SharedPtr &rData)=0
void remove_if(UnaryPredicate pred)
std::pair< Key, Value > key_value_pair_t
list_const_iterator_t begin() const
#define TOOLS_WARN_EXCEPTION(area, stream)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
void ImplDestroyHelpWindow(bool bUpdateHideTime)
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
std::unique_ptr< sal_Int32[]> pData
std::locale Create(std::string_view aPrefixName, const LanguageTag &rLocale)
OUString get(TranslateId sContextAndId, const std::locale &loc)
std::shared_ptr< SystemDependentData > SystemDependentData_SharedPtr
Reference< XComponentContext > getProcessComponentContext()
constexpr OUStringLiteral first
bool equalsAscii(std::u16string_view s1, std::string_view s2)
FieldUnit EnglishStringToMetric(std::u16string_view rEnglishMetricString)
FieldUnitStringList maCleanUnitStrings
FieldUnitStringList maFieldUnitStrings
ImplSVCtrlData maCtrlData
ImplSVFrameData maFrameData
std::unique_ptr< DockingManager > mpDockingManager
std::unique_ptr< BlendFrameCache > mpBlendFrameCache
ImplSVHelpData * mpHelpData
css::uno::Reference< css::lang::XComponent > mxAccessBridge
VclPtr< WorkWindow > mpDefaultWin
ImplSVWinData * mpWinData
void dumpState(rtl::OStringBuffer &rState)
std::unique_ptr< SalSystem > mpSalSystem
std::unique_ptr< vcl::SettingsConfigItem > mpSettingsConfigItem
std::unordered_map< int, OUString > maPaperNames
VclPtr< WorkWindow > mpAppWin
o3tl::lru_map< OUString, BitmapEx > maThemeImageCache
lru_scale_cache maScaleCache
o3tl::lru_map< OUString, gfx::DrawRoot > maThemeDrawCommandsCache
VclPtr< HelpTextWindow > mpHelpWin
VclPtr< vcl::Window > mpFocusWin
ImplSVWinData * CreateSVWinData()
SalSystem * ImplGetSalSystem()
ImplSVData * ImplGetSVData()
void DestroySVWinData(ImplSVWinData *pData)
void DestroySVHelpData(ImplSVHelpData *pSVHelpData)
const std::locale & ImplGetResLocale()
vcl::Window * ImplGetDefaultWindow()
Returns either the application window, or the default GL context window.
BlendFrameCache * ImplGetBlendFrameCache()
ImplSVHelpData & ImplGetSVHelpData()
void SetSVHelpData(ImplSVHelpData *pSVHelpData)
void SetSVWinData(ImplSVWinData *pSVWinData)
const FieldUnitStringList & ImplGetFieldUnits()
DockingManager * ImplGetDockingManager()
OUString VclResId(TranslateId aId)
ImplSVHelpData * CreateSVHelpData()
const FieldUnitStringList & ImplGetCleanedFieldUnits()
vcl::Window * ImplGetDefaultContextWindow()
returns the default window created to hold the persistent VCL GL context.
basegfx::SystemDependentDataManager & ImplGetSystemDependentDataManager()
std::vector< std::pair< OUString, FieldUnit > > FieldUnitStringList
WinBits const WB_DEFAULTWIN