sdview4.cxx (9e9dd2d5) sdview4.cxx (17e8bc19)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_sd.hxx"
26
27#include "View.hxx"
28#include <unotools/localfilehelper.hxx>
29#include <sfx2/request.hxx>
30#include <sfx2/docfilt.hxx>
31#include <sfx2/fcontnr.hxx>

--- 20 unchanged lines hidden (view full) ---

52#include "fuinsfil.hxx"
53#include "drawdoc.hxx"
54#include "sdresid.hxx"
55#include "strings.hrc"
56#include "imapinfo.hxx"
57#include "sdpage.hxx"
58#include "view/SlideSorterView.hxx"
59#include "undo/undoobjects.hxx"
22// MARKER(update_precomp.py): autogen include statement, do not remove
23#include "precompiled_sd.hxx"
24
25#include "View.hxx"
26#include <unotools/localfilehelper.hxx>
27#include <sfx2/request.hxx>
28#include <sfx2/docfilt.hxx>
29#include <sfx2/fcontnr.hxx>

--- 20 unchanged lines hidden (view full) ---

50#include "fuinsfil.hxx"
51#include "drawdoc.hxx"
52#include "sdresid.hxx"
53#include "strings.hrc"
54#include "imapinfo.hxx"
55#include "sdpage.hxx"
56#include "view/SlideSorterView.hxx"
57#include "undo/undoobjects.hxx"
60
61#include <comphelper/processfactory.hxx>
62#include <com/sun/star/embed/ElementModes.hpp>
63#include <com/sun/star/embed/XEmbedPersist.hpp>
64#include <com/sun/star/embed/Aspects.hpp>
65#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
66#include <svtools/soerr.hxx>
58#include <comphelper/processfactory.hxx>
59#include <com/sun/star/embed/ElementModes.hpp>
60#include <com/sun/star/embed/XEmbedPersist.hpp>
61#include <com/sun/star/embed/Aspects.hpp>
62#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
63#include <svtools/soerr.hxx>
67
68#include <sfx2/ipclient.hxx>
64#include <sfx2/ipclient.hxx>
65#include <svx/svdoashp.hxx>
69#include "glob.hrc"
70
71using namespace com::sun::star;
72
73namespace sd {
74
75#ifdef _MSC_VER
76#pragma optimize ( "", off )

--- 30 unchanged lines hidden (view full) ---

107 if( !pPickObj && pPV )
108 {
109 SdrPageView* pPageView = pPV;
110 PickObj(rPos, getHitTolLog(), pPickObj, pPageView);
111 }
112
113 if( mnAction == DND_ACTION_LINK && pPickObj && pPV )
114 {
66#include "glob.hrc"
67
68using namespace com::sun::star;
69
70namespace sd {
71
72#ifdef _MSC_VER
73#pragma optimize ( "", off )

--- 30 unchanged lines hidden (view full) ---

104 if( !pPickObj && pPV )
105 {
106 SdrPageView* pPageView = pPV;
107 PickObj(rPos, getHitTolLog(), pPickObj, pPageView);
108 }
109
110 if( mnAction == DND_ACTION_LINK && pPickObj && pPV )
111 {
115 const bool bIsGraphic = pPickObj->ISA( SdrGrafObj );
116 if( bIsGraphic || (pObj->IsEmptyPresObj() && !bOnMaster) )
112 const bool bIsGraphic(0 != dynamic_cast< SdrGrafObj* >(pPickObj));
113
114 if(bIsGraphic || (pPickObj->IsEmptyPresObj() && !bOnMaster)) // #121603# Do not use pObj, it may be NULL
117 {
118 if( IsUndoEnabled() )
119 BegUndo(String(SdResId(STR_INSERTGRAPHIC)));
120
121 SdPage* pPage = (SdPage*) pPickObj->GetPage();
122
123 if( bIsGraphic )
124 {

--- 25 unchanged lines hidden (view full) ---

150 if (pImageMap)
151 pNewGrafObj->InsertUserData(new SdIMapInfo(*pImageMap));
152
153 ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj); // maybe ReplaceObjectAtView
154
155 if( IsUndoEnabled() )
156 EndUndo();
157 }
115 {
116 if( IsUndoEnabled() )
117 BegUndo(String(SdResId(STR_INSERTGRAPHIC)));
118
119 SdPage* pPage = (SdPage*) pPickObj->GetPage();
120
121 if( bIsGraphic )
122 {

--- 25 unchanged lines hidden (view full) ---

148 if (pImageMap)
149 pNewGrafObj->InsertUserData(new SdIMapInfo(*pImageMap));
150
151 ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj); // maybe ReplaceObjectAtView
152
153 if( IsUndoEnabled() )
154 EndUndo();
155 }
158 else if (pPickObj->IsClosedObj() && !pPickObj->ISA(SdrOle2Obj))
156 else if(pPickObj->IsClosedObj())
159 {
157 {
160 /******************************************************************
161 * Das Objekt wird mit der Graphik gefuellt
162 ******************************************************************/
158 // fill object with graphic
163 if( IsUndoEnabled() )
164 {
165 BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
166 AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pPickObj));
167 EndUndo();
168 }
169
170 SfxItemSet aSet(mpDocSh->GetPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);

--- 466 unchanged lines hidden ---
159 if( IsUndoEnabled() )
160 {
161 BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
162 AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pPickObj));
163 EndUndo();
164 }
165
166 SfxItemSet aSet(mpDocSh->GetPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);

--- 466 unchanged lines hidden ---