drawview.cxx (4d7c9de0) | drawview.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 --- 29 unchanged lines hidden (view full) --- 38#include <svx/svdundo.hxx> 39#include <svx/svdocapt.hxx> 40#include <editeng/outlobj.hxx> 41#include <editeng/writingmodeitem.hxx> 42#include <svx/sdrpaintwindow.hxx> 43#include <sfx2/bindings.hxx> 44#include <sfx2/viewfrm.hxx> 45#include <svx/sdrundomanager.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 --- 29 unchanged lines hidden (view full) --- 38#include <svx/svdundo.hxx> 39#include <svx/svdocapt.hxx> 40#include <editeng/outlobj.hxx> 41#include <editeng/writingmodeitem.hxx> 42#include <svx/sdrpaintwindow.hxx> 43#include <sfx2/bindings.hxx> 44#include <sfx2/viewfrm.hxx> 45#include <svx/sdrundomanager.hxx> |
46#include <svx/xbtmpit.hxx> |
|
46 47#include "drawview.hxx" 48#include "global.hxx" 49#include "viewdata.hxx" 50#include "document.hxx" 51#include "drawutil.hxx" 52#include "futext.hxx" 53#include "globstr.hrc" --- 917 unchanged lines hidden (view full) --- 971} 972 973// support enhanced text edit for draw objects 974SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const 975{ 976 return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : 0; 977} 978 | 47 48#include "drawview.hxx" 49#include "global.hxx" 50#include "viewdata.hxx" 51#include "document.hxx" 52#include "drawutil.hxx" 53#include "futext.hxx" 54#include "globstr.hrc" --- 917 unchanged lines hidden (view full) --- 972} 973 974// support enhanced text edit for draw objects 975SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const 976{ 977 return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : 0; 978} 979 |
980// #123922# helper to apply a Graphic to an existing SdrObject 981SdrObject* ScDrawView::ApplyGraphicToObject( 982 SdrObject& rHitObject, 983 const Graphic& rGraphic, 984 const String& rBeginUndoText, 985 const String& rFile, 986 const String& rFilter) 987{ 988 if(dynamic_cast< SdrGrafObj* >(&rHitObject)) 989 { 990 SdrGrafObj* pNewGrafObj = (SdrGrafObj*)rHitObject.Clone(); 991 992 pNewGrafObj->SetGraphic(rGraphic); 993 BegUndo(rBeginUndoText); 994 ReplaceObjectAtView(&rHitObject, *GetSdrPageView(), pNewGrafObj); 995 996 // set in all cases - the Clone() will have copied an existing link (!) 997 pNewGrafObj->SetGraphicLink( rFile, rFilter ); 998 999 EndUndo(); 1000 return pNewGrafObj; 1001 } 1002 else if(rHitObject.IsClosedObj() && !dynamic_cast< SdrOle2Obj* >(&rHitObject)) 1003 { 1004 AddUndo(new SdrUndoAttrObj(rHitObject)); 1005 1006 SfxItemSet aSet(GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP); 1007 1008 aSet.Put(XFillStyleItem(XFILL_BITMAP)); 1009 aSet.Put(XFillBitmapItem(String(), rGraphic)); 1010 rHitObject.SetMergedItemSetAndBroadcast(aSet); 1011 return &rHitObject; 1012 } 1013 1014 return false; 1015} 1016 |
|
979// eof | 1017// eof |