diff options
27 files changed, 97 insertions, 53 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 33109edb8db1..5e3ddbea1231 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -991,6 +991,29 @@ </prop> </node> + <node oor:name="InsertPropertyPanel" oor:op="replace"> + <prop oor:name="Title" oor:type="xs:string"> + <value xml:lang="en-US">Insert Shapes</value> + </prop> + <prop oor:name="Id" oor:type="xs:string"> + <value>InsertPropertyPanel</value> + </prop> + <prop oor:name="DeckId" oor:type="xs:string"> + <value>PropertyDeck</value> + </prop> + <prop oor:name="ContextList"> + <value oor:separator=";"> + Draw, any, visible ; + </value> + </prop> + <prop oor:name="ImplementationURL" oor:type="xs:string"> + <value>private:resource/toolpanel/SvxPanelFactory/InsertPropertyPanel</value> + </prop> + <prop oor:name="OrderIndex" oor:type="xs:int"> + <value>50</value> + </prop> + </node> + </node> </node> </oor:component-data> diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 48cf6e595f2a..8420a23175af 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -155,6 +155,8 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas Construct(GetDocSh(), ePageKind); mpSelectionChangeHandler->Connect(); + + SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawPage)); } /************************************************************************* diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk index 8b2ebf46936d..268dfd7b5b79 100644 --- a/sfx2/Package_inc.mk +++ b/sfx2/Package_inc.mk @@ -140,4 +140,6 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/ControlFactory.hxx,s $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/Theme.hxx,sfx2/sidebar/Theme.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/ILayoutableWindow.hxx,sfx2/sidebar/ILayoutableWindow.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/IContextChangeReceiver.hxx,sfx2/sidebar/IContextChangeReceiver.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/Tools.hxx,sfx2/sidebar/Tools.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/CommandInfoProvider.hxx,sfx2/sidebar/CommandInfoProvider.hxx)) diff --git a/sfx2/source/sidebar/CommandInfoProvider.cxx b/sfx2/source/sidebar/CommandInfoProvider.cxx index 0cb2591f01ea..268e2197b3ee 100644 --- a/sfx2/source/sidebar/CommandInfoProvider.cxx +++ b/sfx2/source/sidebar/CommandInfoProvider.cxx @@ -21,7 +21,7 @@ #include "precompiled_sfx2.hxx" -#include "CommandInfoProvider.hxx" +#include "sfx2/sidebar/CommandInfoProvider.hxx" #include <comphelper/processfactory.hxx> #include <svtools/acceleratorexecute.hxx> diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index 43d1aa28e1a7..d549a0dc4b81 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -28,7 +28,7 @@ #include "sfx2/imagemgr.hxx" #include "sfx2/bindings.hxx" #include <unotools/cmdoptions.hxx> -#include "CommandInfoProvider.hxx" +#include "sfx2/sidebar/CommandInfoProvider.hxx" #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> diff --git a/sfx2/source/sidebar/CustomImageRadioButton.cxx b/sfx2/source/sidebar/CustomImageRadioButton.cxx index 7f1fccc540a7..b51c10061919 100644 --- a/sfx2/source/sidebar/CustomImageRadioButton.cxx +++ b/sfx2/source/sidebar/CustomImageRadioButton.cxx @@ -25,7 +25,7 @@ #include "DrawHelper.hxx" #include "Paint.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index da2774187eb6..c84c4baaae1c 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -29,7 +29,7 @@ #include "Paint.hxx" #include "Panel.hxx" #include "ToolBoxBackground.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "sfx2/sidebar/Theme.hxx" #include <vcl/dockwin.hxx> diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 21a9f98e1c5b..e0f5e70b2c15 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -27,7 +27,7 @@ #include <vcl/image.hxx> #ifdef DEBUG -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #endif diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index 9508f6a44159..aab47fadcec3 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -23,7 +23,7 @@ #include "FocusManager.hxx" #include "Panel.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "TitleBar.hxx" #include <vcl/button.hxx> #include <vcl/toolbox.hxx> diff --git a/sfx2/source/sidebar/MenuButton.cxx b/sfx2/source/sidebar/MenuButton.cxx index bb40c461cbd5..d29bad010f9e 100644 --- a/sfx2/source/sidebar/MenuButton.cxx +++ b/sfx2/source/sidebar/MenuButton.cxx @@ -25,7 +25,7 @@ #include "DrawHelper.hxx" #include "Paint.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "sfx2/sidebar/Theme.hxx" using namespace ::com::sun::star; diff --git a/sfx2/source/sidebar/Paint.cxx b/sfx2/source/sidebar/Paint.cxx index 1a3a9642a18e..d69514a6e269 100644 --- a/sfx2/source/sidebar/Paint.cxx +++ b/sfx2/source/sidebar/Paint.cxx @@ -22,7 +22,7 @@ #include "precompiled_sfx2.hxx" #include "Paint.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include <com/sun/star/awt/Gradient.hpp> diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index 9dc9b1bba947..59b18f0e8682 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -28,7 +28,7 @@ #include "Paint.hxx" #ifdef DEBUG -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "Deck.hxx" #endif diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index 015dbbe23a2f..4327d844b941 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -32,7 +32,7 @@ #include <vcl/image.hxx> #ifdef DEBUG -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #endif diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index ec0ad495a35f..0ab3662261a8 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -22,7 +22,7 @@ #include "precompiled_sfx2.hxx" #include "ResourceManager.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include <unotools/confignode.hxx> #include <comphelper/componentcontext.hxx> diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 1d8e2111d8d2..8ac3eabd2380 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -30,9 +30,9 @@ #include "TabBar.hxx" #include "sfx2/sidebar/Theme.hxx" #include "sfx2/sidebar/SidebarChildWindow.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "SidebarDockingWindow.hxx" #include "Context.hxx" -#include "Tools.hxx" #include "sfxresid.hxx" #include "sfx2/sfxsids.hrc" @@ -146,8 +146,8 @@ SidebarController::SidebarController ( // Get the dispatch object as preparation to listen for changes of // the read-only state. - const util::URL aURL (GetURL(gsReadOnlyCommandName)); - mxReadOnlyModeDispatch = GetDispatch(aURL); + const util::URL aURL (Tools::GetURL(gsReadOnlyCommandName)); + mxReadOnlyModeDispatch = Tools::GetDispatch(mxFrame, aURL); if (mxReadOnlyModeDispatch.is()) mxReadOnlyModeDispatch->addStatusListener(this, aURL); @@ -176,7 +176,7 @@ void SAL_CALL SidebarController::disposing (void) static_cast<css::ui::XContextChangeEventListener*>(this)); if (mxReadOnlyModeDispatch.is()) - mxReadOnlyModeDispatch->removeStatusListener(this, GetURL(gsReadOnlyCommandName)); + mxReadOnlyModeDispatch->removeStatusListener(this, Tools::GetURL(gsReadOnlyCommandName)); if (mpSplitWindow != NULL) { mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler)); @@ -811,8 +811,8 @@ void SidebarController::ShowDetailMenu (const ::rtl::OUString& rsMenuCommand) co { try { - const util::URL aURL (GetURL(rsMenuCommand)); - Reference<frame::XDispatch> xDispatch (GetDispatch(aURL)); + const util::URL aURL (Tools::GetURL(rsMenuCommand)); + Reference<frame::XDispatch> xDispatch (Tools::GetDispatch(mxFrame, aURL)); if (xDispatch.is()) xDispatch->dispatch(aURL, Sequence<beans::PropertyValue>()); } @@ -826,33 +826,6 @@ void SidebarController::ShowDetailMenu (const ::rtl::OUString& rsMenuCommand) co -util::URL SidebarController::GetURL (const ::rtl::OUString& rsCommand) const -{ - util::URL aURL; - aURL.Complete = rsCommand; - - const ::comphelper::ComponentContext aComponentContext (::comphelper::getProcessServiceFactory()); - const Reference<util::XURLTransformer> xParser ( - aComponentContext.createComponent("com.sun.star.util.URLTransformer"), - UNO_QUERY_THROW); - xParser->parseStrict(aURL); - - return aURL; -} - - - - -Reference<frame::XDispatch> SidebarController::GetDispatch (const util::URL& rURL) const -{ - Reference<frame::XDispatchProvider> xProvider (mxFrame, UNO_QUERY_THROW); - Reference<frame::XDispatch> xDispatch (xProvider->queryDispatch(rURL, OUString(), 0)); - return xDispatch; -} - - - - ::boost::shared_ptr<PopupMenu> SidebarController::CreatePopupMenu ( const ::std::vector<TabBar::DeckMenuData>& rDeckSelectionData, const ::std::vector<TabBar::DeckMenuData>& rDeckShowData) const diff --git a/sfx2/source/sidebar/SidebarController.hxx b/sfx2/source/sidebar/SidebarController.hxx index 5606f5c4c014..03ab459f0fd0 100644 --- a/sfx2/source/sidebar/SidebarController.hxx +++ b/sfx2/source/sidebar/SidebarController.hxx @@ -181,8 +181,6 @@ private: const ::std::vector<TabBar::DeckMenuData>& rDeckSelectionData, const ::std::vector<TabBar::DeckMenuData>& rDeckShowData) const; void ShowDetailMenu (const ::rtl::OUString& rsMenuCommand) const; - css::util::URL GetURL (const ::rtl::OUString& rsCommand) const; - cssu::Reference<css::frame::XDispatch> GetDispatch (const css::util::URL& rURL) const; ::boost::shared_ptr<PopupMenu> CreatePopupMenu ( const ::std::vector<TabBar::DeckMenuData>& rDeckSelectionData, const ::std::vector<TabBar::DeckMenuData>& rDeckShowData) const; diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index d858b9a8d16c..bfefc97a7302 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -24,7 +24,7 @@ #include "SidebarToolBox.hxx" #include "ToolBoxBackground.hxx" #include "sfx2/sidebar/Theme.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include <vcl/gradient.hxx> diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 83c3ec6f369c..0fcbb1492608 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -27,7 +27,7 @@ #include "DeckDescriptor.hxx" #include "Paint.hxx" #include "sfx2/sidebar/Theme.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "FocusManager.hxx" #include <vcl/gradient.hxx> diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx index 9aa3faacc9d7..6ce0f30874b2 100644 --- a/sfx2/source/sidebar/TabItem.cxx +++ b/sfx2/source/sidebar/TabItem.cxx @@ -25,7 +25,7 @@ #include "DrawHelper.hxx" #include "Paint.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "sfx2/sidebar/Theme.hxx" diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index d7f96e5aef4f..cce2663974fe 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -24,7 +24,7 @@ #include "sfx2/sidebar/Theme.hxx" #include "Paint.hxx" #include "SidebarResource.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include <tools/svborder.hxx> #include <tools/rc.hxx> diff --git a/sfx2/source/sidebar/ToolBoxBackground.cxx b/sfx2/source/sidebar/ToolBoxBackground.cxx index c182c2cb0740..77d3b4b7bf29 100755 --- a/sfx2/source/sidebar/ToolBoxBackground.cxx +++ b/sfx2/source/sidebar/ToolBoxBackground.cxx @@ -24,7 +24,7 @@ #include "ToolBoxBackground.hxx" #include "Paint.hxx" #include "DrawHelper.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "sfx2/sidebar/Theme.hxx" #include <vcl/toolbox.hxx> diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx index 5cd84b7c0b35..b6802dca6264 100644 --- a/sfx2/source/sidebar/Tools.cxx +++ b/sfx2/source/sidebar/Tools.cxx @@ -21,7 +21,7 @@ #include "precompiled_sfx2.hxx" -#include "Tools.hxx" +#include "sfx2/sidebar/Tools.hxx" #include "sfx2/sidebar/Theme.hxx" @@ -31,7 +31,9 @@ #include <comphelper/namedvaluecollection.hxx> #include <vcl/gradient.hxx> +#include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> #include <cstring> @@ -153,4 +155,34 @@ SvBorder Tools::RectangleToSvBorder (const Rectangle aBox) aBox.Bottom()); } + + + +util::URL Tools::GetURL (const ::rtl::OUString& rsCommand) +{ + util::URL aURL; + aURL.Complete = rsCommand; + + const ::comphelper::ComponentContext aComponentContext (::comphelper::getProcessServiceFactory()); + const Reference<util::XURLTransformer> xParser ( + aComponentContext.createComponent("com.sun.star.util.URLTransformer"), + UNO_QUERY_THROW); + xParser->parseStrict(aURL); + + return aURL; +} + + + + +Reference<frame::XDispatch> Tools::GetDispatch ( + const cssu::Reference<css::frame::XFrame>& rxFrame, + const util::URL& rURL) +{ + Reference<frame::XDispatchProvider> xProvider (rxFrame, UNO_QUERY_THROW); + Reference<frame::XDispatch> xDispatch (xProvider->queryDispatch(rURL, ::rtl::OUString(), 0)); + return xDispatch; +} + + } } // end of namespace sfx2::sidebar diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk index e51f4210d306..7aa9bf5d03d3 100644 --- a/svx/AllLangResTarget_svx.mk +++ b/svx/AllLangResTarget_svx.mk @@ -84,6 +84,7 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\ svx/source/sidebar/possize/PosSizePropertyPanel.src \ svx/source/sidebar/text/TextPropertyPanel.src \ svx/source/sidebar/paragraph/ParaPropertyPanel.src \ + svx/source/sidebar/insert/InsertPropertyPanel.src \ svx/source/stbctrls/stbctrls.src \ svx/source/svdraw/svdstr.src \ svx/source/table/table.src \ diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 0146285587c8..9281d881dbdf 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -47,6 +47,7 @@ $(eval $(call gb_Library_add_linked_libs,svx,\ cppu \ drawinglayer \ editeng \ + fwe \ fwk \ i18nisolang1 \ icuuc \ @@ -211,6 +212,8 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/sidebar/tools/PopupContainer \ svx/source/sidebar/tools/Popup \ svx/source/sidebar/tools/ValueSetWithTextControl \ + svx/source/sidebar/insert/InsertPropertyPanel \ + svx/source/sidebar/insert/SimpleToolBoxController \ svx/source/stbctrls/pszctrl \ svx/source/stbctrls/insctrl \ svx/source/stbctrls/selctrl \ diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 5c6056d25b0e..92978628b20f 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -368,6 +368,9 @@ #define HID_PROPERTYPANEL_POSIZE_SECTION "SVX_HID_PROPERTYPANEL_POSIZE_SECTION" #define HID_PROPERTYPANEL_GRAPHIC_SECTION "SVX_HID_PROPERTYPANEL_GRAPHIC_SECTION" +// Insert panel +#define HID_SIDEBAR_INSERT_PANEL "HID_SIDEBAR_INSERT_PANEL" +#define HID_SIDEBAR_INSERT_TOOLBOX "HID_SIDEBAR_INSERT_TOOLBOX" #define HID_PPROPERTYPANEL_PARA_TBX_NUM_BULLET "SVX_HID_PPROPERTYPANEL_PARA_TBX_NUM_BULLET" #define HID_PPROPERTYPANEL_PARA_TBI_NUM "SVX_HID_PPROPERTYPANEL_PARA_TBI_NUM" diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index d27ceb699719..db7687d0fb70 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -31,7 +31,7 @@ // Resource-Id's ------------------------------------------------------------ // !!! IMPORTANT: consider and update FIRSTFREE when introducing new RIDs !!! (not for RIDs for Strings - they have there own) -#define RID_SVX_FIRSTFREE 324 +#define RID_SVX_FIRSTFREE 325 // some strings also used in CUI #define RID_SVXERRCTX (RID_SVX_START + 351) @@ -376,6 +376,8 @@ #define RID_POPUPPANEL_PARAPAGE_NUMBERING (RID_SVX_START + 322) #define RID_POPUPPANEL_PARAPAGE_BACK_COLOR (RID_SVX_START + 323) +#define RID_SIDEBAR_INSERT_PANEL (RID_SVX_START + 324) + // !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new RIDs !!! (see above) diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index dbe5a89ad914..6b1ac6b3ec85 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -27,6 +27,7 @@ #include "graphic/GraphicPropertyPanel.hxx" #include "line/LinePropertyPanel.hxx" #include "possize/PosSizePropertyPanel.hxx" +#include "insert/InsertPropertyPanel.hxx" #include "GalleryControl.hxx" #include "debug/ColorPanel.hxx" #include "debug/ContextPanel.hxx" @@ -160,6 +161,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( { pControl = PosSizePropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar); } + else if (DoesResourceEndWith("/InsertPropertyPanel")) + { + pControl = new InsertPropertyPanel(pParentWindow, xFrame); + } else if (DoesResourceEndWith("/GalleryPanel")) { pControl = new GalleryControl(pBindings, pParentWindow); |