LibreOffice Module svtools (master) 1
colorcfg.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <string_view>
23
24#include <svtools/colorcfg.hxx>
25#include <com/sun/star/uno/Any.hxx>
26#include <com/sun/star/uno/Sequence.hxx>
27#include <com/sun/star/beans/PropertyValue.hpp>
33#include <com/sun/star/uno/Sequence.h>
34#include <svl/poolitem.hxx>
35#include <mutex>
36#include <vcl/window.hxx>
37
38#include "itemholder2.hxx"
39
40#include <vcl/svapp.hxx>
41#include <vcl/event.hxx>
42#include <vcl/settings.hxx>
43#include <officecfg/Office/UI.hxx>
44
45using namespace utl;
46using namespace com::sun::star;
47
48const char g_sIsVisible[] = "/IsVisible";
49
50
51namespace svtools
52{
53
54static sal_Int32 nColorRefCount_Impl = 0;
55namespace
56{
57 std::mutex& ColorMutex_Impl()
58 {
59 static std::mutex SINGLETON;
60 return SINGLETON;
61 }
62}
63
64ColorConfig_Impl* ColorConfig::m_pImpl = nullptr;
65
67{
70
71 virtual void ImplCommit() override;
72
73public:
74 explicit ColorConfig_Impl();
75 virtual ~ColorConfig_Impl() override;
76
77 void Load(const OUString& rScheme);
79 //changes the name of the current scheme but doesn't load it!
80 void SetCurrentSchemeName(const OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;}
81 virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) override;
82
84 {return m_aConfigValues[eValue];}
86 const ColorConfigValue& rValue );
87
88 const OUString& GetLoadedScheme() const {return m_sLoadedScheme;}
89
90 uno::Sequence< OUString> GetSchemeNames();
91
92 void AddScheme(const OUString& rNode);
93 void RemoveScheme(const OUString& rNode);
94 using ConfigItem::SetModified;
95 using ConfigItem::ClearModified;
96 void SettingsChanged();
97
98 DECL_LINK( DataChangedEventListener, VclSimpleEvent&, void );
99};
100
101namespace {
102
103uno::Sequence< OUString> GetPropertyNames(std::u16string_view rScheme)
104{
105 struct ColorConfigEntryData_Impl
106 {
107 std::u16string_view cName;
108 bool bCanBeVisible;
109 };
110 static const ColorConfigEntryData_Impl cNames[] =
111 {
112 { std::u16string_view(u"/DocColor") ,false },
113 { std::u16string_view(u"/DocBoundaries") ,true },
114 { std::u16string_view(u"/AppBackground") ,false },
115 { std::u16string_view(u"/ObjectBoundaries"),true },
116 { std::u16string_view(u"/TableBoundaries") ,true },
117 { std::u16string_view(u"/FontColor") ,false },
118 { std::u16string_view(u"/Links") ,true },
119 { std::u16string_view(u"/LinksVisited") ,true },
120 { std::u16string_view(u"/Spell") ,false },
121 { std::u16string_view(u"/Grammar") ,false },
122 { std::u16string_view(u"/SmartTags") ,false },
123 { std::u16string_view(u"/Shadow") , true },
124 { std::u16string_view(u"/WriterTextGrid") ,false },
125 { std::u16string_view(u"/WriterFieldShadings"),true },
126 { std::u16string_view(u"/WriterIdxShadings") ,true },
127 { std::u16string_view(u"/WriterDirectCursor") ,true },
128 { std::u16string_view(u"/WriterScriptIndicator") ,false },
129 { std::u16string_view(u"/WriterSectionBoundaries") ,true },
130 { std::u16string_view(u"/WriterHeaderFooterMark") ,false },
131 { std::u16string_view(u"/WriterPageBreaks") ,false },
132 { std::u16string_view(u"/HTMLSGML") ,false },
133 { std::u16string_view(u"/HTMLComment") ,false },
134 { std::u16string_view(u"/HTMLKeyword") ,false },
135 { std::u16string_view(u"/HTMLUnknown") ,false },
136 { std::u16string_view(u"/CalcGrid") ,false },
137 { std::u16string_view(u"/CalcPageBreak"), false },
138 { std::u16string_view(u"/CalcPageBreakManual"), false },
139 { std::u16string_view(u"/CalcPageBreakAutomatic"), false },
140 { std::u16string_view(u"/CalcHiddenColRow"), true },
141 { std::u16string_view(u"/CalcTextOverflow"), true },
142 { std::u16string_view(u"/CalcComments"), false },
143 { std::u16string_view(u"/CalcDetective") ,false },
144 { std::u16string_view(u"/CalcDetectiveError") ,false },
145 { std::u16string_view(u"/CalcReference") ,false },
146 { std::u16string_view(u"/CalcNotesBackground") ,false },
147 { std::u16string_view(u"/CalcValue") ,false },
148 { std::u16string_view(u"/CalcFormula") ,false },
149 { std::u16string_view(u"/CalcText") ,false },
150 { std::u16string_view(u"/CalcProtectedBackground") ,false },
151 { std::u16string_view(u"/DrawGrid") ,true },
152 { std::u16string_view(u"/BASICEditor"), false },
153 { std::u16string_view(u"/BASICIdentifier"), false },
154 { std::u16string_view(u"/BASICComment") , false },
155 { std::u16string_view(u"/BASICNumber") , false },
156 { std::u16string_view(u"/BASICString") , false },
157 { std::u16string_view(u"/BASICOperator") , false },
158 { std::u16string_view(u"/BASICKeyword") , false },
159 { std::u16string_view(u"/BASICError"), false },
160 { std::u16string_view(u"/SQLIdentifier"), false },
161 { std::u16string_view(u"/SQLNumber"), false },
162 { std::u16string_view(u"/SQLString"), false },
163 { std::u16string_view(u"/SQLOperator"), false },
164 { std::u16string_view(u"/SQLKeyword"), false },
165 { std::u16string_view(u"/SQLParameter"), false },
166 { std::u16string_view(u"/SQLComment"), false }
167 };
168
169 uno::Sequence<OUString> aNames(2 * ColorConfigEntryCount);
170 OUString* pNames = aNames.getArray();
171 int nIndex = 0;
172 OUString sBase = "ColorSchemes/"
174 for(sal_Int32 i = 0; i < ColorConfigEntryCount; ++i)
175 {
176 OUString sBaseName = sBase + cNames[i].cName;
177 pNames[nIndex++] = sBaseName + "/Color";
178 if(cNames[i].bCanBeVisible)
179 {
180 pNames[nIndex++] = sBaseName + g_sIsVisible;
181 }
182 }
183 aNames.realloc(nIndex);
184 return aNames;
185}
186
187}
188
190 ConfigItem("Office.UI/ColorScheme")
191{
192 //try to register on the root node - if possible
193 uno::Sequence < OUString > aNames(1);
194 EnableNotification( aNames );
195
197 Load(OUString());
198
199 ::Application::AddEventListener( LINK(this, ColorConfig_Impl, DataChangedEventListener) );
200
201}
202
204{
205 ::Application::RemoveEventListener( LINK(this, ColorConfig_Impl, DataChangedEventListener) );
206}
207
208void ColorConfig_Impl::Load(const OUString& rScheme)
209{
210 OUString sScheme(rScheme);
211 if(sScheme.isEmpty())
212 {
213 //detect current scheme name
214 uno::Sequence < OUString > aCurrent { "CurrentColorScheme" };
215 uno::Sequence< uno::Any > aCurrentVal = GetProperties( aCurrent );
216 aCurrentVal.getConstArray()[0] >>= sScheme;
217 }
218 m_sLoadedScheme = sScheme;
219
220 uno::Sequence < OUString > aColorNames = GetPropertyNames(sScheme);
221 uno::Sequence< uno::Any > aColors = GetProperties( aColorNames );
222 const uno::Any* pColors = aColors.getConstArray();
223 const OUString* pColorNames = aColorNames.getConstArray();
224 sal_Int32 nIndex = 0;
225 for(int i = 0; i < ColorConfigEntryCount && aColors.getLength() > nIndex; ++i)
226 {
227 if(pColors[nIndex].hasValue())
228 {
229 Color nTmp;
230 pColors[nIndex] >>= nTmp;
231 m_aConfigValues[i].nColor = nTmp;
232 }
233 else
235 nIndex++;
236 if(nIndex >= aColors.getLength())
237 break;
238 //test for visibility property
239 if(pColorNames[nIndex].endsWith(g_sIsVisible))
241 }
242}
243
244void ColorConfig_Impl::Notify( const uno::Sequence<OUString>& )
245{
246 //loading via notification always uses the default setting
247 Load(OUString());
248 NotifyListeners(ConfigurationHints::NONE);
249}
250
252{
253 uno::Sequence < OUString > aColorNames = GetPropertyNames(m_sLoadedScheme);
254 uno::Sequence < beans::PropertyValue > aPropValues(aColorNames.getLength());
255 beans::PropertyValue* pPropValues = aPropValues.getArray();
256 const OUString* pColorNames = aColorNames.getConstArray();
257 sal_Int32 nIndex = 0;
258 for(int i = 0; i < ColorConfigEntryCount && aColorNames.getLength() > nIndex; ++i)
259 {
260 pPropValues[nIndex].Name = pColorNames[nIndex];
261 //save automatic colors as void value
262 if(m_aConfigValues[i].nColor != COL_AUTO)
263 pPropValues[nIndex].Value <<= m_aConfigValues[i].nColor;
264
265 nIndex++;
266 if(nIndex >= aColorNames.getLength())
267 break;
268 //test for visibility property
269 if(pColorNames[nIndex].endsWith(g_sIsVisible))
270 {
271 pPropValues[nIndex].Name = pColorNames[nIndex];
272 pPropValues[nIndex].Value <<= m_aConfigValues[i].bIsVisible;
273 nIndex++;
274 }
275 }
276 SetSetProperties("ColorSchemes", aPropValues);
277
279}
280
282{
283 //save current scheme name
284 uno::Sequence < OUString > aCurrent { "CurrentColorScheme" };
285 uno::Sequence< uno::Any > aCurrentVal(1);
286 aCurrentVal.getArray()[0] <<= m_sLoadedScheme;
287 PutProperties(aCurrent, aCurrentVal);
288}
289
291{
292 if(rValue != m_aConfigValues[eValue])
293 {
294 m_aConfigValues[eValue] = rValue;
295 SetModified();
296 }
297}
298
299uno::Sequence< OUString> ColorConfig_Impl::GetSchemeNames()
300{
301 return GetNodeNames("ColorSchemes");
302}
303
304void ColorConfig_Impl::AddScheme(const OUString& rScheme)
305{
306 if(ConfigItem::AddNode("ColorSchemes", rScheme))
307 {
308 m_sLoadedScheme = rScheme;
309 Commit();
310 }
311}
312
313void ColorConfig_Impl::RemoveScheme(const OUString& rScheme)
314{
315 uno::Sequence< OUString > aElements { rScheme };
316 ClearNodeElements("ColorSchemes", aElements);
317}
318
320{
321 SolarMutexGuard aVclGuard;
322
323 NotifyListeners(ConfigurationHints::NONE);
324}
325
326IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent, void )
327{
328 if ( rEvent.GetId() == VclEventId::ApplicationDataChanged )
329 {
330 DataChangedEvent* pData = static_cast<DataChangedEvent*>(static_cast<VclWindowEvent&>(rEvent).GetData());
331 if ( (pData->GetType() == DataChangedEventType::SETTINGS) &&
332 (pData->GetFlags() & AllSettingsFlags::STYLE) )
333 {
335 }
336 }
337}
338
340{
342 return;
343 std::unique_lock aGuard( ColorMutex_Impl() );
344 if ( !m_pImpl )
345 {
347 aGuard.unlock(); // because holdConfigItem will call this constructor
348 svtools::ItemHolder2::holdConfigItem(EItem::ColorConfig);
349 }
351 m_pImpl->AddListener(this);
352}
353
355{
357 return;
358 std::unique_lock aGuard( ColorMutex_Impl() );
359 m_pImpl->RemoveListener(this);
361 {
362 delete m_pImpl;
363 m_pImpl = nullptr;
364 }
365}
366
368{
369 enum ColorType { clLight = 0,
370 clDark,
371 nColorTypes };
372
373 static const Color cAutoColors[][nColorTypes] =
374 {
375 { COL_WHITE, Color(0x1C1C1C) }, // DOCCOLOR
376 { COL_LIGHTGRAY, Color(0x808080) }, // DOCBOUNDARIES
377 { Color(0xDFDFDE), Color(0x333333) }, // APPBACKGROUND
378 { COL_LIGHTGRAY, Color(0x808080) }, // OBJECTBOUNDARIES
379 { COL_LIGHTGRAY, Color(0x1C1C1C) }, // TABLEBOUNDARIES
380 { COL_BLACK, COL_BLACK }, // FONTCOLOR
381 { COL_BLUE, Color(0x1D99F3) }, // LINKS
382 { Color(0x0000cc), Color(0x9B59B6) }, // LINKSVISITED
383 { COL_LIGHTRED, Color(0xC9211E) }, // SPELL
384 { COL_LIGHTBLUE, Color(0x729FCF) }, // GRAMMAR
385 { COL_LIGHTMAGENTA, Color(0x780373) }, // SMARTTAGS
386 { COL_GRAY, Color(0x1C1C1C) }, // SHADOWCOLOR
387 { COL_LIGHTGRAY, Color(0x808080) }, // WRITERTEXTGRID
388 { COL_LIGHTGRAY, COL_LIGHTGRAY }, // WRITERFIELDSHADING
389 { COL_LIGHTGRAY, Color(0x1C1C1C) }, // WRITERIDXSHADINGS
390 { COL_BLACK, COL_BLACK }, // WRITERDIRECTCURSOR
391 { COL_GREEN, Color(0x1E6A39) }, // WRITERSCRIPTINDICATOR
392 { COL_LIGHTGRAY, Color(0x666666) }, // WRITERSECTIONBOUNDARIES
393 { Color(0x0369a3), Color(0xB4C7DC) }, // WRITERHEADERFOOTERMARK
394 { COL_BLUE, Color(0x729FCF) }, // WRITERPAGEBREAKS
395 { COL_LIGHTBLUE, COL_LIGHTBLUE }, // HTMLSGML
396 { COL_LIGHTGREEN, COL_LIGHTGREEN }, // HTMLCOMMENT
397 { COL_LIGHTRED, COL_LIGHTRED }, // HTMLKEYWORD
398 { COL_GRAY, COL_GRAY }, // HTMLUNKNOWN
399 { COL_GRAY3, COL_GRAY7 }, // CALCGRID
400 { COL_BLUE, COL_BLUE }, // CALCPAGEBREAK
401 { Color(0x2300dc), Color(0x2300DC) }, // CALCPAGEBREAKMANUAL
402 { COL_GRAY7, COL_GRAY7 }, // CALCPAGEBREAKAUTOMATIC
403 { Color(0x2300dc), Color(0x2300DC) }, // CALCHIDDENCOLROW
404 { COL_LIGHTRED, COL_LIGHTRED }, // CALCTEXTOVERFLOW
405 { COL_LIGHTMAGENTA, COL_LIGHTMAGENTA}, // CALCCOMMENT
406 { COL_LIGHTBLUE, Color(0x355269) }, // CALCDETECTIVE
407 { COL_LIGHTRED, Color(0xC9211E) }, // CALCDETECTIVEERROR
408 { Color(0xef0fff), Color(0x0D23D5) }, // CALCREFERENCE
409 { Color(0xffffc0), Color(0xE8A202) }, // CALCNOTESBACKGROUND
410 { COL_LIGHTBLUE, Color(0x729FCF) }, // CALCVALUE
411 { COL_GREEN, Color(0x77BC65) }, // CALCFORMULA
412 { COL_BLACK, Color(0xEEEEEE) }, // CALCTEXT
413 { COL_LIGHTGRAY, Color(0x1C1C1C) }, // CALCPROTECTEDBACKGROUND
414 { COL_GRAY7, COL_GRAY7 }, // DRAWGRID
415 { COL_WHITE, Color(0x1C1C1C) }, // BASICEDITOR
416 { COL_GREEN, Color(0xDDE8CB) }, // BASICIDENTIFIER
417 { COL_GRAY, Color(0xEEEEEE) }, // BASICCOMMENT
418 { COL_LIGHTRED, Color(0xFFA6A6) }, // BASICNUMBER
419 { COL_LIGHTRED, Color(0xFFA6A6) }, // BASICSTRING
420 { COL_BLUE, Color(0xB4C7DC) }, // BASICOPERATOR
421 { COL_BLUE, Color(0xB4C7DC) }, // BASICKEYWORD
422 { COL_RED, Color(0xFF3838) }, // BASICERROR
423 { Color(0x009900), Color(0x009900) }, // SQLIDENTIFIER
424 { COL_BLACK, COL_BLACK }, // SQLNUMBER
425 { Color(0xCE7B00), Color(0xCE7B00) }, // SQLSTRING
426 { COL_BLACK, COL_BLACK }, // SQLOPERATOR
427 { Color(0x0000E6), Color(0x0000E6) }, // SQLKEYWORD
428 { Color(0x259D9D), Color(0x259D9D) }, // SQLPARAMETER
429 { COL_GRAY, COL_GRAY }, // SQLCOMMENT
430 };
431 Color aRet;
432 switch(eEntry)
433 {
434 case APPBACKGROUND :
436 break;
437
438 case LINKS :
440 break;
441
442 case LINKSVISITED :
444 break;
445
446 default:
447 int nAppMod;
449 default:
451 nAppMod = clDark;
452 else
453 nAppMod = clLight;
454 break;
455 case 1: nAppMod = clLight; break;
456 case 2: nAppMod = clDark; break;
457 }
458 aRet = cAutoColors[eEntry][nAppMod];
459 }
460 // fdo#71511: if in a11y HC mode, do pull background color from theme
461 if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
462 {
463 switch(eEntry)
464 {
465 case DOCCOLOR :
467 break;
468 case FONTCOLOR :
470 break;
471 default:
472 break;
473 }
474 }
475 return aRet;
476}
477
479{
480 ColorConfigValue aRet;
481
482 if (m_pImpl)
483 aRet = m_pImpl->GetColorConfigValue(eEntry);
484
485 if (bSmart && aRet.nColor == COL_AUTO)
487
488 return aRet;
489}
490
492{
493 officecfg::Office::UI::ColorScheme::CurrentColorScheme::get();
494 return m_pImpl->GetLoadedScheme();
495}
496
499 m_bModified(false)
500{
501 m_pImpl->BlockBroadcasts(true);
502}
503
505{
506 m_pImpl->BlockBroadcasts(false);
507 if(m_bModified)
508 m_pImpl->SetModified();
509 if(m_pImpl->IsModified())
510 m_pImpl->Commit();
511}
512
513uno::Sequence< OUString > EditableColorConfig::GetSchemeNames() const
514{
515 return m_pImpl->GetSchemeNames();
516}
517
518void EditableColorConfig::DeleteScheme(const OUString& rScheme )
519{
520 m_pImpl->RemoveScheme(rScheme);
521}
522
523void EditableColorConfig::AddScheme(const OUString& rScheme )
524{
525 m_pImpl->AddScheme(rScheme);
526}
527
528void EditableColorConfig::LoadScheme(const OUString& rScheme )
529{
530 if(m_bModified)
531 m_pImpl->SetModified();
532 if(m_pImpl->IsModified())
533 m_pImpl->Commit();
534 m_bModified = false;
535 m_pImpl->Load(rScheme);
536 //the name of the loaded scheme has to be committed separately
537 m_pImpl->CommitCurrentSchemeName();
538}
539
541{
542 return m_pImpl->GetLoadedScheme();
543}
544
545// Changes the name of the current scheme but doesn't load it!
546void EditableColorConfig::SetCurrentSchemeName(const OUString& rScheme)
547{
548 m_pImpl->SetCurrentSchemeName(rScheme);
549 m_pImpl->CommitCurrentSchemeName();
550}
551
553 ColorConfigEntry eEntry)const
554{
555 return m_pImpl->GetColorConfigValue(eEntry);
556}
557
559 ColorConfigEntry eEntry, const ColorConfigValue& rValue)
560{
561 m_pImpl->SetColorConfigValue(eEntry, rValue);
562 m_pImpl->ClearModified();
563 m_bModified = true;
564}
565
567{
568 m_bModified = true;
569}
570
572{
573 if(m_bModified)
574 m_pImpl->SetModified();
575 if(m_pImpl->IsModified())
576 m_pImpl->Commit();
577 m_bModified = false;
578}
579
581{
582 m_pImpl->BlockBroadcasts(true);
583}
584
586{
587 m_pImpl->BlockBroadcasts(false);
588}
589
590
591}//namespace svtools
592
593/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
const StyleSettings & GetStyleSettings() const
static void AddEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
static const AllSettings & GetSettings()
static void RemoveEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
static int GetAppColorMode()
static bool GetUseDarkMode()
const Color & GetWindowColor() const
const Color & GetWorkspaceColor() const
const Color & GetWindowTextColor() const
const Color & GetLinkColor() const
const Color & GetVisitedLinkColor() const
void RemoveScheme(const OUString &rNode)
Definition: colorcfg.cxx:313
void SetColorConfigValue(ColorConfigEntry eValue, const ColorConfigValue &rValue)
Definition: colorcfg.cxx:290
void SetCurrentSchemeName(const OUString &rSchemeName)
Definition: colorcfg.cxx:80
virtual ~ColorConfig_Impl() override
Definition: colorcfg.cxx:203
ColorConfigValue m_aConfigValues[ColorConfigEntryCount]
Definition: colorcfg.cxx:68
DECL_LINK(DataChangedEventListener, VclSimpleEvent &, void)
const ColorConfigValue & GetColorConfigValue(ColorConfigEntry eValue) const
Definition: colorcfg.cxx:83
void AddScheme(const OUString &rNode)
Definition: colorcfg.cxx:304
uno::Sequence< OUString > GetSchemeNames()
Definition: colorcfg.cxx:299
virtual void Notify(const uno::Sequence< OUString > &aPropertyNames) override
Definition: colorcfg.cxx:244
const OUString & GetLoadedScheme() const
Definition: colorcfg.cxx:88
void Load(const OUString &rScheme)
Definition: colorcfg.cxx:208
virtual void ImplCommit() override
Definition: colorcfg.cxx:251
static ColorConfig_Impl * m_pImpl
Definition: colorcfg.hxx:106
static const OUString & GetCurrentSchemeName()
Definition: colorcfg.cxx:491
virtual ~ColorConfig() override
Definition: colorcfg.cxx:354
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
Definition: colorcfg.cxx:478
friend class ColorConfig_Impl
Definition: colorcfg.hxx:104
static Color GetDefaultColor(ColorConfigEntry eEntry)
Definition: colorcfg.cxx:367
css::uno::Sequence< OUString > GetSchemeNames() const
Definition: colorcfg.cxx:513
const OUString & GetCurrentSchemeName() const
Definition: colorcfg.cxx:540
void SetCurrentSchemeName(const OUString &rScheme)
Definition: colorcfg.cxx:546
void SetColorValue(ColorConfigEntry eEntry, const ColorConfigValue &rValue)
Definition: colorcfg.cxx:558
void LoadScheme(const OUString &rScheme)
Definition: colorcfg.cxx:528
void DeleteScheme(const OUString &rScheme)
Definition: colorcfg.cxx:518
std::unique_ptr< ColorConfig_Impl > m_pImpl
Definition: colorcfg.hxx:120
const ColorConfigValue & GetColorValue(ColorConfigEntry eEntry) const
Definition: colorcfg.cxx:552
void AddScheme(const OUString &rScheme)
Definition: colorcfg.cxx:523
static void holdConfigItem(EItem eItem)
Definition: itemholder2.cxx:73
static bool PutProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues, bool bAllLocales)
static bool SetSetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
bool ClearNodeElements(const OUString &rNode, css::uno::Sequence< OUString > const &rElements)
static css::uno::Sequence< OUString > GetNodeNames(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, ConfigNameFormat eFormat)
static bool IsFuzzing()
void AddListener(utl::ConfigurationListener *pListener)
void RemoveListener(utl::ConfigurationListener const *pListener)
void NotifyListeners(ConfigurationHints nHint)
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_GRAY3(0xCC, 0xCC, 0xCC)
constexpr ::Color COL_GREEN(0x00, 0x80, 0x00)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_GRAY7(0x66, 0x66, 0x66)
constexpr ::Color COL_LIGHTMAGENTA(0xFF, 0x00, 0xFF)
constexpr ::Color COL_RED(0x80, 0x00, 0x00)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_LIGHTBLUE(0x00, 0x00, 0xFF)
constexpr ::Color COL_LIGHTGREEN(0x00, 0xFF, 0x00)
constexpr ::Color COL_BLUE(0x00, 0x00, 0x80)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
const char g_sIsVisible[]
Definition: colorcfg.cxx:48
sal_Int32 nIndex
std::unique_ptr< sal_Int32[]> pData
int i
ColorType
static sal_Int32 nColorRefCount_Impl
Definition: colorcfg.cxx:54
ColorConfigEntry
Definition: colorcfg.hxx:31
@ LINKSVISITED
Definition: colorcfg.hxx:39
@ FONTCOLOR
Definition: colorcfg.hxx:37
@ ColorConfigEntryCount
Definition: colorcfg.hxx:87
@ DOCCOLOR
Definition: colorcfg.hxx:32
@ APPBACKGROUND
Definition: colorcfg.hxx:34
IMPL_LINK(ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent &, rEvent, void)
Definition: colorcfg.cxx:326
OUString wrapConfigurationElementName(std::u16string_view _sElementName)
bool Any2Bool(const css::uno::Any &rValue)
@ SettingsChanged