135360
From c99c25c3d09c53667b3a9e90573ae25cd4f0d74b Mon Sep 17 00:00:00 2001
135360
From: Mihai Varga <mihai.varga@collabora.com>
135360
Date: Thu, 29 Oct 2015 16:28:37 +0200
135360
Subject: [PATCH 240/398] LOK: font/back color feedback
135360
135360
This is used to know the current font/back color
135360
135360
Change-Id: Ic524fcb5c26e1c15ec9c50b2879465152ac8ee34
135360
(cherry picked from commit 8e3685228d833233fc9a912a5e97df0e14597928)
135360
---
135360
 desktop/source/lib/init.cxx      | 4 +++-
135360
 sfx2/source/control/unoctitm.cxx | 7 +++++++
135360
 2 files changed, 10 insertions(+), 1 deletion(-)
135360
135360
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
135360
index 80c3d0389504..9dacde8b0287 100644
135360
--- a/desktop/source/lib/init.cxx
135360
+++ b/desktop/source/lib/init.cxx
135360
@@ -565,7 +565,9 @@ static void doc_iniUnoCommands ()
135360
         OUString(".uno:DecrementIndent"),
135360
         OUString(".uno:CharFontName"),
135360
         OUString(".uno:FontHeight"),
135360
-        OUString(".uno:StyleApply")
135360
+        OUString(".uno:StyleApply"),
135360
+        OUString(".uno:FontColor"),
135360
+        OUString(".uno:BackColor")
135360
     };
135360
 
135360
     util::URL aCommandURL;
135360
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
135360
index bb5d6720029f..843e93d4feae 100644
135360
--- a/sfx2/source/control/unoctitm.cxx
135360
+++ b/sfx2/source/control/unoctitm.cxx
135360
@@ -1100,6 +1100,13 @@ void SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
135360
         aEvent.State >>= aTemplate;
135360
         aBuffer.append(aTemplate.StyleName);
135360
     }
135360
+    else if (aEvent.FeatureURL.Path == "FontColor" ||
135360
+             aEvent.FeatureURL.Path == "BackColor")
135360
+    {
135360
+        long nColor;
135360
+        aEvent.State >>= nColor;
135360
+        aBuffer.append(nColor);
135360
+    }
135360
     else
135360
     {
135360
         return;
135360
-- 
135360
2.12.0
135360