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