ooo-build r15228 - in trunk: . patches/dev300



Author: thorstenb
Date: Wed Jan 28 22:25:27 2009
New Revision: 15228
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15228&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/optional-outplace-ole.diff: added experimental
    outplace OLE editing facility.



Added:
   trunk/patches/dev300/optional-outplace-ole.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Wed Jan 28 22:25:27 2009
@@ -32,7 +32,7 @@
 	      UnUsedButNotYetRemovedFromSVN, WebDAVUpstream, \
 	      PostgreSQL, SELinux, VOSremoval, Glib2, \
 	      UnitBootstrap, RadioButtons, UnstableLibwpd, WWInProgress, \
-	      KDE4, MinGW, CalcExperimental
+	      KDE4, MinGW, CalcExperimental, OptionalOutplaceOLE
 DebianLooseSections: DebianBaseNoHelpContent
 # Optional sections
 Optional : DejaVuFonts, NovellOnlyExtensionFixes, Win32OnlyExtensionFixes, Linux32OnlyExtensionFixes
@@ -2325,6 +2325,10 @@
 [ CalcSolver >= dev300-m38 ]
 scsolver-lpsolve.diff
 
+[ OptionalOutplaceOLE ]
+SectionOwner => thorsten
+optional-outplace-ole.diff, thorsten
+
 #[ OOXSTLport5 ]
 #
 ## oox devs, please reconsider operator[] use,

Added: trunk/patches/dev300/optional-outplace-ole.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/optional-outplace-ole.diff	Wed Jan 28 22:25:27 2009
@@ -0,0 +1,839 @@
+Outplace OLE activation; adds context menu entries to all apps
+
+From: Thorsten Behrens <tbehrens novell com>
+
+
+---
+
+ embeddedobj/source/general/docholder.cxx |    9 ++---
+ sc/inc/sc.hrc                            |    3 ++
+ sc/sdi/scalc.sdi                         |   50 ++++++++++++++++++++++++++++++
+ sc/sdi/tabvwsh.sdi                       |    2 +
+ sc/source/ui/drawfunc/fudraw.cxx         |   10 +++++-
+ sc/source/ui/drawfunc/objdraw.src        |   29 +++++++++++++++++
+ sc/source/ui/view/tabvwsh3.cxx           |   32 +++++++++++++++++++
+ sc/source/ui/view/tabvwsh4.cxx           |    2 +
+ sd/inc/app.hrc                           |    2 +
+ sd/sdi/_drvwsh.sdi                       |   10 ++++++
+ sd/sdi/sdraw.sdi                         |   50 ++++++++++++++++++++++++++++++
+ sd/source/ui/app/menuids_tmpl.src        |   12 ++++++-
+ sd/source/ui/app/popup2_tmpl.src         |    1 +
+ sd/source/ui/func/fudraw.cxx             |    4 ++
+ sd/source/ui/func/fuinsert.cxx           |    5 ++-
+ sd/source/ui/func/fupoor.cxx             |    9 ++++-
+ sd/source/ui/view/drviews2.cxx           |   22 +++++++++++++
+ sd/source/ui/view/drviews5.cxx           |    2 +
+ sd/source/ui/view/frmview.cxx            |    4 +-
+ sfx2/source/view/topfrm.cxx              |    2 +
+ sw/inc/cmdid.h                           |    2 +
+ sw/sdi/_frmsh.sdi                        |   14 ++++++++
+ sw/sdi/swriter.sdi                       |   50 ++++++++++++++++++++++++++++++
+ sw/sdi/swslots.src                       |    8 +++++
+ sw/source/ui/app/mn.src                  |   12 +++++++
+ sw/source/ui/docvw/edtwin.cxx            |   14 ++++++++
+ sw/source/ui/shells/frmsh.cxx            |   12 +++++++
+ 33 files changed, 374 insertions(+), 42 deletions(-)
+
+
+diff --git embeddedobj/source/general/docholder.cxx embeddedobj/source/general/docholder.cxx
+index b28d8e0..ece35a5 100644
+--- embeddedobj/source/general/docholder.cxx
++++ embeddedobj/source/general/docholder.cxx
+@@ -1029,16 +1029,13 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace )
+             if( !xComponentLoader.is() )
+                 throw uno::RuntimeException();
+ 
+-            uno::Sequence< beans::PropertyValue > aArgs( bInPlace ? 3 : 2 );
++            uno::Sequence< beans::PropertyValue > aArgs(3);
+             aArgs[0].Name = ::rtl::OUString::createFromAscii( "Model" );
+             aArgs[0].Value <<= m_xComponent;
+             aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" );
+             aArgs[1].Value <<= m_bReadOnly;
+-            if ( bInPlace )
+-            {
+-                aArgs[2].Name = ::rtl::OUString::createFromAscii( "PluginMode" );
+-                aArgs[2].Value <<= sal_Int16(1);
+-            }
++            aArgs[2].Name = ::rtl::OUString::createFromAscii( "PluginMode" );
++            aArgs[2].Value <<= sal_Int16(bInPlace ? 1 : 2);
+ 			::rtl::OUString sUrl;
+ 			uno::Reference< lang::XServiceInfo> xServiceInfo(xDoc,uno::UNO_QUERY);
+ 			if (	xServiceInfo.is() 
+diff --git sc/inc/sc.hrc sc/inc/sc.hrc
+index 3260a26..74059f2 100644
+--- sc/inc/sc.hrc
++++ sc/inc/sc.hrc
+@@ -670,6 +670,9 @@
+ #define FID_DOC_MANAGER 		(SC_FUNCTION_START + 1)
+ #define FID_CURSOR_ENTER		(SC_FUNCTION_START + 2)
+ #define SID_MAIL                (SC_FUNCTION_START + 3)
++#define SID_INPLACE_OBJECT		(SC_FUNCTION_START + 10)
++#define SID_OUTPLACE_OBJECT		(SC_FUNCTION_START + 11)
++
+ #define FILE_MENU_END			(SC_FUNCTION_START + 20)
+ 
+ #define EDIT_MENU_START 		(FILE_MENU_END)
+diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
+index 9bf0630..4a89525 100644
+--- sc/sdi/scalc.sdi
++++ sc/sdi/scalc.sdi
+@@ -4904,6 +4904,56 @@ SfxObjectItem Offset SID_RANGE_OFFSET
+ ]
+ 
+ //--------------------------------------------------------------------------
++SfxVoidItem InplaceOleObject SID_INPLACE_OBJECT
++()
++[
++	/* flags: */
++	AutoUpdate = FALSE,
++	Cachable = Cachable,
++	FastCall = FALSE,
++	HasCoreId = FALSE,
++	HasDialog = FALSE,
++	ReadOnlyDoc = TRUE,
++	Toggle = FALSE,
++	Container = FALSE,
++	RecordAbsolute = FALSE,
++	RecordPerSet;
++	Synchron;
++
++	/* config: */
++	AccelConfig = FALSE,
++	MenuConfig = TRUE,
++	StatusBarConfig = FALSE,
++	ToolBoxConfig = FALSE,
++	GroupId = GID_DATA;
++]
++
++//--------------------------------------------------------------------------
++SfxVoidItem OutplaceOleObject SID_OUTPLACE_OBJECT
++()
++[
++	/* flags: */
++	AutoUpdate = FALSE,
++	Cachable = Cachable,
++	FastCall = FALSE,
++	HasCoreId = FALSE,
++	HasDialog = FALSE,
++	ReadOnlyDoc = TRUE,
++	Toggle = FALSE,
++	Container = FALSE,
++	RecordAbsolute = FALSE,
++	RecordPerSet;
++	Synchron;
++
++	/* config: */
++	AccelConfig = FALSE,
++	MenuConfig = TRUE,
++	StatusBarConfig = FALSE,
++	ToolBoxConfig = FALSE,
++	GroupId = GID_DATA;
++]
++
++//--------------------------------------------------------------------------
+ SfxObjectItem OleObject SID_OLE_OBJECT
+ 
+ [
+diff --git sc/sdi/tabvwsh.sdi sc/sdi/tabvwsh.sdi
+index 35a5c4a..035084e 100644
+--- sc/sdi/tabvwsh.sdi
++++ sc/sdi/tabvwsh.sdi
+@@ -193,6 +193,8 @@ interface TableEditView : View
+ 
+ 	SID_PRINTPREVIEW	[ ExecMethod = Execute; StateMethod = GetState; ]
+ 
++	SID_INPLACE_OBJECT	[ ExecMethod = Execute; StateMethod = NoState; Export = FALSE; ]
++	SID_OUTPLACE_OBJECT	[ ExecMethod = Execute; StateMethod = NoState; Export = FALSE; ]
+ 
+ 		 //	Suchen/Eersetzen:
+ 	FID_SEARCH_NOW		[ ExecMethod = ExecSearch; StateMethod = NoState;  ]
+diff --git sc/source/ui/drawfunc/fudraw.cxx sc/source/ui/drawfunc/fudraw.cxx
+index d060c2f..d6cfd2b 100644
+--- sc/source/ui/drawfunc/fudraw.cxx
++++ sc/source/ui/drawfunc/fudraw.cxx
+@@ -44,6 +44,7 @@
+ #include <svx/svdundo.hxx>
+ #include <sfx2/dispatch.hxx>
+ #include <sfx2/viewfrm.hxx>
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #include "sc.hrc"
+ #include "fudraw.hxx"
+@@ -56,6 +57,8 @@
+ #include "postit.hxx"
+ #include "globstr.hrc"
+ 
++using namespace ::com::sun::star;
++
+ /*************************************************************************
+ |*
+ |* Basisklasse fuer alle Drawmodul-spezifischen Funktionen
+@@ -375,7 +378,12 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt)
+ 	    			if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle )
+ 			        {
+ 	                    //HMHpView->HideMarkHdl();
+-	                    pViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
++                        if(rKEvt.GetKeyCode().IsShift())
++                            pViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 
++                                                        embed::EmbedVerbs::MS_OLEVERB_OPEN );
++                        else
++                            pViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 
++                                                        embed::EmbedVerbs::MS_OLEVERB_PRIMARY );
+ 
+ 						// consumed
+ 						bReturn = TRUE;
+diff --git sc/source/ui/drawfunc/objdraw.src sc/source/ui/drawfunc/objdraw.src
+index a1986b1..19ac28c 100644
+--- sc/source/ui/drawfunc/objdraw.src
++++ sc/source/ui/drawfunc/objdraw.src
+@@ -1449,6 +1449,21 @@ Menu RID_POPUP_OLE
+ 
+ 		//-#i68101#----------------------
+ 		MenuItem { Separator = TRUE ; };
++        MenuItem
++        {
++            Identifier = SID_INPLACE_OBJECT ;
++            HelpID = SID_INPLACE_OBJECT ;
++            Text [ en-US ] = "~Activate OLE object" ;
++        };
++        MenuItem
++        {
++            Identifier = SID_OUTPLACE_OBJECT ;
++            HelpID = SID_OUTPLACE_OBJECT ;
++            Text [ en-US ] = "~Activate OLE object outplace" ;
++        };
++
++		//-#i68101#----------------------
++		MenuItem { Separator = TRUE ; };
+         MN_TITLE_DESCRIPTION_OBJECT
+         MN_RENAME_OBJECT
+ 		//-#i68101#----------------------
+@@ -1477,6 +1492,20 @@ Menu RID_POPUP_CHART
+ 		MenuItem { ITEM_FORMAT_ATTR_TRANSFORM };
+ 		MN_ORIGINALSIZE
+ 
++		MenuItem { Separator = TRUE ; };
++        MenuItem
++        {
++            Identifier = SID_INPLACE_OBJECT ;
++            HelpID = SID_INPLACE_OBJECT ;
++            Text [ en-US ] = "~Activate OLE object" ;
++        };
++        MenuItem
++        {
++            Identifier = SID_OUTPLACE_OBJECT ;
++            HelpID = SID_OUTPLACE_OBJECT ;
++            Text [ en-US ] = "~Activate OLE object outplace" ;
++        };
++
+ 		//-#i68101#----------------------
+ 		MenuItem { Separator = TRUE ; };
+         MN_TITLE_DESCRIPTION_OBJECT
+diff --git sc/source/ui/view/tabvwsh3.cxx sc/source/ui/view/tabvwsh3.cxx
+index fea07bb..90a9007 100644
+--- sc/source/ui/view/tabvwsh3.cxx
++++ sc/source/ui/view/tabvwsh3.cxx
+@@ -37,6 +37,9 @@
+ 
+ #include "scitems.hxx"
+ #include <svx/eeitem.hxx>
++#include <svx/svdmark.hxx>
++#include <svx/svdoole2.hxx>
++#include <svx/svdview.hxx>
+ 
+ #include <sfx2/app.hxx>
+ //CHINA001 #include <svx/zoom.hxx>
+@@ -52,6 +55,8 @@
+ #include <vcl/msgbox.hxx>
+ #include <vcl/vclenum.hxx>
+ 
++#include <com/sun/star/embed/EmbedVerbs.hpp>
++
+ #include "globstr.hrc"
+ #include "scmod.hxx"
+ #include "appoptio.hxx"
+@@ -98,6 +103,8 @@ using ::std::auto_ptr;
+ #define GET_BOOL(nid)   ((const SfxBoolItem&)pReqArgs->Get(nid)).GetValue()
+ #define RECALC_PAGE(pDocSh) ScPrintFunc( pDocSh, GetPrinter(), nCurTab ).UpdatePages()
+ 
++using namespace com::sun::star;
++
+ //------------------------------------------------------------------
+ 
+ /** Try to parse the given range using Calc-style syntax first, then
+@@ -1112,6 +1119,31 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
+ 			}
+             break;
+ 
++        case SID_OUTPLACE_OBJECT:
++        case SID_INPLACE_OBJECT:
++        {
++            SdrView* pDrView = GetSdrView();
++            if ( pDrView )
++            {
++                const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
++                if (rMarkList.GetMarkCount() == 1)
++                {
++                    BOOL bOle = GetViewFrame()->GetFrame()->IsInPlace();
++                    SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
++                    if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle )
++                    {
++                        if( nSlot == SID_OUTPLACE_OBJECT )
++                            ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 
++                                            embed::EmbedVerbs::MS_OLEVERB_OPEN );
++                        else
++                            ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 
++                                            embed::EmbedVerbs::MS_OLEVERB_PRIMARY );
++                    }
++                }
++            }
++            break;
++        }
++
+ 		default:
+ 			DBG_ERROR("Unbekannter Slot bei ScTabViewShell::Execute");
+ 			break;
+diff --git sc/source/ui/view/tabvwsh4.cxx sc/source/ui/view/tabvwsh4.cxx
+index 3a7d778..18f4d85 100644
+--- sc/source/ui/view/tabvwsh4.cxx
++++ sc/source/ui/view/tabvwsh4.cxx
+@@ -612,6 +612,7 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper
+ 	TestHintWindow();
+ 
+ 	//!	if ViewData has more tables than document, remove tables in ViewData
++    UIFeatureChanged();
+ }
+ 
+ // DoReadUserData is also called from ctor when switching from print preview
+@@ -647,6 +648,7 @@ void ScTabViewShell::DoReadUserData( const String& rData )
+ 	TestHintWindow();
+ 
+ 	//!	if ViewData has more tables than document, remove tables in ViewData
++    UIFeatureChanged();
+ }
+ 
+ //------------------------------------------------------------------
+diff --git sd/inc/app.hrc sd/inc/app.hrc
+index 83cfa86..d0e13fc 100644
+--- sd/inc/app.hrc
++++ sd/inc/app.hrc
+@@ -443,6 +443,7 @@
+ 
+ #define SID_SELECT_BACKGROUND				(SID_SD_START+422)
+ #define SID_OBJECT_CROP						(SID_SD_START+423)
++#define SID_OUTPLACE_OBJECT				    (SID_SD_START+424)
+ 
+ // Slots for the tool pane popup
+ #define SID_TP_APPLY_TO_ALL_SLIDES          (SID_SD_START+425)
+@@ -459,6 +460,7 @@
+ #define SID_DISPLAY_MASTER_BACKGROUND       (SID_SD_START+436)
+ #define SID_DISPLAY_MASTER_OBJECTS          (SID_SD_START+437)
+ #define SID_INSERTPAGE_LAYOUT_MENU          (SID_SD_START+438)
++#define SID_INPLACE_OBJECT				    (SID_SD_START+439)
+ 
+ // Add companion for the SID_HIDE_SLIDE (that is defined in svx)
+ #define SID_SHOW_SLIDE                      (SID_SD_START+440)
+diff --git sd/sdi/_drvwsh.sdi sd/sdi/_drvwsh.sdi
+index 76ed4a3..527070d 100644
+--- sd/sdi/_drvwsh.sdi
++++ sd/sdi/_drvwsh.sdi
+@@ -73,6 +73,16 @@ interface DrawView
+         ExecMethod = FuTemporary ;
+         StateMethod = GetMenuState ;
+     ]
++    SID_INPLACE_OBJECT // ole : yes, status : ?
++    [
++        ExecMethod = FuTemporary ;
++        StateMethod = GetMenuState ;
++    ]
++    SID_OUTPLACE_OBJECT // ole : yes, status : ?
++    [
++        ExecMethod = FuTemporary ;
++        StateMethod = GetMenuState ;
++    ]
+ 	SID_SAVEGRAPHIC
+     [
+         ExecMethod = FuTemporary ;
+diff --git sd/sdi/sdraw.sdi sd/sdi/sdraw.sdi
+index c4d7bad..3e4f099 100644
+--- sd/sdi/sdraw.sdi
++++ sd/sdi/sdraw.sdi
+@@ -4865,6 +4865,56 @@ SfxVoidItem OriginalSize SID_ORIGINAL_SIZE
+ ]
+ 
+ //--------------------------------------------------------------------------
++SfxVoidItem OutplaceOleObject SID_OUTPLACE_OBJECT
++()
++[
++	/* flags: */  
++	AutoUpdate = FALSE, 
++	Cachable = Cachable, 
++	FastCall = FALSE, 
++	HasCoreId = FALSE, 
++	HasDialog = FALSE, 
++	ReadOnlyDoc = TRUE, 
++	Toggle = FALSE, 
++	Container = FALSE, 
++	RecordAbsolute = FALSE, 
++	RecordPerSet;
++	Synchron;
++
++	/* config: */ 
++	AccelConfig = FALSE, 
++	MenuConfig = FALSE, 
++	StatusBarConfig = FALSE, 
++	ToolBoxConfig = FALSE, 
++	GroupId = GID_MODIFY;
++]
++
++//--------------------------------------------------------------------------
++SfxVoidItem InplaceOleObject SID_INPLACE_OBJECT
++()
++[
++	/* flags: */  
++	AutoUpdate = FALSE, 
++	Cachable = Cachable, 
++	FastCall = FALSE, 
++	HasCoreId = FALSE, 
++	HasDialog = FALSE, 
++	ReadOnlyDoc = TRUE, 
++	Toggle = FALSE, 
++	Container = FALSE, 
++	RecordAbsolute = FALSE, 
++	RecordPerSet;
++	Synchron;
++
++	/* config: */ 
++	AccelConfig = FALSE, 
++	MenuConfig = FALSE, 
++	StatusBarConfig = FALSE, 
++	ToolBoxConfig = FALSE, 
++	GroupId = GID_MODIFY;
++]
++
++//--------------------------------------------------------------------------
+ SfxVoidItem SaveGraphic SID_SAVEGRAPHIC
+ ()
+ [
+diff --git sd/source/ui/app/menuids_tmpl.src sd/source/ui/app/menuids_tmpl.src
+index feb34df..d8f7984 100644
+--- sd/source/ui/app/menuids_tmpl.src
++++ sd/source/ui/app/menuids_tmpl.src
+@@ -856,11 +856,19 @@
+ #define MN_OLE_OBJECT\
+     MenuItem\
+     {\
+-        Identifier = SID_OBJECT ; \
+-        HelpID = SID_OBJECT ; \
++        Identifier = SID_INPLACE_OBJECT ; \
++        HelpID = SID_INPLACE_OBJECT ; \
+         Text [ en-US ] = "~OLE Object" ; \
+ 	};
+ 
++#define MN_OUTPLACE_OLE_OBJECT\
++    MenuItem\
++    {\
++        Identifier = SID_OUTPLACE_OBJECT ; \
++        HelpID = SID_OUTPLACE_OBJECT ; \
++        Text [ en-US ] = "~Outplace OLE Object" ; \
++	};
++
+ #define MN_ORIGINAL_SIZE\
+     MenuItem\
+     {\
+diff --git sd/source/ui/app/popup2_tmpl.src sd/source/ui/app/popup2_tmpl.src
+index 63ad153..1765750 100644
+--- sd/source/ui/app/popup2_tmpl.src
++++ sd/source/ui/app/popup2_tmpl.src
+@@ -640,6 +640,7 @@
+ 		MN_TRANSFORM
+ 		MN_ORIGINAL_SIZE
+ 		MN_OLE_OBJECT
++		MN_OUTPLACE_OLE_OBJECT
+ 		SEPARATOR
+ 		MN_POSITION
+ 		MN_OBJECT_ALIGN
+diff --git sd/source/ui/func/fudraw.cxx sd/source/ui/func/fudraw.cxx
+index 49406fc..5093322 100644
+--- sd/source/ui/func/fudraw.cxx
++++ sd/source/ui/func/fudraw.cxx
+@@ -52,6 +52,7 @@
+ #include <svx/svdpagv.hxx>
+ 
+ #include <sfx2/viewfrm.hxx>
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #include "anminfo.hxx"
+ #include "anmdef.hxx"
+@@ -858,7 +859,8 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
+ 					* aktivate OLE-object
+ 					**********************************************************/
+ 					//HMHmpView->HideMarkHdl();
+-					mpViewShell->ActivateObject( (SdrOle2Obj*) pObj, 0);
++                    mpViewShell->ActivateObject( (SdrOle2Obj*) pObj, 
++                                                 embed::EmbedVerbs::MS_OLEVERB_PRIMARY );
+ 				}
+ 			}
+ 			else if (nInv == SdrInventor &&  nSdrObjKind == OBJ_GRAF && pObj->IsEmptyPresObj() )
+diff --git sd/source/ui/func/fuinsert.cxx sd/source/ui/func/fuinsert.cxx
+index b5e6656..11589c8 100644
+--- sd/source/ui/func/fuinsert.cxx
++++ sd/source/ui/func/fuinsert.cxx
+@@ -42,6 +42,7 @@
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/chart2/XChartDocument.hpp>
+ #include <com/sun/star/drawing/FillStyle.hpp>
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #include <tools/urlobj.hxx>
+ #include <svtools/urihelper.hxx>
+@@ -387,7 +388,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
+                 aSz.Width = aTmp.Width();
+                 aSz.Height = aTmp.Height();
+                 xObj->setVisualAreaSize( nAspect, aSz );
+-                mpViewShell->ActivateObject(pOleObj, SVVERB_SHOW);
++                mpViewShell->ActivateObject(pOleObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
+ 
+                 if (nSlotId == SID_INSERT_DIAGRAM)
+                 {
+@@ -660,7 +661,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
+                         	xObj->setVisualAreaSize( nAspect, aSz );
+ 						}
+ 
+-                        mpViewShell->ActivateObject(pObj, SVVERB_SHOW);
++                        mpViewShell->ActivateObject(pObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
+                     }
+ 
+                     Size aVisSizePixel = mpWindow->GetOutputSizePixel();
+diff --git sd/source/ui/func/fupoor.cxx sd/source/ui/func/fupoor.cxx
+index c779172..88993ca 100644
+--- sd/source/ui/func/fupoor.cxx
++++ sd/source/ui/func/fupoor.cxx
+@@ -49,6 +49,7 @@
+ #include <com/sun/star/drawing/XLayer.hpp>
+ #include <com/sun/star/drawing/XLayerManager.hpp>
+ #include <com/sun/star/container/XChild.hpp>
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #ifndef SD_FRAMW_VIEW_HXX
+ #include "FrameView.hxx"
+@@ -339,8 +340,12 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
+ 
+         			if( pObj && pObj->ISA( SdrOle2Obj ) && !mpDocSh->IsUIActive() )
+ 			        {
+-                        //HMHmpView->HideMarkHdl();
+-                        mpViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
++                        if(rKEvt.GetKeyCode().IsShift())
++                            mpViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 
++                                                         embed::EmbedVerbs::MS_OLEVERB_OPEN );
++                        else
++                            mpViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 
++                                                         embed::EmbedVerbs::MS_OLEVERB_PRIMARY );
+ 			        }
+ 			        else if( pObj && pObj->IsEmptyPresObj() && pObj->ISA( SdrGrafObj ) )
+ 			        {
+diff --git sd/source/ui/view/drviews2.cxx sd/source/ui/view/drviews2.cxx
+index 5bd51ea..272a935 100644
+--- sd/source/ui/view/drviews2.cxx
++++ sd/source/ui/view/drviews2.cxx
+@@ -58,6 +58,7 @@
+ #include <svx/flditem.hxx>
+ #include <svx/xlineit0.hxx>
+ #include <svx/xfillit0.hxx>
++#include <svx/svdoole2.hxx>
+ 
+ #ifndef _SDOUTL_HXX //autogen
+ #include <svx/svdoutl.hxx>
+@@ -98,6 +99,7 @@
+ #include "sdabstdlg.hxx"
+ #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+ #include <com/sun/star/drawing/XDrawPages.hpp>
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #include <strings.hrc>
+ 
+@@ -951,6 +953,26 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
+ 		}
+ 		break;
+ 
++		case SID_INPLACE_OBJECT:
++		case SID_OUTPLACE_OBJECT:
++		{
++			const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
++			if( rMarkList.GetMarkCount() == 1 )
++			{
++				SdrOle2Obj *pOleObj = dynamic_cast< SdrOle2Obj* >( rMarkList.GetMark( 0 )->GetMarkedSdrObj() );
++                if( pOleObj && !GetDocSh()->IsUIActive() )
++                {
++                    if( SID_OUTPLACE_OBJECT == nSId )
++                        ActivateObject( pOleObj, embed::EmbedVerbs::MS_OLEVERB_OPEN );
++                    else
++                        ActivateObject( pOleObj, embed::EmbedVerbs::MS_OLEVERB_PRIMARY );
++                }
++			}
++			Cancel();
++			rReq.Ignore();
++		}
++		break;
++
+ 		default:
+ 		{
+ 			// switch Anweisung wegen CLOOKS aufgeteilt. Alle case-Anweisungen die
+diff --git sd/source/ui/view/drviews5.cxx sd/source/ui/view/drviews5.cxx
+index 003285b..b96813f 100644
+--- sd/source/ui/view/drviews5.cxx
++++ sd/source/ui/view/drviews5.cxx
+@@ -612,7 +612,7 @@ void DrawViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence
+ 	{
+ 		const Rectangle aVisArea( mpFrameView->GetVisArea() );
+ 
+-		if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
++		if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !aVisArea.IsEmpty() )
+ 		{
+ 			GetDocSh()->SetVisArea(aVisArea);
+ 		}
+diff --git sd/source/ui/view/frmview.cxx sd/source/ui/view/frmview.cxx
+index dea9d75..57cff7f 100644
+--- sd/source/ui/view/frmview.cxx
++++ sd/source/ui/view/frmview.cxx
+@@ -886,7 +886,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
+ 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaWidth ) ) )
+ 			{
+ 				sal_Int32 nWidth = 0;
+-				if( pValue->Value >>= nWidth )
++				if( (pValue->Value >>= nWidth) && nWidth > 0 )
+ 				{
+ 					Rectangle aVisArea( GetVisArea() );
+ 					aVisArea.nRight = aVisArea.nLeft + nWidth - 1;
+@@ -896,7 +896,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
+ 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaHeight ) ) )
+ 			{
+ 				sal_Int32 nHeight = 0;
+-				if( pValue->Value >>= nHeight )
++				if( (pValue->Value >>= nHeight) && nHeight > 0 )
+ 				{
+ 					Rectangle aVisArea( GetVisArea() );
+ 					aVisArea.nBottom = nHeight + aVisArea.nTop - 1;
+diff --git sfx2/source/view/topfrm.cxx sfx2/source/view/topfrm.cxx
+index 4ede46f..9956bae 100644
+--- sfx2/source/view/topfrm.cxx
++++ sfx2/source/view/topfrm.cxx
+@@ -964,7 +964,7 @@ sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc )
+ 
+     if ( !pImp->bHidden )
+ 	{
+-        if ( pDoc->IsHelpDocument() || pPluginItem && pPluginItem->GetValue() == 2 )
++        if ( pDoc->IsHelpDocument() )
+             pFrame->GetDispatcher()->HideUI( TRUE );
+         else
+             pFrame->GetDispatcher()->HideUI( FALSE );
+diff --git sw/inc/cmdid.h sw/inc/cmdid.h
+index 942c01f..563e29b 100644
+--- sw/inc/cmdid.h
++++ sw/inc/cmdid.h
+@@ -1250,6 +1250,8 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
+ 
+ #define FN_SET_FRM_ALT_NAME             (FN_FRAME + 18)
+ 
++#define FN_INPLACE_OLE                  (FN_FRAME + 19)
++#define FN_OUTPLACE_OLE                 (FN_FRAME + 20)
+ 
+ //Member-Ids fuer Fill/SetVariable an Items
+ #define 		MID_STYLE	    0xe0
+diff --git sw/sdi/_frmsh.sdi sw/sdi/_frmsh.sdi
+index c136b91..c7e36a4 100644
+--- sw/sdi/_frmsh.sdi
++++ sw/sdi/_frmsh.sdi
+@@ -176,6 +176,20 @@ interface BaseTextFrame
+ 		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ 	]
+ 
++	FN_INPLACE_OLE   // status(final|play)
++	[
++		ExecMethod = Execute ;
++		StateMethod = GetState ;
++		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
++	]
++
++	FN_OUTPLACE_OLE   // status(final|play)
++	[
++		ExecMethod = Execute ;
++		StateMethod = GetState ;
++		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
++	]
++
+ 	SID_FRAME_LINESTYLE // status()
+ 	[
+ 		ExecMethod = ExecFrameStyle ;
+diff --git sw/sdi/swriter.sdi sw/sdi/swriter.sdi
+index 9b9118a..f5fa6aa 100644
+--- sw/sdi/swriter.sdi
++++ sw/sdi/swriter.sdi
+@@ -2141,6 +2141,56 @@ SfxVoidItem FrameDialog FN_FORMAT_FRAME_DLG
+ ]
+ 
+ //--------------------------------------------------------------------------
++SfxVoidItem InplaceOle FN_INPLACE_OLE
++()
++[
++	/* flags: */
++	AutoUpdate = FALSE,
++	Cachable = Cachable,
++	FastCall = TRUE,
++	HasCoreId = FALSE,
++	HasDialog = TRUE,
++	ReadOnlyDoc = FALSE,
++	Toggle = FALSE,
++	Container = FALSE,
++	RecordAbsolute = FALSE,
++	RecordPerItem;
++	Asynchron;
++
++	/* config: */
++	AccelConfig = TRUE,
++	MenuConfig = TRUE,
++	StatusBarConfig = FALSE,
++	ToolBoxConfig = TRUE,
++	GroupId = GID_FRAME;
++]
++
++//--------------------------------------------------------------------------
++SfxVoidItem OutplaceOle FN_OUTPLACE_OLE
++()
++[
++	/* flags: */
++	AutoUpdate = FALSE,
++	Cachable = Cachable,
++	FastCall = TRUE,
++	HasCoreId = FALSE,
++	HasDialog = TRUE,
++	ReadOnlyDoc = FALSE,
++	Toggle = FALSE,
++	Container = FALSE,
++	RecordAbsolute = FALSE,
++	RecordPerItem;
++	Asynchron;
++
++	/* config: */
++	AccelConfig = TRUE,
++	MenuConfig = TRUE,
++	StatusBarConfig = FALSE,
++	ToolBoxConfig = TRUE,
++	GroupId = GID_FRAME;
++]
++
++//--------------------------------------------------------------------------
+ SfxBoolItem GoDown FN_LINE_DOWN
+ (SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
+ [
+diff --git sw/sdi/swslots.src sw/sdi/swslots.src
+index 11c26c4..de8e705 100644
+--- sw/sdi/swslots.src
++++ sw/sdi/swslots.src
+@@ -290,6 +290,14 @@ SfxSlotInfo FN_FORMAT_FRAME_DLG
+ {
+ 	Slotname [ en-US ] = "Frame Properties";
+ };
++SfxSlotInfo FN_INPLACE_OLE
++{
++	Slotname [ en-US ] = "Open OLE object inplace";
++};
++SfxSlotInfo FN_OUTPLACE_OLE
++{
++	Slotname [ en-US ] = "Open OLE object outplace";
++};
+ SfxSlotInfo FN_FORMAT_GRAFIC_DLG
+ {
+ 	Slotname [ en-US ] = "Edit Graphics";
+diff --git sw/source/ui/app/mn.src sw/source/ui/app/mn.src
+index 6f04661..97f126a 100644
+--- sw/source/ui/app/mn.src
++++ sw/source/ui/app/mn.src
+@@ -973,6 +973,18 @@ Menu MN_OLE_POPUPMENU
+             HelpID = FN_FORMAT_FRAME_DLG ;
+             Text [ en-US ] = "Object..." ;
+         };
++        MenuItem
++        {
++            Identifier = FN_INPLACE_OLE ;
++            HelpID = FN_INPLACE_OLE ;
++            Text [ en-US ] = "Activate OLE object" ;
++        };
++        MenuItem
++        {
++            Identifier = FN_OUTPLACE_OLE ;
++            HelpID = FN_OUTPLACE_OLE ;
++            Text [ en-US ] = "Activate OLE object outplace" ;
++        };
+         MN_FRM_CAPTION_ITEM
+ 	};
+ };
+diff --git sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin.cxx
+index 1272793..ea7dfc0 100644
+--- sw/source/ui/docvw/edtwin.cxx
++++ sw/source/ui/docvw/edtwin.cxx
+@@ -40,6 +40,7 @@
+ #include <com/sun/star/i18n/XBreakIterator.hpp>
+ #include <com/sun/star/i18n/ScriptType.hpp>
+ #include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #include <com/sun/star/i18n/UnicodeScript.hpp>
+ 
+@@ -1778,6 +1779,14 @@ KEYINPUT_CHECKTABLE_INSDEL:
+ 					}
+ 					break;
+ 
++				case KEY_RETURN | KEY_SHIFT:	// SHIFT-Return
++					if( !rSh.HasReadonlySel() )
++					{
++                        if(rSh.GetSelectionType() & nsSelectionType::SEL_OLE)
++                            eKeyState = KS_LaunchOLEObject;
++                    }
++                    break;
++
+ 				case KEY_RETURN | KEY_MOD2:		// ALT-Return
+ 					if( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetCurNumRule() )
+ 						eKeyState = KS_NoNum;
+@@ -2175,7 +2184,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
+ 			}
+ 			break;
+         case KS_LaunchOLEObject:
+-            rSh.LaunchOLEObj();
++            if( rKEvt.GetKeyCode().IsShift() )
++                rSh.LaunchOLEObj(embed::EmbedVerbs::MS_OLEVERB_OPEN);
++            else
++                rSh.LaunchOLEObj();
+             eKeyState = KS_Ende;
+         break;
+         case KS_GoIntoFly :
+diff --git sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/frmsh.cxx
+index b55f883..4fe2c27 100644
+--- sw/source/ui/shells/frmsh.cxx
++++ sw/source/ui/shells/frmsh.cxx
+@@ -50,7 +50,7 @@
+ #include <sfx2/request.hxx>
+ #include <sfx2/objface.hxx>
+ #include <svx/hlnkitem.hxx>
+-
++#include <com/sun/star/embed/EmbedVerbs.hpp>
+ 
+ #include <fmturl.hxx>
+ #include <fmtclds.hxx>
+@@ -519,6 +519,16 @@ void SwFrameShell::Execute(SfxRequest &rReq)
+ 			}
+ 		}
+ 		break;
++		case FN_INPLACE_OLE:
++		{
++            rSh.LaunchOLEObj();
++        }
++        break;
++		case FN_OUTPLACE_OLE:
++		{
++            rSh.LaunchOLEObj(embed::EmbedVerbs::MS_OLEVERB_OPEN);
++        }
++        break;
+ 		case FN_FRAME_MIRROR_ON_EVEN_PAGES:
+ 		{
+ 			SwFmtHoriOrient aHori(aMgr.GetHoriOrient());



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]