vcl: allow for overriding the default PDF rendering resolution
[LibreOffice.git] / chart2 / source / controller / main / ShapeController.cxx
blob1b8f6613c6b50663cfac9ffdf6463d3b136a42f0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "ShapeController.hxx"
21 #include <ShapeController.h>
22 #include <ChartController.hxx>
23 #include <ChartWindow.hxx>
24 #include <ViewElementListProvider.hxx>
25 #include <dlg_ShapeFont.hxx>
26 #include <dlg_ShapeParagraph.hxx>
27 #include <chartview/DrawModelWrapper.hxx>
29 #include <com/sun/star/drawing/XShapes.hpp>
30 #include <com/sun/star/frame/CommandGroup.hpp>
31 #include <com/sun/star/frame/XStorable.hpp>
33 #include <vcl/svapp.hxx>
34 #include <editeng/formatbreakitem.hxx>
35 #include <editeng/editids.hrc>
36 #include <editeng/eeitem.hxx>
37 #include <editeng/hyphenzoneitem.hxx>
38 #include <editeng/orphitem.hxx>
39 #include <editeng/spltitem.hxx>
40 #include <svx/svxdlg.hxx>
41 #include <editeng/widwitem.hxx>
42 #include <tools/diagnose_ex.h>
44 using namespace ::com::sun::star;
45 using namespace ::com::sun::star::frame;
47 using ::com::sun::star::uno::Reference;
48 using ::com::sun::star::uno::Sequence;
50 namespace chart
53 ShapeController::ShapeController( const Reference< uno::XComponentContext >& rxContext,
54 ChartController* pController )
55 :FeatureCommandDispatchBase( rxContext )
56 ,m_pChartController( pController )
60 ShapeController::~ShapeController()
64 // WeakComponentImplHelperBase
65 void ShapeController::disposing()
69 // XEventListener
70 void ShapeController::disposing( const lang::EventObject& /* Source */ )
74 FeatureState ShapeController::getState( const OUString& rCommand )
76 FeatureState aReturn;
77 aReturn.bEnabled = false;
78 aReturn.aState <<= false;
80 bool bWritable = false;
81 if ( m_pChartController )
83 Reference< frame::XStorable > xStorable( m_pChartController->getModel(), uno::UNO_QUERY );
84 if ( xStorable.is() )
86 bWritable = !xStorable->isReadonly();
90 SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommand );
91 if ( aIter != m_aSupportedFeatures.end() )
93 sal_uInt16 nFeatureId = aIter->second.nFeatureId;
94 switch ( nFeatureId )
96 case COMMAND_ID_FORMAT_LINE:
97 case COMMAND_ID_FORMAT_AREA:
98 case COMMAND_ID_TEXT_ATTRIBUTES:
99 case COMMAND_ID_TRANSFORM_DIALOG:
100 case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
101 case COMMAND_ID_RENAME_OBJECT:
103 aReturn.bEnabled = bWritable;
104 aReturn.aState <<= false;
106 break;
107 case COMMAND_ID_BRING_TO_FRONT:
108 case COMMAND_ID_FORWARD:
110 aReturn.bEnabled = ( bWritable && isForwardPossible() );
111 aReturn.aState <<= false;
113 break;
114 case COMMAND_ID_BACKWARD:
115 case COMMAND_ID_SEND_TO_BACK:
118 aReturn.bEnabled = ( bWritable && isBackwardPossible() );
119 aReturn.aState <<= false;
121 break;
122 case COMMAND_ID_FONT_DIALOG:
123 case COMMAND_ID_PARAGRAPH_DIALOG:
125 aReturn.bEnabled = bWritable;
126 aReturn.aState <<= false;
128 break;
129 default:
131 aReturn.bEnabled = false;
132 aReturn.aState <<= false;
134 break;
138 return aReturn;
141 void ShapeController::execute( const OUString& rCommand, const Sequence< beans::PropertyValue>& )
143 SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommand );
144 if ( aIter != m_aSupportedFeatures.end() )
146 sal_uInt16 nFeatureId = aIter->second.nFeatureId;
147 switch ( nFeatureId )
149 case COMMAND_ID_FORMAT_LINE:
151 executeDispatch_FormatLine();
153 break;
154 case COMMAND_ID_FORMAT_AREA:
156 executeDispatch_FormatArea();
158 break;
159 case COMMAND_ID_TEXT_ATTRIBUTES:
161 executeDispatch_TextAttributes();
163 break;
164 case COMMAND_ID_TRANSFORM_DIALOG:
166 executeDispatch_TransformDialog();
168 break;
169 case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
171 executeDispatch_ObjectTitleDescription();
173 break;
174 case COMMAND_ID_RENAME_OBJECT:
176 executeDispatch_RenameObject();
178 break;
179 case COMMAND_ID_BRING_TO_FRONT:
180 case COMMAND_ID_FORWARD:
181 case COMMAND_ID_BACKWARD:
182 case COMMAND_ID_SEND_TO_BACK:
184 executeDispatch_ChangeZOrder( nFeatureId );
186 break;
187 case COMMAND_ID_FONT_DIALOG:
189 executeDispatch_FontDialog();
191 break;
192 case COMMAND_ID_PARAGRAPH_DIALOG:
194 executeDispatch_ParagraphDialog();
196 break;
197 default:
200 break;
205 void ShapeController::describeSupportedFeatures()
207 implDescribeSupportedFeature( ".uno:FormatLine", COMMAND_ID_FORMAT_LINE, CommandGroup::FORMAT );
208 implDescribeSupportedFeature( ".uno:FormatArea", COMMAND_ID_FORMAT_AREA, CommandGroup::FORMAT );
209 implDescribeSupportedFeature( ".uno:TextAttributes", COMMAND_ID_TEXT_ATTRIBUTES, CommandGroup::FORMAT );
210 implDescribeSupportedFeature( ".uno:TransformDialog", COMMAND_ID_TRANSFORM_DIALOG, CommandGroup::FORMAT );
211 implDescribeSupportedFeature( ".uno:ObjectTitleDescription", COMMAND_ID_OBJECT_TITLE_DESCRIPTION, CommandGroup::FORMAT );
212 implDescribeSupportedFeature( ".uno:RenameObject", COMMAND_ID_RENAME_OBJECT, CommandGroup::FORMAT );
213 implDescribeSupportedFeature( ".uno:BringToFront", COMMAND_ID_BRING_TO_FRONT, CommandGroup::FORMAT );
214 implDescribeSupportedFeature( ".uno:Forward", COMMAND_ID_FORWARD, CommandGroup::FORMAT );
215 implDescribeSupportedFeature( ".uno:Backward", COMMAND_ID_BACKWARD, CommandGroup::FORMAT );
216 implDescribeSupportedFeature( ".uno:SendToBack", COMMAND_ID_SEND_TO_BACK, CommandGroup::FORMAT );
217 implDescribeSupportedFeature( ".uno:FontDialog", COMMAND_ID_FONT_DIALOG, CommandGroup::EDIT );
218 implDescribeSupportedFeature( ".uno:ParagraphDialog", COMMAND_ID_PARAGRAPH_DIALOG, CommandGroup::EDIT );
221 IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxObjectNameDialog&, rDialog, bool )
223 OUString aName;
224 rDialog.GetName( aName );
226 if ( !aName.isEmpty() )
228 DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr );
229 if ( pDrawViewWrapper && pDrawViewWrapper->getNamedSdrObject( aName ) )
231 return false;
234 return true;
237 void ShapeController::executeDispatch_FormatLine()
239 SolarMutexGuard aGuard;
240 if ( m_pChartController )
242 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
243 DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
244 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
245 if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
247 SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
248 SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
249 bool bHasMarked = pDrawViewWrapper->AreObjectsMarked();
250 if ( bHasMarked )
252 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
254 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
255 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
256 pFact->CreateSvxLineTabDialog(pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(),
257 pSelectedObj, bHasMarked));
258 if ( pDlg->Execute() == RET_OK )
260 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
261 if ( bHasMarked )
263 pDrawViewWrapper->SetAttrToMarked( *pOutAttr, false );
265 else
267 pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
274 void ShapeController::executeDispatch_FormatArea()
276 SolarMutexGuard aGuard;
277 if ( m_pChartController )
279 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
280 DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
281 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
282 if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
284 SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
285 bool bHasMarked = pDrawViewWrapper->AreObjectsMarked();
286 if ( bHasMarked )
288 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
290 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
291 ScopedVclPtr< AbstractSvxAreaTabDialog > pDlg(
292 pFact->CreateSvxAreaTabDialog(pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(), true));
293 if ( pDlg->Execute() == RET_OK )
295 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
296 if ( bHasMarked )
298 pDrawViewWrapper->SetAttrToMarked( *pOutAttr, false );
300 else
302 pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
309 void ShapeController::executeDispatch_TextAttributes()
311 SolarMutexGuard aGuard;
312 if ( m_pChartController )
314 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
315 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
316 if ( pChartWindow && pDrawViewWrapper )
318 SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
319 bool bHasMarked = pDrawViewWrapper->AreObjectsMarked();
320 if ( bHasMarked )
322 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
324 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
325 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
326 pFact->CreateTextTabDialog(pChartWindow, &aAttr, pDrawViewWrapper));
327 if ( pDlg->Execute() == RET_OK )
329 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
330 if ( bHasMarked )
332 pDrawViewWrapper->SetAttributes( *pOutAttr );
334 else
336 pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
343 void ShapeController::executeDispatch_TransformDialog()
345 SolarMutexGuard aGuard;
346 if ( m_pChartController )
348 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
349 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
350 if ( pChartWindow && pDrawViewWrapper )
352 SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
353 if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == OBJ_CAPTION )
355 // item set for caption
356 SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
357 pDrawViewWrapper->GetAttributes( aAttr );
358 // item set for position and size
359 SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
360 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
361 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
362 pFact->CreateCaptionDialog(pChartWindow, pDrawViewWrapper));
363 const sal_uInt16* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
364 SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
365 aCombAttr.Put( aAttr );
366 aCombAttr.Put( aGeoAttr );
367 pDlg->SetInputSet( &aCombAttr );
368 if ( pDlg->Execute() == RET_OK )
370 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
371 pDrawViewWrapper->SetAttributes( *pOutAttr );
372 pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
375 else
377 SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
378 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
379 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
380 pFact->CreateSvxTransformTabDialog(pChartWindow, &aGeoAttr, pDrawViewWrapper));
381 if ( pDlg->Execute() == RET_OK )
383 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
384 pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
391 void ShapeController::executeDispatch_ObjectTitleDescription()
393 SolarMutexGuard aGuard;
394 if ( m_pChartController )
396 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
397 if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
399 SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
400 if ( pSelectedObj )
402 OUString aTitle( pSelectedObj->GetTitle() );
403 OUString aDescription( pSelectedObj->GetDescription() );
404 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
405 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
406 ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
407 pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, aDescription));
408 if ( pDlg->Execute() == RET_OK )
410 pDlg->GetTitle( aTitle );
411 pDlg->GetDescription( aDescription );
412 pSelectedObj->SetTitle( aTitle );
413 pSelectedObj->SetDescription( aDescription );
420 void ShapeController::executeDispatch_RenameObject()
422 SolarMutexGuard aGuard;
423 if ( m_pChartController )
425 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
426 if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
428 SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
429 if ( pSelectedObj )
431 OUString aName = pSelectedObj->GetName();
432 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
433 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
434 ScopedVclPtr< AbstractSvxObjectNameDialog > pDlg(
435 pFact->CreateSvxObjectNameDialog(pChartWindow, aName));
436 pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
437 if ( pDlg->Execute() == RET_OK )
439 pDlg->GetName(aName);
440 if (pSelectedObj->GetName() == aName)
442 pSelectedObj->SetName( aName );
450 void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
452 SolarMutexGuard aGuard;
453 DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr );
454 if ( pDrawViewWrapper )
456 switch ( nId )
458 case COMMAND_ID_BRING_TO_FRONT:
460 if ( isForwardPossible() )
462 pDrawViewWrapper->PutMarkedToTop();
465 break;
466 case COMMAND_ID_FORWARD:
468 if ( isForwardPossible() )
470 pDrawViewWrapper->MovMarkedToTop();
473 break;
474 case COMMAND_ID_BACKWARD:
476 if ( isBackwardPossible() )
478 pDrawViewWrapper->MovMarkedToBtm();
481 break;
482 case COMMAND_ID_SEND_TO_BACK:
484 if ( isBackwardPossible() )
486 SdrObject* pFirstObj = getFirstAdditionalShape();
487 pDrawViewWrapper->PutMarkedBehindObj( pFirstObj );
490 break;
491 default:
494 break;
499 void ShapeController::executeDispatch_FontDialog()
501 SolarMutexGuard aGuard;
502 if ( m_pChartController )
504 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
505 DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
506 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
507 if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
509 SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
510 pDrawViewWrapper->GetAttributes( aAttr );
511 ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
512 ShapeFontDialog aDlg(pChartWindow, &aAttr, &aViewElementListProvider);
513 if (aDlg.run() == RET_OK)
515 const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet();
516 pDrawViewWrapper->SetAttributes( *pOutAttr );
522 void ShapeController::executeDispatch_ParagraphDialog()
524 SolarMutexGuard aGuard;
525 if ( m_pChartController )
527 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
528 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
529 if ( pChartWindow && pDrawViewWrapper )
531 SfxItemPool& rPool = pDrawViewWrapper->GetModel()->GetItemPool();
532 SfxItemSet aAttr( rPool );
533 pDrawViewWrapper->GetAttributes( aAttr );
535 SfxItemSet aNewAttr(
536 rPool,
537 svl::Items<
538 EE_ITEMS_START, EE_ITEMS_END,
539 SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS>{});
540 aNewAttr.Put( aAttr );
541 aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) );
542 aNewAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, SID_ATTR_PARA_PAGEBREAK ) );
543 aNewAttr.Put( SvxFormatSplitItem( true, SID_ATTR_PARA_SPLIT) );
544 aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
545 aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
547 ShapeParagraphDialog aDlg(pChartWindow, &aNewAttr);
548 if (aDlg.run() == RET_OK)
550 const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet();
551 pDrawViewWrapper->SetAttributes( *pOutAttr );
557 SdrObject* ShapeController::getFirstAdditionalShape()
559 SdrObject* pFirstObj = nullptr;
563 DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : nullptr );
564 if ( pDrawModelWrapper )
566 Reference< drawing::XShape > xFirstShape;
567 Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
568 Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
569 Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
570 sal_Int32 nCount = xDrawPageShapes->getCount();
571 for ( sal_Int32 i = 0; i < nCount; ++i )
573 Reference< drawing::XShape > xShape;
574 if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
576 if ( xShape.is() && xShape != xChartRoot )
578 xFirstShape = xShape;
579 break;
583 if ( xFirstShape.is() )
585 pFirstObj = DrawViewWrapper::getSdrObject( xFirstShape );
589 catch ( const uno::Exception& )
591 DBG_UNHANDLED_EXCEPTION("chart2");
594 return pFirstObj;
597 SdrObject* ShapeController::getLastAdditionalShape()
599 SdrObject* pLastObj = nullptr;
603 DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : nullptr );
604 if ( pDrawModelWrapper )
606 Reference< drawing::XShape > xLastShape;
607 Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
608 Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
609 Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
610 sal_Int32 nCount = xDrawPageShapes->getCount();
611 for ( sal_Int32 i = nCount - 1; i >= 0; --i )
613 Reference< drawing::XShape > xShape;
614 if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
616 if ( xShape.is() && xShape != xChartRoot )
618 xLastShape = xShape;
619 break;
623 if ( xLastShape.is() )
625 pLastObj = DrawViewWrapper::getSdrObject( xLastShape );
629 catch ( const uno::Exception& )
631 DBG_UNHANDLED_EXCEPTION("chart2");
634 return pLastObj;
637 bool ShapeController::isBackwardPossible()
639 if ( m_pChartController && m_pChartController->isAdditionalShapeSelected() )
641 SolarMutexGuard aGuard;
642 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
643 if ( pDrawViewWrapper )
645 SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
646 SdrObject* pFirstObj = getFirstAdditionalShape();
647 if ( pSelectedObj && pFirstObj && pSelectedObj != pFirstObj )
649 return true;
653 return false;
656 bool ShapeController::isForwardPossible()
658 if ( m_pChartController && m_pChartController->isAdditionalShapeSelected() )
660 SolarMutexGuard aGuard;
661 DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
662 if ( pDrawViewWrapper )
664 SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
665 SdrObject* pLastObj = getLastAdditionalShape();
666 if ( pSelectedObj && pLastObj && pSelectedObj != pLastObj )
668 return true;
672 return false;
675 } // namespace chart
677 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */