You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2019/08/01 08:19:42 UTC

svn commit: r1864127 - /openoffice/trunk/main/sfx2/source/sidebar/Theme.cxx

Author: mseidel
Date: Thu Aug  1 08:19:41 2019
New Revision: 1864127

URL: http://svn.apache.org/viewvc?rev=1864127&view=rev
Log:
Add close button for high contrast in side bar

Modified:
    openoffice/trunk/main/sfx2/source/sidebar/Theme.cxx

Modified: openoffice/trunk/main/sfx2/source/sidebar/Theme.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/Theme.cxx?rev=1864127&r1=1864126&r2=1864127&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/Theme.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/Theme.cxx Thu Aug  1 08:19:41 2019
@@ -41,8 +41,6 @@ namespace sfx2 { namespace sidebar {
 ::rtl::Reference<Theme> Theme::mpInstance;
 
 
-
-
 Theme& Theme::GetCurrentTheme (void)
 {
 	if ( ! mpInstance.is())
@@ -54,8 +52,6 @@ Theme& Theme::GetCurrentTheme (void)
 }
 
 
-
-
 Theme::Theme (void)
 	: ThemeInterfaceBase(m_aMutex),
 	  maImages(),
@@ -76,15 +72,11 @@ Theme::Theme (void)
 }
 
 
-
-
 Theme::~Theme (void)
 {
 }
 
 
-
-
 Image Theme::GetImage (const ThemeItem eItem)
 {
 	const PropertyType eType (GetPropertyType(eItem));
@@ -95,8 +87,6 @@ Image Theme::GetImage (const ThemeItem e
 }
 
 
-
-
 Color Theme::GetColor (const ThemeItem eItem)
 {
 	const PropertyType eType (GetPropertyType(eItem));
@@ -112,8 +102,6 @@ Color Theme::GetColor (const ThemeItem e
 }
 
 
-
-
 const Paint& Theme::GetPaint (const ThemeItem eItem)
 {
 	const PropertyType eType (GetPropertyType(eItem));
@@ -124,16 +112,12 @@ const Paint& Theme::GetPaint (const Them
 }
 
 
-
-
 const Wallpaper Theme::GetWallpaper (const ThemeItem eItem)
 {
 	return GetPaint(eItem).GetWallpaper();
 }
 
 
-
-
 sal_Int32 Theme::GetInteger (const ThemeItem eItem)
 {
 	const PropertyType eType (GetPropertyType(eItem));
@@ -144,8 +128,6 @@ sal_Int32 Theme::GetInteger (const Theme
 }
 
 
-
-
 bool Theme::GetBoolean (const ThemeItem eItem)
 {
 	const PropertyType eType (GetPropertyType(eItem));
@@ -156,8 +138,6 @@ bool Theme::GetBoolean (const ThemeItem
 }
 
 
-
-
 Rectangle Theme::GetRectangle (const ThemeItem eItem)
 {
 	const PropertyType eType (GetPropertyType(eItem));
@@ -168,8 +148,6 @@ Rectangle Theme::GetRectangle (const The
 }
 
 
-
-
 bool Theme::IsHighContrastMode (void)
 {
 	const Theme& rTheme (GetCurrentTheme());
@@ -177,8 +155,6 @@ bool Theme::IsHighContrastMode (void)
 }
 
 
-
-
 void Theme::HandleDataChange (void)
 {
 	Theme& rTheme (GetCurrentTheme());
@@ -194,8 +170,6 @@ void Theme::HandleDataChange (void)
 }
 
 
-
-
 void Theme::InitializeTheme (void)
 {
 	setPropertyValue(
@@ -207,8 +181,6 @@ void Theme::InitializeTheme (void)
 }
 
 
-
-
 void Theme::UpdateTheme (void)
 {
 	SidebarResource aLocalResource;
@@ -385,7 +357,10 @@ void Theme::UpdateTheme (void)
 					: A2S("private:graphicrepository/sfx2/res/symphony/morebutton.png")));
 		setPropertyValue(
 			maPropertyIdToNameMap[Image_Closer],
-			Any(A2S("private:graphicrepository/sfx2/res/closedoc.png")));
+			Any(
+				mbIsHighContrastMode
+					? A2S("private:graphicrepository/sfx2/res/closedochc.png")
+					: A2S("private:graphicrepository/sfx2/res/closedoc.png")));
 		setPropertyValue(
 			maPropertyIdToNameMap[Image_CloseIndicator],
 			Any(
@@ -473,8 +448,6 @@ void Theme::UpdateTheme (void)
 }
 
 
-
-
 void SAL_CALL Theme::disposing (void)
 {
 	ChangeListeners aListeners;
@@ -506,16 +479,12 @@ void SAL_CALL Theme::disposing (void)
 }
 
 
-
-
 Reference<beans::XPropertySet> Theme::GetPropertySet (void)
 {
 	return Reference<beans::XPropertySet>(static_cast<XWeak*>(&GetCurrentTheme()), UNO_QUERY);
 }
 
 
-
-
 Reference<beans::XPropertySetInfo> SAL_CALL Theme::getPropertySetInfo (void)
 	throw(cssu::RuntimeException)
 {
@@ -523,8 +492,6 @@ Reference<beans::XPropertySetInfo> SAL_C
 }
 
 
-
-
 void SAL_CALL Theme::setPropertyValue (
 	const ::rtl::OUString& rsPropertyName,
 	const cssu::Any& rValue)
@@ -570,8 +537,6 @@ void SAL_CALL Theme::setPropertyValue (
 }
 
 
-
-
 Any SAL_CALL Theme::getPropertyValue (
 	const ::rtl::OUString& rsPropertyName)
 	throw(css::beans::UnknownPropertyException,
@@ -592,8 +557,6 @@ Any SAL_CALL Theme::getPropertyValue (
 }
 
 
-
-
 void SAL_CALL Theme::addPropertyChangeListener(
 	const ::rtl::OUString& rsPropertyName,
 	const cssu::Reference<css::beans::XPropertyChangeListener>& rxListener)
@@ -620,8 +583,6 @@ void SAL_CALL Theme::addPropertyChangeLi
 }
 
 
-
-
 void SAL_CALL Theme::removePropertyChangeListener(
 	const ::rtl::OUString& rsPropertyName,
 	const cssu::Reference<css::beans::XPropertyChangeListener>& rxListener)
@@ -658,8 +619,6 @@ void SAL_CALL Theme::removePropertyChang
 }
 
 
-
-
 void SAL_CALL Theme::addVetoableChangeListener(
 	const ::rtl::OUString& rsPropertyName,
 	const cssu::Reference<css::beans::XVetoableChangeListener>& rxListener)
@@ -686,8 +645,6 @@ void SAL_CALL Theme::addVetoableChangeLi
 }
 
 
-
-
 void SAL_CALL Theme::removeVetoableChangeListener(
 	const ::rtl::OUString& rsPropertyName,
 	const cssu::Reference<css::beans::XVetoableChangeListener>& rxListener)
@@ -723,8 +680,6 @@ void SAL_CALL Theme::removeVetoableChang
 }
 
 
-
-
 cssu::Sequence<css::beans::Property> SAL_CALL Theme::getProperties (void)
 	throw(cssu::RuntimeException)
 {
@@ -751,8 +706,6 @@ cssu::Sequence<css::beans::Property> SAL
 }
 
 
-
-
 beans::Property SAL_CALL Theme::getPropertyByName (const ::rtl::OUString& rsPropertyName)
 	throw(css::beans::UnknownPropertyException,
 		cssu::RuntimeException)
@@ -775,8 +728,6 @@ beans::Property SAL_CALL Theme::getPrope
 }
 
 
-
-
 sal_Bool SAL_CALL Theme::hasPropertyByName (const ::rtl::OUString& rsPropertyName)
 	throw(cssu::RuntimeException)
 {
@@ -792,8 +743,6 @@ sal_Bool SAL_CALL Theme::hasPropertyByNa
 }
 
 
-
-
 void Theme::SetupPropertyMaps (void)
 {
 	maPropertyIdToNameMap.resize(__Post_Rect);
@@ -870,8 +819,6 @@ void Theme::SetupPropertyMaps (void)
 }
 
 
-
-
 Theme::PropertyType Theme::GetPropertyType (const ThemeItem eItem)
 {
 	switch(eItem)
@@ -946,8 +893,6 @@ Theme::PropertyType Theme::GetPropertyTy
 }
 
 
-
-
 cssu::Type Theme::GetCppuType (const PropertyType eType)
 {
 	switch(eType)
@@ -977,8 +922,6 @@ cssu::Type Theme::GetCppuType (const Pro
 }
 
 
-
-
 sal_Int32 Theme::GetIndex (const ThemeItem eItem, const PropertyType eType)
 {
 	switch(eType)
@@ -1003,8 +946,6 @@ sal_Int32 Theme::GetIndex (const ThemeIt
 }
 
 
-
-
 Theme::VetoableListenerContainer* Theme::GetVetoableListeners (
 	const ThemeItem eItem,
 	const bool bCreate)
@@ -1022,8 +963,6 @@ Theme::VetoableListenerContainer* Theme:
 }
 
 
-
-
 Theme::ChangeListenerContainer* Theme::GetChangeListeners (
 	const ThemeItem eItem,
 	const bool bCreate)
@@ -1041,8 +980,6 @@ Theme::ChangeListenerContainer* Theme::G
 }
 
 
-
-
 bool Theme::DoVetoableListenersVeto (
 	const VetoableListenerContainer* pListeners,
 	const beans::PropertyChangeEvent& rEvent) const
@@ -1074,8 +1011,6 @@ bool Theme::DoVetoableListenersVeto (
 }
 
 
-
-
 void Theme::BroadcastPropertyChange (
 	const ChangeListenerContainer* pListeners,
 	const beans::PropertyChangeEvent& rEvent) const
@@ -1102,8 +1037,6 @@ void Theme::BroadcastPropertyChange (
 }
 
 
-
-
 void Theme::ProcessNewValue (
 	const Any& rValue,
 	const ThemeItem eItem,
@@ -1182,7 +1115,4 @@ void Theme::ProcessNewValue (
 	}
 }
 
-
-
-
 } } // end of namespace sfx2::sidebar