Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <svx/svxdlg.hxx>
31 : : #include <svx/dialogs.hrc>
32 : :
33 : : #include "scitems.hxx"
34 : :
35 : : #include <editeng/eeitem.hxx>
36 : : #include <svx/fontwork.hxx>
37 : : #include <svl/srchitem.hxx>
38 : : #include <svx/svdpage.hxx>
39 : : #include <sfx2/app.hxx>
40 : : #include <sfx2/objface.hxx>
41 : : #include <sfx2/objsh.hxx>
42 : : #include <sfx2/request.hxx>
43 : : #include <sfx2/dispatch.hxx>
44 : : #include <svl/whiter.hxx>
45 : : #include <vcl/msgbox.hxx>
46 : :
47 : : #include "drawsh.hxx"
48 : : #include "drwlayer.hxx"
49 : : #include "sc.hrc"
50 : : #include "viewdata.hxx"
51 : : #include "document.hxx"
52 : : #include "docpool.hxx"
53 : : #include "drawview.hxx"
54 : : #include "scresid.hxx"
55 : : #include <svx/svdobj.hxx>
56 : : #include <svx/drawitem.hxx>
57 : : #include <svx/xtable.hxx>
58 : :
59 : : #define ScDrawShell
60 : : #include "scslots.hxx"
61 : :
62 : : #include "userdat.hxx"
63 : : #include <svl/macitem.hxx>
64 : : #include <sfx2/evntconf.hxx>
65 : : #include <sfx2/viewsh.hxx>
66 : : #include <com/sun/star/util/XModifiable.hpp>
67 : : #include <com/sun/star/frame/XFrame.hpp>
68 : :
69 : : //------------------------------------------------------------------
70 : :
71 [ # # ][ # # ]: 0 : TYPEINIT1( ScDrawShell, SfxShell );
72 : :
73 [ + + ][ + - ]: 510 : SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) )
[ + - ]
74 : : {
75 [ + - ]: 51 : SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
76 [ + - ]: 51 : ScResId(RID_DRAW_OBJECTBAR) );
77 [ + - ][ + - ]: 51 : SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_DRAW) );
78 : 51 : SFX_CHILDWINDOW_REGISTRATION( SvxFontWorkChildWindow::GetChildWindowId() );
79 : 51 : }
80 : :
81 : :
82 : : // abschalten der nicht erwuenschten Acceleratoren:
83 : :
84 : 0 : void ScDrawShell::StateDisableItems( SfxItemSet &rSet )
85 : : {
86 [ # # ]: 0 : SfxWhichIter aIter(rSet);
87 [ # # ]: 0 : sal_uInt16 nWhich = aIter.FirstWhich();
88 : :
89 [ # # ]: 0 : while (nWhich)
90 : : {
91 [ # # ]: 0 : rSet.DisableItem( nWhich );
92 [ # # ]: 0 : nWhich = aIter.NextWhich();
93 [ # # ]: 0 : }
94 : 0 : }
95 : :
96 : 0 : void lcl_setModified( SfxObjectShell* pShell )
97 : : {
98 [ # # ]: 0 : if ( pShell )
99 : : {
100 [ # # ][ # # ]: 0 : com::sun::star::uno::Reference< com::sun::star::util::XModifiable > xModif( pShell->GetModel(), com::sun::star::uno::UNO_QUERY );
101 [ # # ]: 0 : if ( xModif.is() )
102 [ # # ][ # # ]: 0 : xModif->setModified( sal_True );
103 : : }
104 : 0 : }
105 : :
106 : 0 : void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
107 : : {
108 : 0 : sal_uInt16 nSlot = rReq.GetSlot();
109 : 0 : Window* pWin = pViewData->GetActiveWin();
110 : 0 : ScDrawView* pView = pViewData->GetScDrawView();
111 : 0 : SdrModel* pDoc = pViewData->GetDocument()->GetDrawLayer();
112 : :
113 : 0 : const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
114 : 0 : sal_uLong nMarkCount = rMarkList.GetMarkCount();
115 : 0 : SdrObject* pSingleSelectedObj = NULL;
116 [ # # ]: 0 : if ( nMarkCount > 0 )
117 : 0 : pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
118 : :
119 [ # # # # : 0 : switch ( nSlot )
# # # # #
# # ]
120 : : {
121 : : case SID_ASSIGNMACRO:
122 : : {
123 [ # # ]: 0 : if ( pSingleSelectedObj )
124 : 0 : ExecuteMacroAssign( pSingleSelectedObj, pWin );
125 : : }
126 : 0 : break;
127 : :
128 : : case SID_TEXT_STANDARD: // Harte Textattributierung loeschen
129 : : {
130 [ # # ]: 0 : SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
131 [ # # ][ # # ]: 0 : pView->SetAttributes(aEmptyAttr, sal_True);
132 : : }
133 : 0 : break;
134 : :
135 : : case SID_ATTR_LINE_STYLE:
136 : : case SID_ATTR_LINEEND_STYLE:
137 : : case SID_ATTR_LINE_DASH:
138 : : case SID_ATTR_LINE_WIDTH:
139 : : case SID_ATTR_LINE_COLOR:
140 : : case SID_ATTR_FILL_STYLE:
141 : : case SID_ATTR_FILL_COLOR:
142 : : case SID_ATTR_FILL_GRADIENT:
143 : : case SID_ATTR_FILL_HATCH:
144 : : case SID_ATTR_FILL_BITMAP:
145 : :
146 : : // #i25616#
147 : : case SID_ATTR_FILL_SHADOW:
148 : : {
149 : : // Wenn ToolBar vertikal :
150 [ # # ]: 0 : if ( !rReq.GetArgs() )
151 : : {
152 [ # # # ]: 0 : switch ( nSlot )
153 : : {
154 : : case SID_ATTR_LINE_STYLE:
155 : : case SID_ATTR_LINE_DASH:
156 : : case SID_ATTR_LINE_WIDTH:
157 : : case SID_ATTR_LINE_COLOR:
158 : 0 : ExecuteLineDlg( rReq );
159 : 0 : break;
160 : :
161 : : case SID_ATTR_FILL_STYLE:
162 : : case SID_ATTR_FILL_COLOR:
163 : : case SID_ATTR_FILL_GRADIENT:
164 : : case SID_ATTR_FILL_HATCH:
165 : : case SID_ATTR_FILL_BITMAP:
166 : :
167 : : // #i25616#
168 : : case SID_ATTR_FILL_SHADOW:
169 : :
170 : 0 : ExecuteAreaDlg( rReq );
171 : 0 : break;
172 : :
173 : : default:
174 : 0 : break;
175 : : }
176 : :
177 : : //=====
178 : 0 : return;
179 : : //=====
180 : : }
181 : :
182 [ # # ]: 0 : if( pView->AreObjectsMarked() )
183 : 0 : pView->SetAttrToMarked( *rReq.GetArgs(), false );
184 : : else
185 : 0 : pView->SetDefaultAttr( *rReq.GetArgs(), false);
186 : 0 : pView->InvalidateAttribs();
187 : : }
188 : 0 : break;
189 : :
190 : : case SID_ATTRIBUTES_LINE:
191 : 0 : ExecuteLineDlg( rReq );
192 : 0 : break;
193 : :
194 : : case SID_ATTRIBUTES_AREA:
195 : 0 : ExecuteAreaDlg( rReq );
196 : 0 : break;
197 : :
198 : : case SID_DRAWTEXT_ATTR_DLG:
199 : 0 : ExecuteTextAttrDlg( rReq );
200 : 0 : break;
201 : :
202 : : case SID_DRAW_HLINK_EDIT:
203 [ # # ]: 0 : if ( pSingleSelectedObj )
204 : 0 : pViewData->GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
205 : 0 : break;
206 : :
207 : : case SID_DRAW_HLINK_DELETE:
208 [ # # ]: 0 : if ( pSingleSelectedObj )
209 [ # # ]: 0 : SetHlinkForObject( pSingleSelectedObj, rtl::OUString() );
210 : 0 : break;
211 : :
212 : : case SID_OPEN_HYPERLINK:
213 [ # # ]: 0 : if ( nMarkCount == 1 )
214 : : {
215 : 0 : SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
216 [ # # ]: 0 : if ( pObj->IsGroupObject() )
217 : : {
218 : 0 : SdrPageView* pPV = 0;
219 : 0 : SdrObject* pHit = 0;
220 [ # # ][ # # ]: 0 : if ( pView->PickObj( pWin->PixelToLogic( pViewData->GetMousePosPixel() ), pView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) )
[ # # ][ # # ]
221 : 0 : pObj = pHit;
222 : : }
223 : :
224 : 0 : ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
225 [ # # ][ # # ]: 0 : if ( pInfo && !pInfo->GetHlink().isEmpty() )
[ # # ]
226 [ # # ]: 0 : ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() );
227 : : }
228 : 0 : break;
229 : :
230 : : case SID_ATTR_TRANSFORM:
231 : : {
232 [ # # ]: 0 : if ( pView->AreObjectsMarked() )
233 : : {
234 : 0 : const SfxItemSet* pArgs = rReq.GetArgs();
235 : :
236 [ # # ]: 0 : if( !pArgs )
237 : : {
238 [ # # ]: 0 : if( rMarkList.GetMark(0) != 0 )
239 : : {
240 : 0 : SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
241 [ # # ]: 0 : if( pObj->GetObjIdentifier() == OBJ_CAPTION )
242 : : {
243 : : // --------- Itemset fuer Caption --------
244 [ # # ]: 0 : SfxItemSet aNewAttr(pDoc->GetItemPool());
245 [ # # ]: 0 : pView->GetAttributes(aNewAttr);
246 : : // --------- Itemset fuer Groesse und Position --------
247 [ # # ]: 0 : SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
248 : :
249 [ # # ]: 0 : SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
250 [ # # ]: 0 : if ( pFact )
251 : : {
252 [ # # ]: 0 : SfxAbstractTabDialog *pDlg = pFact->CreateCaptionDialog( pWin, pView );
253 : :
254 [ # # ]: 0 : const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
255 [ # # ]: 0 : SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
256 [ # # ]: 0 : aCombSet.Put( aNewAttr );
257 [ # # ]: 0 : aCombSet.Put( aNewGeoAttr );
258 [ # # ]: 0 : pDlg->SetInputSet( &aCombSet );
259 : :
260 [ # # ][ # # ]: 0 : if (pDlg->Execute() == RET_OK)
261 : : {
262 [ # # ][ # # ]: 0 : rReq.Done(*(pDlg->GetOutputItemSet()));
263 [ # # ][ # # ]: 0 : pView->SetAttributes(*pDlg->GetOutputItemSet());
264 [ # # ][ # # ]: 0 : pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
265 : : }
266 : :
267 [ # # ][ # # ]: 0 : delete pDlg;
[ # # ]
268 [ # # ][ # # ]: 0 : }
269 : : }
270 : : else
271 : : {
272 [ # # ]: 0 : SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
273 [ # # ]: 0 : SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
274 [ # # ]: 0 : if(pFact)
275 : : {
276 [ # # ]: 0 : SfxAbstractTabDialog* pDlg = pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView );
277 : : OSL_ENSURE(pDlg, "Dialog creation failed!");
278 [ # # ][ # # ]: 0 : if (pDlg->Execute() == RET_OK)
279 : : {
280 [ # # ][ # # ]: 0 : rReq.Done(*(pDlg->GetOutputItemSet()));
281 [ # # ][ # # ]: 0 : pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
282 : : }
283 [ # # ][ # # ]: 0 : delete pDlg;
284 [ # # ]: 0 : }
285 : : }
286 : : }
287 : :
288 : :
289 : : }
290 : : else
291 : 0 : pView->SetGeoAttrToMarked( *pArgs );
292 : : }
293 : : }
294 : 0 : break;
295 : :
296 : : default:
297 : 0 : break;
298 : : }
299 : : }
300 : :
301 : 0 : void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
302 : : {
303 [ # # ][ # # ]: 0 : SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
[ # # ]
304 [ # # ]: 0 : ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
305 [ # # ]: 0 : if ( !pInfo->GetMacro().isEmpty() )
306 : : {
307 [ # # ]: 0 : SvxMacroTableDtor aTab;
308 : 0 : rtl::OUString sMacro = pInfo->GetMacro();
309 [ # # ][ # # ]: 0 : aTab.Insert(SFX_EVENT_MOUSECLICK_OBJECT, SvxMacro(sMacro, rtl::OUString()));
[ # # ]
310 [ # # ]: 0 : aItem.SetMacroTable( aTab );
311 : : }
312 : :
313 : : // create empty itemset for macro-dlg
314 [ # # ][ # # ]: 0 : SfxItemSet* pItemSet = new SfxItemSet(SFX_APP()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
[ # # ]
315 [ # # ]: 0 : pItemSet->Put ( aItem, SID_ATTR_MACROITEM );
316 : :
317 [ # # ]: 0 : SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
318 [ # # ][ # # ]: 0 : aNamesItem.AddEvent( ScResId(RID_SCSTR_ONCLICK), String(), SFX_EVENT_MOUSECLICK_OBJECT );
[ # # ][ # # ]
[ # # ][ # # ]
319 [ # # ]: 0 : pItemSet->Put( aNamesItem, SID_EVENTCONFIG );
320 : :
321 : 0 : com::sun::star::uno::Reference < com::sun::star::frame::XFrame > xFrame;
322 [ # # ][ # # ]: 0 : if (GetViewShell())
323 [ # # ][ # # ]: 0 : xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
[ # # ][ # # ]
324 : :
325 [ # # ]: 0 : SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
326 [ # # ]: 0 : SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG );
327 [ # # ][ # # ]: 0 : if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
[ # # ][ # # ]
328 : : {
329 [ # # ]: 0 : const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
330 : : const SfxPoolItem* pItem;
331 [ # # ][ # # ]: 0 : if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
332 : : {
333 : 0 : rtl::OUString sMacro;
334 [ # # ]: 0 : const SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT );
335 [ # # ]: 0 : if ( pMacro )
336 : 0 : sMacro = pMacro->GetMacName();
337 : :
338 [ # # ][ # # ]: 0 : if ( pObj->IsGroupObject() )
339 : : {
340 [ # # ]: 0 : SdrObjList* pOL = pObj->GetSubList();
341 [ # # ]: 0 : sal_uLong nObj = pOL->GetObjCount();
342 [ # # ]: 0 : for ( sal_uLong index=0; index<nObj; ++index )
343 : : {
344 [ # # ][ # # ]: 0 : pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), sal_True );
345 : 0 : pInfo->SetMacro( sMacro );
346 : : }
347 : : }
348 : : else
349 : 0 : pInfo->SetMacro( sMacro );
350 [ # # ][ # # ]: 0 : lcl_setModified( GetObjectShell() );
351 : : }
352 : : }
353 : :
354 [ # # ][ # # ]: 0 : delete pMacroDlg;
355 [ # # ][ # # ]: 0 : delete pItemSet;
[ # # ][ # # ]
356 : 0 : }
357 : :
358 : 0 : void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
359 : : {
360 [ # # ]: 0 : ScDrawView* pView = pViewData->GetScDrawView();
361 : 0 : sal_Bool bHasMarked = pView->AreObjectsMarked();
362 : 0 : const SdrObject* pObj = NULL;
363 : 0 : const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
364 : :
365 [ # # ]: 0 : if( rMarkList.GetMarkCount() == 1 )
366 [ # # ][ # # ]: 0 : pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
367 : :
368 [ # # ]: 0 : SfxItemSet aNewAttr( pView->GetDefaultAttr() );
369 [ # # ]: 0 : if( bHasMarked )
370 [ # # ]: 0 : pView->MergeAttrFromMarked( aNewAttr, false );
371 : :
372 [ # # ]: 0 : SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
373 : : OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
374 : : SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(),
375 : : &aNewAttr,
376 [ # # ][ # # ]: 0 : pViewData->GetDocument()->GetDrawLayer(),
377 : : pObj,
378 [ # # ][ # # ]: 0 : bHasMarked);
379 : : OSL_ENSURE(pDlg, "Dialogdiet fail!");
380 [ # # ]: 0 : if ( nTabPage != 0xffff )
381 [ # # ]: 0 : pDlg->SetCurPageId( nTabPage );
382 : :
383 [ # # ][ # # ]: 0 : if ( pDlg->Execute() == RET_OK )
384 : : {
385 [ # # ]: 0 : if( bHasMarked )
386 [ # # ][ # # ]: 0 : pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
387 : : else
388 [ # # ][ # # ]: 0 : pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
389 : :
390 [ # # ]: 0 : pView->InvalidateAttribs();
391 [ # # ]: 0 : rReq.Done();
392 : : }
393 : :
394 [ # # ][ # # ]: 0 : delete pDlg;
[ # # ]
395 : 0 : }
396 : :
397 : 0 : void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
398 : : {
399 [ # # ]: 0 : ScDrawView* pView = pViewData->GetScDrawView();
400 : 0 : sal_Bool bHasMarked = pView->AreObjectsMarked();
401 : :
402 [ # # ]: 0 : SfxItemSet aNewAttr( pView->GetDefaultAttr() );
403 [ # # ]: 0 : if( bHasMarked )
404 [ # # ]: 0 : pView->MergeAttrFromMarked( aNewAttr, false );
405 : :
406 : :
407 [ # # ]: 0 : SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
408 : : AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog(
409 : : pViewData->GetDialogParent(), &aNewAttr,
410 [ # # ][ # # ]: 0 : pViewData->GetDocument()->GetDrawLayer(), pView);
[ # # ][ # # ]
411 : :
412 [ # # ]: 0 : if ( nTabPage != 0xffff )
413 [ # # ]: 0 : pDlg->SetCurPageId( nTabPage );
414 : :
415 [ # # ][ # # ]: 0 : if ( pDlg->Execute() == RET_OK )
416 : : {
417 [ # # ]: 0 : if( bHasMarked )
418 [ # # ][ # # ]: 0 : pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
419 : : else
420 [ # # ][ # # ]: 0 : pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
421 : :
422 [ # # ]: 0 : pView->InvalidateAttribs();
423 [ # # ]: 0 : rReq.Done();
424 : : }
425 : :
426 [ # # ][ # # ]: 0 : delete pDlg;
[ # # ]
427 : 0 : }
428 : :
429 : 0 : void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 /* nTabPage */ )
430 : : {
431 [ # # ]: 0 : ScDrawView* pView = pViewData->GetScDrawView();
432 : 0 : sal_Bool bHasMarked = pView->AreObjectsMarked();
433 [ # # ]: 0 : SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
434 : :
435 [ # # ]: 0 : if( bHasMarked )
436 [ # # ]: 0 : pView->MergeAttrFromMarked( aNewAttr, false );
437 : :
438 [ # # ]: 0 : SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
439 [ # # ][ # # ]: 0 : SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView );
440 : :
441 [ # # ]: 0 : sal_uInt16 nResult = pDlg->Execute();
442 : :
443 [ # # ]: 0 : if ( RET_OK == nResult )
444 : : {
445 [ # # ]: 0 : if ( bHasMarked )
446 [ # # ][ # # ]: 0 : pView->SetAttributes( *pDlg->GetOutputItemSet() );
447 : : else
448 [ # # ][ # # ]: 0 : pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
449 : :
450 [ # # ]: 0 : pView->InvalidateAttribs();
451 [ # # ]: 0 : rReq.Done();
452 : : }
453 [ # # ][ # # ]: 0 : delete( pDlg );
[ # # ]
454 : 0 : }
455 : :
456 : 0 : void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk )
457 : : {
458 [ # # ]: 0 : if ( pObj )
459 : : {
460 : 0 : ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
461 : 0 : pInfo->SetHlink( rHlnk );
462 : 0 : lcl_setModified( GetObjectShell() );
463 : : }
464 : 0 : }
465 : :
466 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|