fuins1.cxx (b3f79822) | fuins1.cxx (52f1c2ee) |
---|---|
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 --- 31 unchanged lines hidden (view full) --- 40#include "fuinsert.hxx" 41#include "tabvwsh.hxx" 42#include "drwlayer.hxx" 43#include "drawview.hxx" 44#include "document.hxx" 45#include "scresid.hxx" 46#include "progress.hxx" 47#include "sc.hrc" | 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 --- 31 unchanged lines hidden (view full) --- 40#include "fuinsert.hxx" 41#include "tabvwsh.hxx" 42#include "drwlayer.hxx" 43#include "drawview.hxx" 44#include "document.hxx" 45#include "scresid.hxx" 46#include "progress.hxx" 47#include "sc.hrc" |
48#include "globstr.hrc" |
|
48 49 50 51////======================================================================== 52//// class ImportProgress 53//// 54//// Bemerkung: 55//// Diese Klasse stellt lediglich den Handler fuer den ImportProgress des --- 86 unchanged lines hidden (view full) --- 142} 143 144//------------------------------------------------------------------------ 145 146void lcl_InsertGraphic( const Graphic& rGraphic, 147 const String& rFileName, const String& rFilterName, sal_Bool bAsLink, sal_Bool bApi, 148 ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView ) 149{ | 49 50 51 52////======================================================================== 53//// class ImportProgress 54//// 55//// Bemerkung: 56//// Diese Klasse stellt lediglich den Handler fuer den ImportProgress des --- 86 unchanged lines hidden (view full) --- 143} 144 145//------------------------------------------------------------------------ 146 147void lcl_InsertGraphic( const Graphic& rGraphic, 148 const String& rFileName, const String& rFilterName, sal_Bool bAsLink, sal_Bool bApi, 149 ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView ) 150{ |
151 ScDrawView* pDrawView = pViewSh->GetScDrawView(); 152 153 // #123922# check if an existing object is selected; if yes, evtl. replace 154 // the graphic for a SdrGraphObj (including link state updates) or adapt the fill 155 // style for other objects 156 if(pDrawView && 1 == pDrawView->GetMarkedObjectCount()) 157 { 158 SdrObject* pPickObj = pDrawView->GetMarkedObjectByIndex(0); 159 160 if(pPickObj) 161 { 162 //sal_Int8 nAction(DND_ACTION_MOVE); 163 //Point aPos; 164 const String aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); 165 const String aEmpty; 166 167 SdrObject* pResult = pDrawView->ApplyGraphicToObject( 168 *pPickObj, 169 rGraphic, 170 aBeginUndo, 171 bAsLink ? rFileName : aEmpty, 172 bAsLink ? rFilterName : aEmpty); 173 174 if(pResult) 175 { 176 // we are done; mark the modified/new object 177 pDrawView->MarkObj(pResult, pDrawView->GetSdrPageView()); 178 return; 179 } 180 } 181 } 182 |
|
150 // #74778# set the size so the graphic has its original pixel size 151 // at 100% view scale (as in SetMarkedOriginalSize), 152 // instead of respecting the current view scale | 183 // #74778# set the size so the graphic has its original pixel size 184 // at 100% view scale (as in SetMarkedOriginalSize), 185 // instead of respecting the current view scale |
153 154 ScDrawView* pDrawView = pViewSh->GetScDrawView(); 155 MapMode aSourceMap = rGraphic.GetPrefMapMode(); | 186 MapMode aSourceMap = rGraphic.GetPrefMapMode(); |
156 MapMode aDestMap( MAP_100TH_MM ); 157 if ( aSourceMap.GetMapUnit() == MAP_PIXEL && pDrawView ) 158 { 159 Fraction aScaleX, aScaleY; 160 pDrawView->CalcNormScale( aScaleX, aScaleY ); 161 aDestMap.SetScaleX(aScaleX); 162 aDestMap.SetScaleY(aScaleY); 163 } --- 280 unchanged lines hidden --- | 187 MapMode aDestMap( MAP_100TH_MM ); 188 if ( aSourceMap.GetMapUnit() == MAP_PIXEL && pDrawView ) 189 { 190 Fraction aScaleX, aScaleY; 191 pDrawView->CalcNormScale( aScaleX, aScaleY ); 192 aDestMap.SetScaleX(aScaleX); 193 aDestMap.SetScaleY(aScaleY); 194 } --- 280 unchanged lines hidden --- |