summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-10-30 13:23:29 +0100
committerJan Holesovsky <kendy@collabora.com>2014-11-04 20:26:19 +0100
commit5929a87b8137bf6326adfd4ddfd8075e585ae15c (patch)
treef7e1225a53a4cca41a6fa1b86bec3a944b9ebebb /include/svx
parentc7ba28eaa766f2c1d4f0d3b25b40dd40777bc66b (diff)
line spacing: Change the implementation so that it can be used in toolbars.
Before it was only sidebar-specific, duplicating most the sfx2 framework, and making it impossible to be used from the toolbars. Change-Id: Ibb382633395157602dd806052824e5275503c3e0
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/ParaLineSpacingPopup.hxx51
-rw-r--r--include/svx/svxcommands.h1
2 files changed, 52 insertions, 0 deletions
diff --git a/include/svx/ParaLineSpacingPopup.hxx b/include/svx/ParaLineSpacingPopup.hxx
new file mode 100644
index 000000000000..f0d41bf6de28
--- /dev/null
+++ b/include/svx/ParaLineSpacingPopup.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARALINESPACINGPOPUP_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARALINESPACINGPOPUP_HXX
+
+#include <boost/function.hpp>
+
+#include <editeng/lspcitem.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <sfx2/tbxctrl.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/fldunit.hxx>
+
+namespace svx {
+
+class SVX_DLLPUBLIC ParaLineSpacingPopup : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ParaLineSpacingPopup(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
+ virtual ~ParaLineSpacingPopup();
+
+ virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE;
+ virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE;
+ virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE;
+};
+
+} // namespace svx
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxcommands.h b/include/svx/svxcommands.h
index fdcc22788808..3f31dd1ecbc0 100644
--- a/include/svx/svxcommands.h
+++ b/include/svx/svxcommands.h
@@ -95,6 +95,7 @@
#define CMD_SID_ATTR_PARA_ADJUST_BLOCK ".uno:JustifyPara"
#define CMD_SID_LEAVE_GROUP ".uno:LeaveGroup"
#define CMD_SID_ATTR_PARA_ADJUST_LEFT ".uno:LeftPara"
+#define CMD_SID_ATTR_PARA_LINESPACE ".uno:LineSpacing"
#define CMD_SID_FM_LISTBOX ".uno:ListBox"
#define CMD_SID_FM_NUMERICFIELD ".uno:NumericField"
#define CMD_SID_OBJECT_ALIGN ".uno:ObjectAlign"