diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2012-06-28 00:19:28 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2012-06-28 00:27:47 +0200 |
commit | 7a3ae89a12b2c11e90d3f0c76293ddb63203bd2a (patch) | |
tree | 0882ad037d36e6d2281d22e8dbffbb635ca7c138 /svx/inc | |
parent | e18655e47530f1e399cb546a6001fa0aa0f1873c (diff) |
Enable menu option "Edit witn External Tool.." for Calc.
Currently it was only possible to use "Exit with External Tool.."
menu option in Writer. Now it is also possible to use this in
Calc and in future Draw and Impress. Code has been refactored and
extacted out of "sw" into "svx", so other components can use it.
Currently there is no cleanup of temporary images after processing
was done, and also pinging for changes are still active even when
editing in external tool is done. This behavior will be changed
in the future.
Change-Id: I09969d44dfddbf9183b30ff3fffa2d201c7ae40f
Diffstat (limited to 'svx/inc')
-rw-r--r-- | svx/inc/globlmn_tmpl.hrc | 5 | ||||
-rw-r--r-- | svx/inc/svx/extedit.hxx | 54 | ||||
-rw-r--r-- | svx/inc/svx/svxids.hrc | 4 |
3 files changed, 61 insertions, 2 deletions
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc index f6b8f73b170c..e85bd91398f8 100644 --- a/svx/inc/globlmn_tmpl.hrc +++ b/svx/inc/globlmn_tmpl.hrc @@ -257,6 +257,11 @@ Command = ".uno:ImageMapDialog" ; \ Text [ en-US ] = "ImageMap" ; \ +#define ITEM_EXTERNAL_EDIT \ + Identifier = SID_EXTERNAL_EDIT ; \ + Command = ".uno:ExternalEdit" ; \ + Text [ en-US ] = "Edit with External Tool..." ; \ + #define ITEM_VIEW_ATTR_ZOOM \ Identifier = SID_ATTR_ZOOM ; \ Command = ".uno:Zoom" ; \ diff --git a/svx/inc/svx/extedit.hxx b/svx/inc/svx/extedit.hxx new file mode 100644 index 000000000000..b286ad825af1 --- /dev/null +++ b/svx/inc/svx/extedit.hxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (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.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * [ Surendran Mahendran <surenspost@gmail.com>] + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ +#ifndef _EXTEDIT_HXX +#define _EXTEDIT_HXX + +#include <osl/file.hxx> +#include <osl/process.h> +#include <vcl/graph.hxx> +#include <svtools/grfmgr.hxx> +#include <vcl/timer.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC ExternalToolEdit +{ +public: + GraphicObject* m_pGraphicObject; + rtl::OUString m_aFileName; + + ExternalToolEdit(); + virtual ~ExternalToolEdit(); + + virtual void Update( Graphic& aGraphic ) = 0; + void Edit( GraphicObject *pGraphic ); + + + DECL_LINK( StartListeningEvent, void *pEvent ); + + static void threadWorker( void *pThreadData ); + static void HandleCloseEvent( ExternalToolEdit* pData ); +}; + + +#endif diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index fca583186b5f..918d44d60b95 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -955,9 +955,10 @@ #define SID_INSERT_FORM_SPIN (SID_SVX_START+1110) #define SID_INSERT_FORM_VSCROLL (SID_SVX_START+1111) #define SID_INSERT_FORM_HSCROLL (SID_SVX_START+1112) +#define SID_EXTERNAL_EDIT (SID_SVX_START+1113) // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE (SID_INSERT_FORM_HSCROLL + 1) +#define SID_SVX_FIRSTFREE (SID_EXTERNAL_EDIT + 1) // -------------------------------------------------------------------------- // Overflow check for slot IDs @@ -970,4 +971,3 @@ #endif // #ifndef _SVX_SVXIDS_HRC // ******************************************************************* EOF - |