summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2019-04-17 20:00:18 +0300
committerMiklos Vajna <vmiklos@collabora.com>2019-05-23 10:16:30 +0200
commite3015d7021e689c71c2ed8e5dd01a74d832c84f0 (patch)
tree5fe68d52d35d9f2df506f1cf61e2bcc020469766 /include
parent237a656db82951e06f8a34e6ca2c1e50f24eb508 (diff)
Add new customize and position merged dialog
Change-Id: I898fb0830a9f53da4a7917cb5900f082e3a9d6b7 Reviewed-on: https://gerrit.libreoffice.org/71944 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/cui/cuicharmap.hxx181
-rw-r--r--include/cui/cuidllapi.h23
-rw-r--r--include/cui/numberingpreview.hxx31
-rw-r--r--include/svx/svxdlg.hxx15
-rw-r--r--include/svx/svxids.hrc1
5 files changed, 250 insertions, 1 deletions
diff --git a/include/cui/cuicharmap.hxx b/include/cui/cuicharmap.hxx
new file mode 100644
index 000000000000..cfe472e632a9
--- /dev/null
+++ b/include/cui/cuicharmap.hxx
@@ -0,0 +1,181 @@
+/* -*- 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_CUI_CUICHARMAP_HXX
+#define INCLUDED_CUI_CUICHARMAP_HXX
+
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+#include <vcl/virdev.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <svl/itemset.hxx>
+#include <svx/charmap.hxx>
+#include <svx/searchcharmap.hxx>
+#include <sfx2/charwin.hxx>
+#include <cui/cuidllapi.h>
+
+using namespace ::com::sun::star;
+class SubsetMap;
+
+#define CHARMAP_MAXLEN 32
+
+namespace svx
+{
+struct SvxShowCharSetItem;
+}
+
+class CUI_DLLPUBLIC SvxShowText : public weld::CustomWidgetController
+{
+private:
+ ScopedVclPtr<VirtualDevice> m_xVirDev;
+ OUString m_sText;
+ long mnY;
+ bool mbCenter;
+ vcl::Font m_aFont;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
+ virtual void Resize() override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+
+public:
+ SvxShowText(const VclPtr<VirtualDevice>& rVirDev);
+
+ void SetFont(const vcl::Font& rFont);
+ vcl::Font const& GetFont() const { return m_aFont; }
+ void SetText(const OUString& rText);
+ OUString const& GetText() const { return m_sText; }
+ void SetCentered(bool bCenter) { mbCenter = bCenter; }
+
+ Size get_preferred_size() const { return GetDrawingArea()->get_preferred_size(); }
+};
+
+/** The main purpose of this dialog is to enable the use of characters
+ that are not easily accessible from the keyboard. */
+class CUI_DLLPUBLIC SvxCharacterMap : public SfxDialogController
+{
+private:
+ void init();
+
+ ScopedVclPtr<VirtualDevice> m_xVirDev;
+ vcl::Font aFont;
+ std::unique_ptr<const SubsetMap> pSubsetMap;
+ bool isSearchMode;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
+ std::deque<OUString> maRecentCharList;
+ std::deque<OUString> maRecentCharFontList;
+ std::deque<OUString> maFavCharList;
+ std::deque<OUString> maFavCharFontList;
+ uno::Reference<uno::XComponentContext> mxContext;
+
+ SvxCharView m_aRecentCharView[16];
+ SvxCharView m_aFavCharView[16];
+ SvxShowText m_aShowChar;
+
+ std::unique_ptr<weld::Button> m_xOKBtn;
+ std::unique_ptr<weld::Label> m_xFontText;
+ std::unique_ptr<weld::ComboBox> m_xFontLB;
+ std::unique_ptr<weld::Label> m_xSubsetText;
+ std::unique_ptr<weld::ComboBox> m_xSubsetLB;
+ std::unique_ptr<weld::Entry> m_xSearchText;
+ std::unique_ptr<weld::Entry> m_xHexCodeText;
+ std::unique_ptr<weld::Entry> m_xDecimalCodeText;
+ std::unique_ptr<weld::Button> m_xFavouritesBtn;
+ std::unique_ptr<weld::Label> m_xCharName;
+ std::unique_ptr<weld::Widget> m_xRecentGrid;
+ std::unique_ptr<weld::Widget> m_xFavGrid;
+ std::unique_ptr<weld::CustomWeld> m_xShowChar;
+ std::unique_ptr<weld::CustomWeld> m_xRecentCharView[16];
+ std::unique_ptr<weld::CustomWeld> m_xFavCharView[16];
+ std::unique_ptr<SvxShowCharSet> m_xShowSet;
+ std::unique_ptr<weld::CustomWeld> m_xShowSetArea;
+ std::unique_ptr<SvxSearchCharSet> m_xSearchSet;
+ std::unique_ptr<weld::CustomWeld> m_xSearchSetArea;
+
+ std::unique_ptr<SfxAllItemSet> m_xOutputSet;
+
+ enum class Radix : sal_Int16
+ {
+ decimal = 10,
+ hexadecimal = 16
+ };
+
+ DECL_LINK(FontSelectHdl, weld::ComboBox&, void);
+ DECL_LINK(SubsetSelectHdl, weld::ComboBox&, void);
+ DECL_LINK(CharDoubleClickHdl, SvxShowCharSet*, void);
+ DECL_LINK(CharSelectHdl, SvxShowCharSet*, void);
+ DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void);
+ DECL_LINK(CharPreSelectHdl, SvxShowCharSet*, void);
+ DECL_LINK(FavClickHdl, SvxShowCharSet*, void);
+ DECL_LINK(SearchCharDoubleClickHdl, SvxShowCharSet*, void);
+ DECL_LINK(SearchCharSelectHdl, SvxShowCharSet*, void);
+ DECL_LINK(SearchCharHighlightHdl, SvxShowCharSet*, void);
+ DECL_LINK(SearchCharPreSelectHdl, SvxShowCharSet*, void);
+ DECL_LINK(DecimalCodeChangeHdl, weld::Entry&, void);
+ DECL_LINK(HexCodeChangeHdl, weld::Entry&, void);
+ DECL_LINK(CharClickHdl, SvxCharView*, void);
+ DECL_LINK(RecentClearClickHdl, SvxCharView*, void);
+ DECL_LINK(FavClearClickHdl, SvxCharView*, void);
+ DECL_LINK(RecentClearAllClickHdl, SvxCharView*, void);
+ DECL_LINK(FavClearAllClickHdl, SvxCharView*, void);
+ DECL_LINK(InsertClickHdl, weld::Button&, void);
+ DECL_LINK(FavSelectHdl, weld::Button&, void);
+ DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
+ DECL_LINK(SearchFieldGetFocusHdl, weld::Widget&, void);
+
+ static void fillAllSubsets(weld::ComboBox& rListBox);
+ void selectCharByCode(Radix radix);
+
+public:
+ SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet,
+ const css::uno::Reference<css::frame::XFrame>& rFrame);
+ virtual short run() override;
+
+ void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
+
+ const SfxItemSet* GetOutputItemSet() const { return m_xOutputSet.get(); }
+
+ void DisableFontSelection();
+
+ const vcl::Font& GetCharFont() const { return aFont; }
+ void SetCharFont(const vcl::Font& rFont);
+
+ void SetChar(sal_UCS4);
+ sal_UCS4 GetChar() const;
+
+ void getRecentCharacterList(); //gets both recent char and recent char font list
+ void updateRecentCharacterList(const OUString& rChar, const OUString& rFont);
+
+ void getFavCharacterList(); //gets both Fav char and Fav char font list
+ void updateFavCharacterList(const OUString& rChar, const OUString& rFont);
+ void deleteFavCharacterFromList(const OUString& rChar, const OUString& rFont);
+ bool isFavChar(const OUString& sTitle, const OUString& rFont);
+
+ void updateRecentCharControl();
+ void insertCharToDoc(const OUString& sChar);
+
+ void updateFavCharControl();
+ void setFavButtonState(const OUString& sTitle, const OUString& rFont);
+
+ void setCharName(sal_UCS4 nDecimalValue);
+
+ void toggleSearchView(bool state);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/cui/cuidllapi.h b/include/cui/cuidllapi.h
new file mode 100644
index 000000000000..12277c602dd4
--- /dev/null
+++ b/include/cui/cuidllapi.h
@@ -0,0 +1,23 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_CUI_CUIDLLAPI_H
+#define INCLUDED_CUI_CUIDLLAPI_H
+
+#include <sal/types.h>
+
+#if defined(CUI_DLLIMPLEMENTATION)
+#define CUI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define CUI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif // INCLUDED_CUI_CUIDLLAPI_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/cui/numberingpreview.hxx b/include/cui/numberingpreview.hxx
new file mode 100644
index 000000000000..0d6d01dc2a02
--- /dev/null
+++ b/include/cui/numberingpreview.hxx
@@ -0,0 +1,31 @@
+#ifndef INCLUDED_CUI_NUMBERINGPREVIEW_HXX
+#define INCLUDED_CUI_NUMBERINGPREVIEW_HXX
+
+#include <cui/cuidllapi.h>
+#include <editeng/numitem.hxx>
+#include <vcl/customweld.hxx>
+
+class CUI_DLLPUBLIC SvxNumberingPreview : public weld::CustomWidgetController
+{
+ const SvxNumRule* pActNum;
+ vcl::Font aStdFont;
+ bool bPosition;
+ sal_uInt16 nActLevel;
+
+protected:
+ virtual void Paint(vcl::RenderContext& rRenderContext,
+ const ::tools::Rectangle& rRect) override;
+
+public:
+ SvxNumberingPreview();
+
+ void SetNumRule(const SvxNumRule* pNum)
+ {
+ pActNum = pNum;
+ Invalidate();
+ };
+ void SetPositionMode() { bPosition = true; }
+ void SetLevel(sal_uInt16 nSet) { nActLevel = nSet; }
+};
+
+#endif
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 266eb4ccffc6..8469d9f646b4 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -31,6 +31,10 @@
#include <svx/svxdllapi.h>
#include <vector>
+namespace sd {
+ class View;
+}
+
namespace com{namespace sun{namespace star{
namespace linguistic2{
class XDictionary;
@@ -202,6 +206,16 @@ public:
virtual void GetDescription(OUString& rDescription) = 0;
};
+class AbstractSvxBulletAndPositionDlg :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxBulletAndPositionDlg() override = default;
+public:
+ virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* pSet) const = 0 ;
+ virtual bool IsApplyToMaster() = 0;
+ virtual bool IsSlideScope() = 0;
+};
+
class AbstractSvxMessDialog :public VclAbstractDialog
{
protected:
@@ -391,7 +405,6 @@ public:
// #i68101#
virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0;
virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
-
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings)=0;
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 4c40a79a94de..ac2fadfb611c 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -287,6 +287,7 @@ class SfxStringItem;
#define SID_PRESENTATION ( SID_SVX_START + 157 )
#define SID_PRESENTATION_CURRENT_SLIDE ( SID_SVX_START + 158 )
#define SID_REHEARSE_TIMINGS ( SID_SVX_START + 159 )
+#define SID_NUMBERING_AND_POSITION ( SID_SVX_START + 160 )
#define SID_HIDE_SLIDE ( SID_SVX_START + 161 )
#define SID_ATTR_FILL_STYLE ( SID_SVX_START + 164 )
#define SID_ATTR_FILL_COLOR ( SID_SVX_START + 165 )