Blob Blame History Raw
From c99c25c3d09c53667b3a9e90573ae25cd4f0d74b Mon Sep 17 00:00:00 2001
From: Mihai Varga <mihai.varga@collabora.com>
Date: Thu, 29 Oct 2015 16:28:37 +0200
Subject: [PATCH 240/398] LOK: font/back color feedback

This is used to know the current font/back color

Change-Id: Ic524fcb5c26e1c15ec9c50b2879465152ac8ee34
(cherry picked from commit 8e3685228d833233fc9a912a5e97df0e14597928)
---
 desktop/source/lib/init.cxx      | 4 +++-
 sfx2/source/control/unoctitm.cxx | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 80c3d0389504..9dacde8b0287 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -565,7 +565,9 @@ static void doc_iniUnoCommands ()
         OUString(".uno:DecrementIndent"),
         OUString(".uno:CharFontName"),
         OUString(".uno:FontHeight"),
-        OUString(".uno:StyleApply")
+        OUString(".uno:StyleApply"),
+        OUString(".uno:FontColor"),
+        OUString(".uno:BackColor")
     };
 
     util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index bb5d6720029f..843e93d4feae 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1100,6 +1100,13 @@ void SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
         aEvent.State >>= aTemplate;
         aBuffer.append(aTemplate.StyleName);
     }
+    else if (aEvent.FeatureURL.Path == "FontColor" ||
+             aEvent.FeatureURL.Path == "BackColor")
+    {
+        long nColor;
+        aEvent.State >>= nColor;
+        aBuffer.append(nColor);
+    }
     else
     {
         return;
-- 
2.12.0