drviews2.cxx (bb18ee55) drviews2.cxx (1dc0a253)
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

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

150 ::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
151
152 // Anpassungen Start/EndWidth #63083#
153 if(nSId == SID_ATTR_LINE_WIDTH)
154 {
155 SdrObject* pObj = NULL;
156 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
157 sal_uLong nCount = rMarkList.GetMarkCount();
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

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

150 ::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
151
152 // Anpassungen Start/EndWidth #63083#
153 if(nSId == SID_ATTR_LINE_WIDTH)
154 {
155 SdrObject* pObj = NULL;
156 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
157 sal_uLong nCount = rMarkList.GetMarkCount();
158 const sal_Int32 nNewLineWidth(((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue());
159 const bool bUndo(mpDrawView->IsUndoEnabled());
158
160
159 sal_Int32 nNewLineWidth = ((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue();
160
161 for (sal_uLong i=0; i<nCount; i++)
162 {
163 SfxItemSet aAttr(GetDoc()->GetPool());
164 pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
165 aAttr.Put(pObj->GetMergedItemSet());
166
167 sal_Int32 nActLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue();
168

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

188 sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
189 if(nValNew < 0)
190 nValNew = 0;
191 bSetItemSet = sal_True;
192 aAttr.Put(XLineEndWidthItem(nValNew));
193 }
194
195 if(bSetItemSet)
161 for (sal_uLong i=0; i<nCount; i++)
162 {
163 SfxItemSet aAttr(GetDoc()->GetPool());
164 pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
165 aAttr.Put(pObj->GetMergedItemSet());
166
167 sal_Int32 nActLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue();
168

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

188 sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
189 if(nValNew < 0)
190 nValNew = 0;
191 bSetItemSet = sal_True;
192 aAttr.Put(XLineEndWidthItem(nValNew));
193 }
194
195 if(bSetItemSet)
196 pObj->SetMergedItemSet(aAttr);
196 {
197 if(bUndo)
198 {
199 if(!bMergeUndo)
200 {
201 pUndoManager->EnterListAction( String(), String() );
202 mpDrawView->BegUndo();
203 bMergeUndo = sal_True;
204 }
205
206 mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
207 }
208
209 pObj->SetMergedItemSet(aAttr);
210 }
197 }
198 }
211 }
212 }
213
214 if(bMergeUndo)
215 {
216 mpDrawView->EndUndo();
217 }
199 }
200
201 if (nSId == SID_ATTR_FILL_SHADOW)
202 {
203 // Ggf. werden transparente Objekte wei?gefuellt
204 SdrObject* pObj = NULL;
205 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
206 sal_uLong nCount = rMarkList.GetMarkCount();
218 }
219
220 if (nSId == SID_ATTR_FILL_SHADOW)
221 {
222 // Ggf. werden transparente Objekte wei?gefuellt
223 SdrObject* pObj = NULL;
224 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
225 sal_uLong nCount = rMarkList.GetMarkCount();
207
208 const bool bUndo = mpDrawView->IsUndoEnabled();
209
210 for (sal_uLong i=0; i<nCount; i++)
211 {
212 SfxItemSet aAttr(GetDoc()->GetPool());
213 pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
214
215 // #i25616#
216 if(!pObj->ISA(SdrGrafObj))
217 {
218 aAttr.Put(pObj->GetMergedItemSet());
219
226 const bool bUndo = mpDrawView->IsUndoEnabled();
227
228 for (sal_uLong i=0; i<nCount; i++)
229 {
230 SfxItemSet aAttr(GetDoc()->GetPool());
231 pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
232
233 // #i25616#
234 if(!pObj->ISA(SdrGrafObj))
235 {
236 aAttr.Put(pObj->GetMergedItemSet());
237
220 const XFillStyleItem& rFillStyle =
221 (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE);
238 const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE);
239 const XLineStyleItem& rLineStyle = (const XLineStyleItem&) aAttr.Get(XATTR_LINESTYLE);
222
240
223 if (rFillStyle.GetValue() == XFILL_NONE)
241 if(XFILL_NONE == rFillStyle.GetValue() && XLINE_NONE == rLineStyle.GetValue())
224 {
225 if( bUndo )
226 {
227 // Vorlage hat keine Fuellung,
228 // daher hart attributieren: Fuellung setzen
229 if (!bMergeUndo)
230 {
231 bMergeUndo = sal_True;

--- 765 unchanged lines hidden ---
242 {
243 if( bUndo )
244 {
245 // Vorlage hat keine Fuellung,
246 // daher hart attributieren: Fuellung setzen
247 if (!bMergeUndo)
248 {
249 bMergeUndo = sal_True;

--- 765 unchanged lines hidden ---