fuinsert.cxx (79aad27f) fuinsert.cxx (4bf7a51a)
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

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

85#include "DrawDocShell.hxx"
86#include "GraphicDocShell.hxx"
87#include "strings.hrc"
88#include "drawdoc.hxx"
89#include "sdgrffilter.hxx"
90#include "sdxfer.hxx"
91#include <vcl/svapp.hxx>
92#include "undo/undoobjects.hxx"
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

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

85#include "DrawDocShell.hxx"
86#include "GraphicDocShell.hxx"
87#include "strings.hrc"
88#include "drawdoc.hxx"
89#include "sdgrffilter.hxx"
90#include "sdxfer.hxx"
91#include <vcl/svapp.hxx>
92#include "undo/undoobjects.hxx"
93#include "glob.hrc"
93
94using namespace com::sun::star;
95
96namespace sd {
97
98TYPEINIT1( FuInsertGraphic, FuPoor );
99TYPEINIT1( FuInsertClipboard, FuPoor );
100TYPEINIT1( FuInsertOLE, FuPoor );

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

348 aPos.X() -= aSize.Width() / 2;
349 aPos.Y() -= aSize.Height() / 2;
350 aRect = Rectangle(aPos, aSize);
351 }
352
353 SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
354 SdrPageView* pPV = mpView->GetSdrPageView();
355
94
95using namespace com::sun::star;
96
97namespace sd {
98
99TYPEINIT1( FuInsertGraphic, FuPoor );
100TYPEINIT1( FuInsertClipboard, FuPoor );
101TYPEINIT1( FuInsertOLE, FuPoor );

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

349 aPos.X() -= aSize.Width() / 2;
350 aPos.Y() -= aSize.Height() / 2;
351 aRect = Rectangle(aPos, aSize);
352 }
353
354 SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
355 SdrPageView* pPV = mpView->GetSdrPageView();
356
357 if(pOleObj)
358 {
359 // #119287#
360 SdrModel* pModel = mpView ? mpView->GetModel() : 0;
361 SfxStyleSheetBasePool* pSfxStyleSheetBasePool = pModel ? pModel->GetStyleSheetPool() : 0;
362 SfxStyleSheet* pSheet = pSfxStyleSheetBasePool ? dynamic_cast< SfxStyleSheet* >(pSfxStyleSheetBasePool->Find(String(SdResId(STR_POOLSHEET_OBJNOLINENOFILL)), SD_STYLE_FAMILY_GRAPHICS)) : 0;
363
364 if(pSheet)
365 {
366 pOleObj->SetStyleSheet(pSheet, false);
367 }
368 else
369 {
370 pOleObj->SetMergedItem(XFillStyleItem(XFILL_NONE));
371 pOleObj->SetMergedItem(XLineStyleItem(XLINE_NONE));
372 OSL_ENSURE(false, "Style Sheet for OLE not found (!)");
373 }
374 }
375
356 // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
357 if( pPickObj )
358 {
359 SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
360 if(pPage && pPage->IsPresObj(pPickObj))
361 {
362 pPage->InsertPresObj( pOleObj, ePresObjKind );
363 pOleObj->SetUserCall(pPickObj->GetUserCall());

--- 412 unchanged lines hidden ---
376 // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
377 if( pPickObj )
378 {
379 SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
380 if(pPage && pPage->IsPresObj(pPickObj))
381 {
382 pPage->InsertPresObj( pOleObj, ePresObjKind );
383 pOleObj->SetUserCall(pPickObj->GetUserCall());

--- 412 unchanged lines hidden ---