summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-09-14 20:06:07 +0300
committerMihai Varga <mihai.mv13@gmail.com>2015-09-14 20:10:55 +0300
commit6023b797c4570b69d0511b0a45bcf67932f32ba6 (patch)
treedd2e2f4514841bcb41c433ae8eefe3e91ef38e4c /sfx2
parent4a55670e2453cdb9895f51bbd4051f7004d768c5 (diff)
get feedback for style / font / font size in tiledrendering
Change-Id: I92fd5022a4a5736a6323732141e9ea7bafec2a44
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/unoctitm.cxx45
1 files changed, 38 insertions, 7 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index c35dea9fb2f0..6cefb79764f0 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -28,6 +28,7 @@
#include <svtools/javacontext.hxx>
#include <svl/itempool.hxx>
#include <tools/urlobj.hxx>
+#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/Desktop.hpp>
@@ -37,8 +38,10 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/FrameActionEvent.hpp>
#include <com/sun/star/frame/FrameAction.hpp>
+#include <com/sun/star/frame/status/FontHeight.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
+#include <com/sun/star/frame/status/Template.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
@@ -1059,22 +1062,50 @@ void SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
if (!objSh || !objSh->isTiledRendering())
return;
+ OUStringBuffer aBuffer;
+ aBuffer.append(aEvent.FeatureURL.Complete);
+ aBuffer.append("=");
+
if (aEvent.FeatureURL.Path == "Bold" ||
aEvent.FeatureURL.Path == "Italic" ||
aEvent.FeatureURL.Path == "Underline" ||
- aEvent.FeatureURL.Path == "Strikeout")
+ aEvent.FeatureURL.Path == "Strikeout" ||
+ aEvent.FeatureURL.Path == "DefaultBullet" ||
+ aEvent.FeatureURL.Path == "DefaultNumbering" ||
+ aEvent.FeatureURL.Path == "LeftPara" ||
+ aEvent.FeatureURL.Path == "CenterPara" ||
+ aEvent.FeatureURL.Path == "RightPara" ||
+ aEvent.FeatureURL.Path == "JustifyPara")
{
-
- OUStringBuffer aBuffer;
- aBuffer.append(aEvent.FeatureURL.Complete);
- aBuffer.append("=");
bool bTemp = false;
aEvent.State >>= bTemp;
aBuffer.append(bTemp);
- OUString payload = aBuffer.makeStringAndClear();
- objSh->libreOfficeKitCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8().getStr());
}
+ else if (aEvent.FeatureURL.Path == "CharFontName")
+ {
+ ::com::sun::star::awt::FontDescriptor aFontDesc;
+ aEvent.State >>= aFontDesc;
+ aBuffer.append(aFontDesc.Name);
+ }
+ else if (aEvent.FeatureURL.Path == "FontHeight")
+ {
+ ::com::sun::star::frame::status::FontHeight aFontHeight;
+ aEvent.State >>= aFontHeight;
+ aBuffer.append(aFontHeight.Height);
+ }
+ else if (aEvent.FeatureURL.Path == "StyleApply")
+ {
+ ::com::sun::star::frame::status::Template aTemplate;
+ aEvent.State >>= aTemplate;
+ aBuffer.append(aTemplate.StyleName);
+ }
+ else
+ {
+ return;
+ }
+ OUString payload = aBuffer.makeStringAndClear();
+ objSh->libreOfficeKitCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8().getStr());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */