SSL ReportController.cxx
Sprache: C
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <ReportController.hxx>
#include <ReportDefinition.hxx>
#include <CondFormat.hxx>
#include <UITools.hxx>
#include <AddField.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <DateTime.hxx>
#include <sfx2/filedlghelper.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <rptui_slotid.hrc>
#include <reportformula.hxx>
#include <comphelper/documentconstants.hxx>
#include <unotools/mediadescriptor.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/report/XImageControl.hpp>
#include <com/sun/star/report/XFixedLine.hpp>
#include <com/sun/star/report/Function.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/sdb/XParametersSupplier.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/embed/EmbedMapUnits.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/status/FontHeight.hpp>
#include <com/sun/star/report/ReportEngine.hpp>
#include <com/sun/star/report/XFormattedField.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/document/XUndoManagerSupplier.hpp>
#include <vcl/svapp.hxx>
#include <vcl/unohelp.hxx>
#include <i18nutil/paper.hxx>
#include <svx/fmview.hxx>
#include <editeng/memberids.h>
#include <svx/svxids.hrc>
#include <svx/svdobj.hxx>
#include <svx/unomid.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
#include <svx/xflgrit.hxx>
#include <svx/xflhtit.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xflftrit.hxx>
#include <svx/xsflclit.hxx>
#include <svx/xflbckit.hxx>
#include <svx/xflbmpit.hxx>
#include <svx/xflbmsli.hxx>
#include <svx/xflbmsxy.hxx>
#include <svx/xflbmtit.hxx>
#include <svx/xflboxy.hxx>
#include <svx/xflbstit.hxx>
#include <svx/xflbtoxy.hxx>
#include <svx/xfltrit.hxx>
#include <svx/xgrscit.hxx>
#include <editeng/svxenum.hxx>
#include <svx/pageitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/sizeitem.hxx>
#include <sfx2/zoomitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <editeng/brushitem.hxx>
#include <svx/flagsdef.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svxdlg.hxx>
#include <core_resource.hxx>
#include <DesignView.hxx>
#include <RptObject.hxx>
#include <RptUndo.hxx>
#include <strings.hxx>
#include <RptDef.hxx>
#include <ReportSection.hxx>
#include <SectionView.hxx>
#include <UndoActions.hxx>
#include <dlgpage.hxx>
#include <strings.hrc>
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
#include <svtools/cliplistener.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/viewoptions.hxx>
#include <unotools/localedatawrapper.hxx>
#include <osl/mutex.hxx>
#include <PropertyForward.hxx>
#include <SectionWindow.hxx>
#include <GroupsSorting.hxx>
#include <PageNumber.hxx>
#include <UndoEnv.hxx>
#include <memory>
#include <string_view>
#include <cppuhelper/exc_hlp.hxx>
#include <unotools/confignode.hxx>
#include <ReportControllerObserver.hxx>
#define MAX_ROWS_FOR_PREVIEW 20
#define RPTUI_ID_LRSPACE TypedWhichId<SvxLRSpaceItem>(XATTR_FILL_FIRST - 8)
#define RPTUI_ID_ULSPACE TypedWhichId<SvxULSpaceItem>(XATTR_FILL_FIRST - 7)
#define RPTUI_ID_PAGE TypedWhichId<SvxPageItem>(XATTR_FILL_FIRST - 6)
#define RPTUI_ID_SIZE TypedWhichId<SvxSizeItem>(XATTR_FILL_FIRST - 5)
#define RPTUI_ID_PAGE_MODE TypedWhichId<SfxUInt16Item>(XATTR_FILL_FIRST - 4)
#define RPTUI_ID_START TypedWhichId<SfxUInt16Item>(XATTR_FILL_FIRST - 3)
#define RPTUI_ID_END TypedWhichId<SfxUInt16Item>(XATTR_FILL_FIRST - 2)
#define RPTUI_ID_BRUSH TypedWhichId<SvxBrushItem>(XATTR_FILL_FIRST - 1)
/// Note that we deliberately overlap an existing item id, so that we can have contiguous item ids for
/// the static defaults.
#define RPTUI_ID_METRIC TypedWhichId<SfxUInt16Item>(XATTR_FILL_LAST)
static_assert((RPTUI_ID_METRIC - RPTUI_ID_LRSPACE) == 28, "Item ids are not contiguous");
using namespace ::com::sun::star;
using namespace uno;
using namespace beans;
using namespace frame;
using namespace util;
using namespace lang;
using namespace container;
using namespace sdbcx;
using namespace sdbc;
using namespace sdb;
using namespace ui;
using namespace ui::dialogs;
using namespace ::dbtools;
using namespace ::rptui;
using namespace ::dbaui;
using namespace ::comphelper;
using namespace ::cppu;
namespace
{
void lcl_setFontWPU_nothrow( const uno::Reference< report::XReportControlFormat>& _ xReportControlFormat,const sal_Int32 _nId)
{
if ( !_xReportControlFormat.is() )
return;
try
{
awt::FontDescriptor aFontDescriptor = _xReportControlFormat->getFontDescriptor();
switch(_nId)
{
case SID_ATTR_CHAR_WEIGHT:
aFontDescriptor.Weight = (awt::FontWeight::NORMAL + awt::FontWeight::BOLD) - aFontDescriptor.Weight;
break;
case SID_ATTR_CHAR_POSTURE:
aFontDescriptor.Slant = static_cast<awt::FontSlant>(static_cast<sal_Int16>(awt::FontSlant_ITALIC) - static_cast<sal_Int16>(aFontDescriptor.Slant));
break;
case SID_ATTR_CHAR_UNDERLINE:
aFontDescriptor.Underline = awt::FontUnderline::SINGLE - aFontDescriptor.Underline;
break;
default:
OSL_FAIL("Illegal value in default!");
break;
}
_xReportControlFormat->setFontDescriptor(aFontDescriptor);
}
catch(const beans::UnknownPropertyException&)
{
}
}
}
static void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs,
ODesignView* _pView,
uno::Reference< awt::XWindow>& _xWindow,
::std::vector< uno::Reference< uno::XInterface > >& _rControlsFormats)
{
uno::Reference< report::XReportControlFormat> xReportControlFormat;
if ( aArgs.hasElements() )
{
SequenceAsHashMap aMap(aArgs);
xReportControlFormat = aMap.getUnpackedValueOrDefault(REPORTCONTROLFORMAT,uno::Reference< report::XReportControlFormat>());
_xWindow = aMap.getUnpackedValueOrDefault(CURRENT_WINDOW,uno::Reference< awt::XWindow>());
}
if ( !xReportControlFormat.is() )
{
_pView->fillControlModelSelection(_rControlsFormats);
}
else
{
_rControlsFormats.push_back(xReportControlFormat);
}
if ( !_xWindow.is() )
_xWindow = VCLUnoHelper::GetInterface(_pView);
}
OUString SAL_CALL OReportController::getImplementationName()
{
return u"com.sun.star.report.comp.ReportDesign"_ustr;
}
Sequence< OUString> SAL_CALL OReportController::getSupportedServiceNames()
{
return { u"com.sun.star.sdb.ReportDesign"_ustr };
}
#define PROPERTY_ID_ZOOMVALUE 1
OReportController::OReportController(Reference< XComponentContext > const & xContext)
:OReportController_BASE(xContext)
,OPropertyStateContainer(OGenericUnoController_Base::rBHelper)
,m_aSelectionListeners( getMutex() )
,m_sMode(u"normal"_ustr)
,m_nSplitPos(-1)
,m_nPageNum(-1)
,m_nSelectionCount(0)
,m_nAspect(0)
,m_nZoomValue(100)
,m_eZoomType(SvxZoomType::PERCENT)
,m_bShowRuler(true)
,m_bGridVisible(true)
,m_bGridUse(true)
,m_bShowProperties(true)
,m_bHelplinesMove(true)
,m_bChartEnabled(false)
,m_bChartEnabledAsked(false)
,m_bInGeneratePreview(false)
{
// new Observer
m_pReportControllerObserver = new OXReportControllerObserver(*this);
registerProperty(u"ZoomValue"_ustr, PROPERTY_ID_ZOOMVALUE,
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::TRANSIENT,
&m_nZoomValue, ::cppu::UnoType<sal_Int16>::get());
}
OReportController::~OReportController()
{
}
IMPLEMENT_FORWARD_XTYPEPROVIDER2(OReportController,OReportController_BASE,OReportController_Listener)
IMPLEMENT_FORWARD_XINTERFACE2(OReportController,OReportController_BASE,OReportController_Listener)
void OReportController::disposing()
{
if ( m_pClipboardNotifier.is() )
{
m_pClipboardNotifier->ClearCallbackLink();
m_pClipboardNotifier->RemoveListener( getView() );
m_pClipboardNotifier.clear();
}
if ( m_xGroupsFloater )
{
SvtViewOptions aDlgOpt(EViewType::Window, m_xGroupsFloater->get_help_id());
aDlgOpt.SetWindowState(m_xGroupsFloater->getDialog()->get_window_state(vcl::WindowDataMask::All));
if (m_xGroupsFloater->getDialog()->get_visible())
m_xGroupsFloater->response(RET_CANCEL);
m_xGroupsFloater.reset();
}
try
{
m_xHoldAlive.clear();
m_xColumns.clear();
::comphelper::disposeComponent( m_xRowSet );
::comphelper::disposeComponent( m_xRowSetMediator );
::comphelper::disposeComponent( m_xFormatter );
}
catch(const uno::Exception&)
{
TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while disposing row sets.");
}
m_xRowSet.clear();
m_xRowSetMediator.clear();
if ( m_xReportDefinition.is() )
{
try
{
OSectionWindow* pSectionWindow = nullptr;
if ( getDesignView() )
pSectionWindow = getDesignView()->getMarkedSection();
if ( pSectionWindow )
pSectionWindow->getReportSection().deactivateOle();
clearUndoManager();
if ( m_aReportModel )
listen(false);
m_pReportControllerObserver->Clear();
m_pReportControllerObserver.clear();
}
catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION("reportdesign");
}
}
{
EventObject aDisposingEvent( *this );
m_aSelectionListeners.disposeAndClear( aDisposingEvent );
}
OReportController_BASE::disposing();
try
{
m_xReportDefinition.clear();
m_aReportModel.reset();
m_xFrameLoader.clear();
m_xReportEngine.clear();
}
catch(const uno::Exception&)
{
}
if ( getDesignView() )
EndListening( *getDesignView() );
clearView();
}
FeatureState OReportController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
// (disabled automatically)
aReturn.bEnabled = false;
// check this first
if ( !getView() )
return aReturn;
switch (_nId)
{
case SID_RPT_TEXTDOCUMENT:
aReturn.bEnabled = isEditable();
aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII);
break;
case SID_RPT_SPREADSHEET:
aReturn.bEnabled = isEditable();
aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII);
break;
case SID_REPORTHEADER_WITHOUT_UNDO:
case SID_REPORTFOOTER_WITHOUT_UNDO:
case SID_REPORTHEADERFOOTER:
{
aReturn.bEnabled = isEditable();
OUString sText = RptResId((m_xReportDefinition.is() && m_xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT);
aReturn.sTitle = sText;
}
break;
case SID_PAGEHEADER_WITHOUT_UNDO:
case SID_PAGEFOOTER_WITHOUT_UNDO:
case SID_PAGEHEADERFOOTER:
{
aReturn.bEnabled = isEditable();
OUString sText = RptResId((m_xReportDefinition.is() && m_xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT);
aReturn.sTitle = sText;
}
break;
case SID_GROUP_APPEND:
case SID_GROUP_REMOVE:
case SID_GROUPHEADER_WITHOUT_UNDO:
case SID_GROUPHEADER:
case SID_GROUPFOOTER_WITHOUT_UNDO:
case SID_GROUPFOOTER:
aReturn.bEnabled = isEditable();
break;
case SID_ADD_CONTROL_PAIR:
aReturn.bEnabled = isEditable();
break;
case SID_REDO:
case SID_UNDO:
{
size_t ( SfxUndoManager::*retrieveCount )( bool const ) const =
( _nId == SID_UNDO ) ? &SfxUndoManager::GetUndoActionCount : &SfxUndoManager::GetRedoActionCount;
SfxUndoManager& rUndoManager( getUndoManager() );
aReturn.bEnabled = ( rUndoManager.*retrieveCount )( SfxUndoManager::TopLevel ) > 0;
if ( aReturn.bEnabled )
{
// TODO: add "Undo/Redo: prefix"
OUString ( SfxUndoManager::*retrieveComment )( size_t, bool const ) const =
( _nId == SID_UNDO ) ? &SfxUndoManager::GetUndoActionComment : &SfxUndoManager::GetRedoActionComment;
aReturn.sTitle = (rUndoManager.*retrieveComment)( 0, SfxUndoManager::TopLevel );
}
}
break;
case SID_GETUNDOSTRINGS:
case SID_GETREDOSTRINGS:
{
size_t ( SfxUndoManager::*retrieveCount )( bool const ) const =
( _nId == SID_GETUNDOSTRINGS ) ? &SfxUndoManager::GetUndoActionCount : &SfxUndoManager::GetRedoActionCount;
OUString ( SfxUndoManager::*retrieveComment )( size_t, bool const ) const =
( _nId == SID_GETUNDOSTRINGS ) ? &SfxUndoManager::GetUndoActionComment : &SfxUndoManager::GetRedoActionComment;
SfxUndoManager& rUndoManager( getUndoManager() );
size_t nCount(( rUndoManager.*retrieveCount )( SfxUndoManager::TopLevel ));
Sequence<OUString> aSeq(nCount);
auto aSeqRange = asNonConstRange(aSeq);
for (size_t n = 0; n < nCount; ++n)
aSeqRange[n] = (rUndoManager.*retrieveComment)( n, SfxUndoManager::TopLevel );
aReturn.aValue <<= aSeq;
aReturn.bEnabled = true;
}
break;
case SID_OBJECT_RESIZING:
case SID_OBJECT_SMALLESTWIDTH:
case SID_OBJECT_SMALLESTHEIGHT:
case SID_OBJECT_GREATESTWIDTH:
case SID_OBJECT_GREATESTHEIGHT:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();
if ( aReturn.bEnabled )
aReturn.bEnabled = m_nSelectionCount > 1;
break;
case SID_DISTRIBUTE_HLEFT:
case SID_DISTRIBUTE_HCENTER:
case SID_DISTRIBUTE_HDISTANCE:
case SID_DISTRIBUTE_HRIGHT:
case SID_DISTRIBUTE_VTOP:
case SID_DISTRIBUTE_VCENTER:
case SID_DISTRIBUTE_VDISTANCE:
case SID_DISTRIBUTE_VBOTTOM:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();
if ( aReturn.bEnabled )
{
OSectionView* pSectionView = getCurrentSectionView();
aReturn.bEnabled = pSectionView && pSectionView->GetMarkedObjectList().GetMarkCount() > 2;
}
break;
case SID_ARRANGEMENU:
case SID_FRAME_DOWN:
case SID_FRAME_UP:
case SID_FRAME_TO_TOP:
case SID_FRAME_TO_BOTTOM:
case SID_OBJECT_HEAVEN:
case SID_OBJECT_HELL:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();
if ( aReturn.bEnabled )
{
OSectionView* pSectionView = getCurrentSectionView();
aReturn.bEnabled = pSectionView && pSectionView->OnlyShapesMarked();
if ( aReturn.bEnabled )
{
if ( SID_OBJECT_HEAVEN == _nId )
aReturn.bEnabled = pSectionView->GetLayerIdOfMarkedObjects() != RPT_LAYER_FRONT;
else if ( SID_OBJECT_HELL == _nId )
aReturn.bEnabled = pSectionView->GetLayerIdOfMarkedObjects() != RPT_LAYER_BACK;
}
}
break;
case SID_SECTION_SHRINK:
case SID_SECTION_SHRINK_TOP:
case SID_SECTION_SHRINK_BOTTOM:
{
sal_Int32 nCount = 0;
uno::Reference<report::XSection> xSection = getDesignView()->getCurrentSection();
if ( xSection.is() )
{
nCount = xSection->getCount();
}
aReturn.bEnabled = isEditable() && nCount > 0;
}
break;
case SID_OBJECT_ALIGN:
case SID_OBJECT_ALIGN_LEFT:
case SID_OBJECT_ALIGN_CENTER:
case SID_OBJECT_ALIGN_RIGHT:
case SID_OBJECT_ALIGN_UP:
case SID_OBJECT_ALIGN_MIDDLE:
case SID_OBJECT_ALIGN_DOWN:
case SID_SECTION_ALIGN:
case SID_SECTION_ALIGN_LEFT:
case SID_SECTION_ALIGN_CENTER:
case SID_SECTION_ALIGN_RIGHT:
case SID_SECTION_ALIGN_UP:
case SID_SECTION_ALIGN_MIDDLE:
case SID_SECTION_ALIGN_DOWN:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();
break;
case SID_CUT:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent();
break;
case SID_COPY:
aReturn.bEnabled = getDesignView()->HasSelection() && !getDesignView()->isHandleEvent();
break;
case SID_PASTE:
aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent() && getDesignView()->IsPasteAllowed();
break;
case SID_SELECTALL:
aReturn.bEnabled = !getDesignView()->isHandleEvent();
break;
case SID_SELECTALL_IN_SECTION:
aReturn.bEnabled = !getDesignView()->isHandleEvent();
if ( aReturn.bEnabled )
aReturn.bEnabled = getCurrentSectionView() != nullptr;
break;
case SID_ESCAPE:
aReturn.bEnabled = getDesignView()->GetMode() == DlgEdMode::Insert;
break;
case SID_TERMINATE_INPLACEACTIVATION:
aReturn.bEnabled = true;
break;
case SID_SELECT_ALL_EDITS:
case SID_SELECT_ALL_LABELS:
aReturn.bEnabled = true;
break;
case SID_RPT_NEW_FUNCTION:
aReturn.bEnabled = isEditable();
break;
case SID_COLLAPSE_SECTION:
case SID_EXPAND_SECTION:
case SID_NEXT_MARK:
case SID_PREV_MARK:
aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent();
break;
case SID_SELECT:
case SID_SELECT_REPORT:
aReturn.bEnabled = true;
break;
case SID_EXECUTE_REPORT:
aReturn.bEnabled = isConnected() && m_xReportDefinition.is();
break;
case SID_DELETE:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent();
if ( aReturn.bEnabled )
{
OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection();
if ( pSectionWindow )
aReturn.bEnabled = !pSectionWindow->getReportSection().isUiActive();
}
{
OUString sText = RptResId(RID_STR_DELETE);
aReturn.sTitle = sText;
}
break;
case SID_GRID_VISIBLE:
aReturn.bEnabled = isEditable();
aReturn.bChecked = m_bGridVisible;
break;
case SID_GRID_USE:
aReturn.bEnabled = isEditable();
aReturn.bChecked = m_bGridUse;
break;
case SID_HELPLINES_MOVE:
aReturn.bEnabled = isEditable();
aReturn.bChecked = m_bHelplinesMove;
break;
case SID_RULER:
aReturn.bEnabled = isEditable();
aReturn.bChecked = m_bShowRuler;
break;
case SID_OBJECT_SELECT:
aReturn.bEnabled = true;
aReturn.bChecked = getDesignView()->GetMode() == DlgEdMode::Select;
break;
case SID_INSERT_DIAGRAM:
aReturn.bEnabled = isEditable();
aReturn.bInvisible = !m_bChartEnabled;
aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::OLE2;
break;
case SID_FM_FIXEDTEXT:
aReturn.bEnabled = isEditable();
aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignFixedText;
break;
case SID_INSERT_HFIXEDLINE:
aReturn.bEnabled = isEditable();
aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignHorizontalFixedLine;
break;
case SID_INSERT_VFIXEDLINE:
aReturn.bEnabled = isEditable();
aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignVerticalFixedLine;
break;
case SID_FM_EDIT:
aReturn.bEnabled = isEditable();
aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignFormattedField;
break;
case SID_FM_IMAGECONTROL:
aReturn.bEnabled = isEditable();
aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignImageControl;
break;
case SID_DRAWTBX_CS_BASIC:
case SID_DRAWTBX_CS_BASIC1:
case SID_DRAWTBX_CS_BASIC2:
case SID_DRAWTBX_CS_BASIC3:
case SID_DRAWTBX_CS_BASIC4:
case SID_DRAWTBX_CS_BASIC5:
case SID_DRAWTBX_CS_BASIC6:
case SID_DRAWTBX_CS_BASIC7:
case SID_DRAWTBX_CS_BASIC8:
case SID_DRAWTBX_CS_BASIC9:
case SID_DRAWTBX_CS_BASIC10:
case SID_DRAWTBX_CS_BASIC11:
case SID_DRAWTBX_CS_BASIC12:
case SID_DRAWTBX_CS_BASIC13:
case SID_DRAWTBX_CS_BASIC14:
case SID_DRAWTBX_CS_BASIC15:
case SID_DRAWTBX_CS_BASIC16:
case SID_DRAWTBX_CS_BASIC17:
case SID_DRAWTBX_CS_BASIC18:
case SID_DRAWTBX_CS_BASIC19:
case SID_DRAWTBX_CS_BASIC20:
case SID_DRAWTBX_CS_BASIC21:
case SID_DRAWTBX_CS_BASIC22:
impl_fillCustomShapeState_nothrow("diamond",aReturn);
break;
case SID_DRAWTBX_CS_SYMBOL:
case SID_DRAWTBX_CS_SYMBOL1:
case SID_DRAWTBX_CS_SYMBOL2:
case SID_DRAWTBX_CS_SYMBOL3:
case SID_DRAWTBX_CS_SYMBOL4:
case SID_DRAWTBX_CS_SYMBOL5:
case SID_DRAWTBX_CS_SYMBOL6:
case SID_DRAWTBX_CS_SYMBOL7:
case SID_DRAWTBX_CS_SYMBOL8:
case SID_DRAWTBX_CS_SYMBOL9:
case SID_DRAWTBX_CS_SYMBOL10:
case SID_DRAWTBX_CS_SYMBOL11:
case SID_DRAWTBX_CS_SYMBOL12:
case SID_DRAWTBX_CS_SYMBOL13:
case SID_DRAWTBX_CS_SYMBOL14:
case SID_DRAWTBX_CS_SYMBOL15:
case SID_DRAWTBX_CS_SYMBOL16:
case SID_DRAWTBX_CS_SYMBOL17:
case SID_DRAWTBX_CS_SYMBOL18:
impl_fillCustomShapeState_nothrow("smiley",aReturn);
break;
case SID_DRAWTBX_CS_ARROW:
case SID_DRAWTBX_CS_ARROW1:
case SID_DRAWTBX_CS_ARROW2:
case SID_DRAWTBX_CS_ARROW3:
case SID_DRAWTBX_CS_ARROW4:
case SID_DRAWTBX_CS_ARROW5:
case SID_DRAWTBX_CS_ARROW6:
case SID_DRAWTBX_CS_ARROW7:
case SID_DRAWTBX_CS_ARROW8:
case SID_DRAWTBX_CS_ARROW9:
case SID_DRAWTBX_CS_ARROW10:
case SID_DRAWTBX_CS_ARROW11:
case SID_DRAWTBX_CS_ARROW12:
case SID_DRAWTBX_CS_ARROW13:
case SID_DRAWTBX_CS_ARROW14:
case SID_DRAWTBX_CS_ARROW15:
case SID_DRAWTBX_CS_ARROW16:
case SID_DRAWTBX_CS_ARROW17:
case SID_DRAWTBX_CS_ARROW18:
case SID_DRAWTBX_CS_ARROW19:
case SID_DRAWTBX_CS_ARROW20:
case SID_DRAWTBX_CS_ARROW21:
case SID_DRAWTBX_CS_ARROW22:
case SID_DRAWTBX_CS_ARROW23:
case SID_DRAWTBX_CS_ARROW24:
case SID_DRAWTBX_CS_ARROW25:
case SID_DRAWTBX_CS_ARROW26:
impl_fillCustomShapeState_nothrow("left-right-arrow",aReturn);
break;
case SID_DRAWTBX_CS_STAR:
case SID_DRAWTBX_CS_STAR1:
case SID_DRAWTBX_CS_STAR2:
case SID_DRAWTBX_CS_STAR3:
case SID_DRAWTBX_CS_STAR4:
case SID_DRAWTBX_CS_STAR5:
case SID_DRAWTBX_CS_STAR6:
case SID_DRAWTBX_CS_STAR7:
case SID_DRAWTBX_CS_STAR8:
case SID_DRAWTBX_CS_STAR9:
case SID_DRAWTBX_CS_STAR10:
case SID_DRAWTBX_CS_STAR11:
case SID_DRAWTBX_CS_STAR12:
impl_fillCustomShapeState_nothrow("star5",aReturn);
break;
case SID_DRAWTBX_CS_FLOWCHART:
case SID_DRAWTBX_CS_FLOWCHART1:
case SID_DRAWTBX_CS_FLOWCHART2:
case SID_DRAWTBX_CS_FLOWCHART3:
case SID_DRAWTBX_CS_FLOWCHART4:
case SID_DRAWTBX_CS_FLOWCHART5:
case SID_DRAWTBX_CS_FLOWCHART6:
case SID_DRAWTBX_CS_FLOWCHART7:
case SID_DRAWTBX_CS_FLOWCHART8:
case SID_DRAWTBX_CS_FLOWCHART9:
case SID_DRAWTBX_CS_FLOWCHART10:
case SID_DRAWTBX_CS_FLOWCHART11:
case SID_DRAWTBX_CS_FLOWCHART12:
case SID_DRAWTBX_CS_FLOWCHART13:
case SID_DRAWTBX_CS_FLOWCHART14:
case SID_DRAWTBX_CS_FLOWCHART15:
case SID_DRAWTBX_CS_FLOWCHART16:
case SID_DRAWTBX_CS_FLOWCHART17:
case SID_DRAWTBX_CS_FLOWCHART18:
case SID_DRAWTBX_CS_FLOWCHART19:
case SID_DRAWTBX_CS_FLOWCHART20:
case SID_DRAWTBX_CS_FLOWCHART21:
case SID_DRAWTBX_CS_FLOWCHART22:
case SID_DRAWTBX_CS_FLOWCHART23:
case SID_DRAWTBX_CS_FLOWCHART24:
case SID_DRAWTBX_CS_FLOWCHART25:
case SID_DRAWTBX_CS_FLOWCHART26:
case SID_DRAWTBX_CS_FLOWCHART27:
case SID_DRAWTBX_CS_FLOWCHART28:
impl_fillCustomShapeState_nothrow("flowchart-internal-storage",aReturn);
break;
case SID_DRAWTBX_CS_CALLOUT:
case SID_DRAWTBX_CS_CALLOUT1:
case SID_DRAWTBX_CS_CALLOUT2:
case SID_DRAWTBX_CS_CALLOUT3:
case SID_DRAWTBX_CS_CALLOUT4:
case SID_DRAWTBX_CS_CALLOUT5:
case SID_DRAWTBX_CS_CALLOUT6:
case SID_DRAWTBX_CS_CALLOUT7:
impl_fillCustomShapeState_nothrow("round-rectangular-callout",aReturn);
break;
case SID_RPT_SHOWREPORTEXPLORER:
aReturn.bEnabled = m_xReportDefinition.is();
aReturn.bChecked = getDesignView() && getDesignView()->isReportExplorerVisible();
break;
case SID_FM_ADD_FIELD:
aReturn.bEnabled = isConnected() && isEditable() && m_xReportDefinition.is()
&& !m_xReportDefinition->getCommand().isEmpty();
aReturn.bChecked = getDesignView() && getDesignView()->isAddFieldVisible();
break;
case SID_SHOW_PROPERTYBROWSER:
aReturn.bEnabled = true;
aReturn.bChecked = m_bShowProperties;
break;
case SID_PROPERTYBROWSER_LAST_PAGE:
aReturn.bEnabled = true;
aReturn.aValue <<= m_sLastActivePage;
break;
case SID_SPLIT_POSITION:
aReturn.bEnabled = true;
aReturn.aValue <<= getSplitPos();
break;
case SID_SAVEDOC:
case SID_SAVEASDOC:
case SID_SAVEACOPY:
aReturn.bEnabled = isConnected() && isEditable();
break;
case SID_EDITDOC:
aReturn.bChecked = isEditable();
break;
case SID_PAGEDIALOG:
aReturn.bEnabled = isEditable();
break;
case SID_BACKGROUND_COLOR:
impl_fillState_nothrow(PROPERTY_CONTROLBACKGROUND,aReturn);
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND:
aReturn.bEnabled = isEditable();
{
uno::Reference<report::XSection> xSection = getDesignView()->getCurrentSection();
if ( xSection.is() )
try
{
aReturn.aValue <<= xSection->getBackColor();
const uno::Reference< report::XReportControlModel> xControlModel(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY);
aReturn.bEnabled = !xControlModel.is();
}
catch(const beans::UnknownPropertyException&)
{
}
else
aReturn.bEnabled = false;
}
break;
case SID_SORTINGANDGROUPING:
aReturn.bEnabled = true;
aReturn.bChecked = m_xGroupsFloater && m_xGroupsFloater->getDialog()->get_visible();
break;
case SID_ATTR_CHAR_WEIGHT:
case SID_ATTR_CHAR_POSTURE:
case SID_ATTR_CHAR_UNDERLINE:
impl_fillState_nothrow(PROPERTY_FONTDESCRIPTOR,aReturn);
if ( aReturn.bEnabled )
{
awt::FontDescriptor aFontDescriptor;
aReturn.aValue >>= aFontDescriptor;
aReturn.aValue.clear();
switch(_nId)
{
case SID_ATTR_CHAR_WEIGHT:
aReturn.bChecked = awt::FontWeight::BOLD == aFontDescriptor.Weight;
break;
case SID_ATTR_CHAR_POSTURE:
aReturn.bChecked = awt::FontSlant_ITALIC == aFontDescriptor.Slant;
break;
case SID_ATTR_CHAR_UNDERLINE:
aReturn.bChecked = awt::FontUnderline::SINGLE == aFontDescriptor.Underline;
break;
default:
;
}
}
break;
case SID_ATTR_CHAR_COLOR:
case SID_ATTR_CHAR_COLOR2:
impl_fillState_nothrow(PROPERTY_CHARCOLOR,aReturn);
break;
case SID_ATTR_CHAR_FONT:
impl_fillState_nothrow(PROPERTY_FONTDESCRIPTOR,aReturn);
break;
case SID_ATTR_CHAR_FONTHEIGHT:
impl_fillState_nothrow(PROPERTY_CHARHEIGHT,aReturn);
if ( aReturn.aValue.hasValue() )
{
frame::status::FontHeight aFontHeight;
aReturn.aValue >>= aFontHeight.Height;
aReturn.aValue <<= aFontHeight; // another type is needed here, so
}
break;
case SID_ATTR_PARA_ADJUST_LEFT:
case SID_ATTR_PARA_ADJUST_CENTER:
case SID_ATTR_PARA_ADJUST_RIGHT:
case SID_ATTR_PARA_ADJUST_BLOCK:
impl_fillState_nothrow(PROPERTY_PARAADJUST,aReturn);
if ( aReturn.bEnabled )
{
::sal_Int16 nParaAdjust = 0;
if ( aReturn.aValue >>= nParaAdjust )
{
switch(static_cast<style::ParagraphAdjust>(nParaAdjust))
{
case style::ParagraphAdjust_LEFT:
aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_LEFT;
break;
case style::ParagraphAdjust_RIGHT:
aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_RIGHT;
break;
case style::ParagraphAdjust_BLOCK:
case style::ParagraphAdjust_STRETCH:
aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_BLOCK;
break;
case style::ParagraphAdjust_CENTER:
aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_CENTER;
break;
default: break;
}
}
aReturn.aValue.clear();
}
break;
case SID_INSERT_GRAPHIC:
aReturn.bEnabled = m_xReportDefinition.is() && isEditable() && getDesignView()->getCurrentSection().is();
break;
case SID_CHAR_DLG:
case SID_SETCONTROLDEFAULTS:
aReturn.bEnabled = m_xReportDefinition.is() && isEditable();
if ( aReturn.bEnabled )
{
::std::vector< uno::Reference< uno::XInterface > > aSelection;
getDesignView()->fillControlModelSelection(aSelection);
aReturn.bEnabled = !aSelection.empty()
&& std::all_of(aSelection.begin(), aSelection.end(), [](const uno::Reference<uno::XInterface>& rxInterface) {
return !uno::Reference<report::XFixedLine>(rxInterface, uno::UNO_QUERY).is()
&& !uno::Reference<report::XImageControl>(rxInterface, uno::UNO_QUERY).is()
&& uno::Reference<report::XReportControlFormat>(rxInterface, uno::UNO_QUERY).is(); });
}
break;
case SID_CONDITIONALFORMATTING:
{
const uno::Reference< report::XFormattedField> xFormattedField(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY);
aReturn.bEnabled = xFormattedField.is();
}
break;
case SID_INSERT_FLD_PGNUMBER:
case SID_DATETIME:
aReturn.bEnabled = m_xReportDefinition.is() && isEditable() && getDesignView()->getCurrentSection().is();
break;
case SID_EXPORTDOC:
case SID_EXPORTDOCASPDF:
aReturn.bEnabled = m_xReportDefinition.is();
break;
case SID_PRINTPREVIEW:
aReturn.bEnabled = false;
break;
case SID_ATTR_ZOOM:
aReturn.bEnabled = true;
{
SvxZoomItem aZoom(m_eZoomType,m_nZoomValue);
aZoom.SetValueSet(SvxZoomEnableFlags::N50|SvxZoomEnableFlags::N75|SvxZoomEnableFlags::N100|SvxZoomEnableFlags::N200);
aZoom.QueryValue(aReturn.aValue);
}
break;
case SID_ATTR_ZOOMSLIDER:
aReturn.bEnabled = true;
{
SvxZoomSliderItem aZoomSlider(m_nZoomValue,20,400);
aZoomSlider.AddSnappingPoint(50);
aZoomSlider.AddSnappingPoint(75);
aZoomSlider.AddSnappingPoint(100);
aZoomSlider.AddSnappingPoint(200);
aZoomSlider.QueryValue(aReturn.aValue);
}
break;
default:
aReturn = OReportController_BASE::GetState(_nId);
}
return aReturn;
}
namespace
{
/** extracts a background color from a dispatched SID_BACKGROUND_COLOR call
The dispatch might originate from either the toolbar, or the conditional
formatting dialog. In both cases, argument formats are different.
*/
util::Color lcl_extractBackgroundColor( const Sequence< PropertyValue >& _rDispatchArgs )
{
util::Color aColor( COL_TRANSPARENT );
if ( _rDispatchArgs.getLength() == 1 )
{
OSL_VERIFY( _rDispatchArgs[0].Value >>= aColor );
}
else
{
SequenceAsHashMap aMap( _rDispatchArgs );
aColor = aMap.getUnpackedValueOrDefault( PROPERTY_FONTCOLOR, aColor );
}
return aColor;
}
}
void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs)
{
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
bool bForceBroadcast = false;
switch(_nId)
{
case SID_RPT_TEXTDOCUMENT:
if ( m_xReportDefinition.is() )
m_xReportDefinition->setMimeType( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII );
break;
case SID_RPT_SPREADSHEET:
if (m_xReportDefinition.is() )
m_xReportDefinition->setMimeType( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII );
break;
case SID_REPORTHEADER_WITHOUT_UNDO:
case SID_REPORTFOOTER_WITHOUT_UNDO:
case SID_REPORTHEADERFOOTER:
switchReportSection(_nId);
break;
case SID_PAGEHEADER_WITHOUT_UNDO:
case SID_PAGEFOOTER_WITHOUT_UNDO:
case SID_PAGEHEADERFOOTER:
switchPageSection(_nId);
break;
case SID_GROUP_APPEND:
case SID_GROUP_REMOVE:
modifyGroup(_nId == SID_GROUP_APPEND,aArgs);
break;
case SID_GROUPHEADER_WITHOUT_UNDO:
case SID_GROUPHEADER:
createGroupSection(SID_GROUPHEADER == _nId,true,aArgs);
break;
case SID_GROUPFOOTER_WITHOUT_UNDO:
case SID_GROUPFOOTER:
createGroupSection(SID_GROUPFOOTER == _nId,false,aArgs);
break;
case SID_ADD_CONTROL_PAIR:
addPairControls(aArgs);
break;
case SID_REDO:
case SID_UNDO:
{
const OXUndoEnvironment::OUndoMode aLock( m_aReportModel->GetUndoEnv() );
bool ( SfxUndoManager::*doXDo )() =
( _nId == SID_UNDO ) ? &SfxUndoManager::Undo : &SfxUndoManager::Redo;
SfxUndoManager& rUndoManager( getUndoManager() );
sal_Int16 nCount(1);
if (aArgs.hasElements() && aArgs[0].Name != "KeyModifier")
aArgs[0].Value >>= nCount;
while (nCount--)
(rUndoManager.*doXDo)();
InvalidateAll();
if (m_xGroupsFloater && m_xGroupsFloater->getDialog()->get_visible())
m_xGroupsFloater->UpdateData();
}
break;
case SID_CUT:
executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fn(&ODesignView::Cut));
break;
case SID_COPY:
getDesignView()->Copy();
break;
case SID_PASTE:
executeMethodWithUndo(RID_STR_UNDO_PASTE,::std::mem_fn(&ODesignView::Paste));
break;
case SID_FRAME_TO_TOP:
case SID_FRAME_DOWN:
case SID_FRAME_UP:
case SID_FRAME_TO_BOTTOM:
case SID_OBJECT_HEAVEN:
case SID_OBJECT_HELL:
changeZOrder(_nId);
break;
case SID_DISTRIBUTE_HLEFT:
case SID_DISTRIBUTE_HCENTER:
case SID_DISTRIBUTE_HDISTANCE:
case SID_DISTRIBUTE_HRIGHT:
case SID_DISTRIBUTE_VTOP:
case SID_DISTRIBUTE_VCENTER:
case SID_DISTRIBUTE_VDISTANCE:
case SID_DISTRIBUTE_VBOTTOM:
{
OSectionView* pSectionView = getCurrentSectionView();
if ( pSectionView )
pSectionView->DistributeMarkedObjects(_nId);
}
break;
case SID_OBJECT_SMALLESTWIDTH:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::WIDTH_SMALLEST);
break;
case SID_OBJECT_SMALLESTHEIGHT:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::HEIGHT_SMALLEST);
break;
case SID_OBJECT_GREATESTWIDTH:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::WIDTH_GREATEST);
break;
case SID_OBJECT_GREATESTHEIGHT:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::HEIGHT_GREATEST);
break;
case SID_SECTION_ALIGN_LEFT:
case SID_OBJECT_ALIGN_LEFT:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::LEFT,SID_SECTION_ALIGN_LEFT == _nId);
break;
case SID_SECTION_ALIGN_CENTER:
case SID_OBJECT_ALIGN_CENTER:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::CENTER_HORIZONTAL,SID_SECTION_ALIGN_CENTER == _nId);
break;
case SID_SECTION_ALIGN_RIGHT:
case SID_OBJECT_ALIGN_RIGHT:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::RIGHT,SID_SECTION_ALIGN_RIGHT == _nId);
break;
case SID_SECTION_ALIGN_UP:
case SID_OBJECT_ALIGN_UP:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::TOP,SID_SECTION_ALIGN_UP == _nId);
break;
case SID_SECTION_ALIGN_MIDDLE:
case SID_OBJECT_ALIGN_MIDDLE:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::CENTER_VERTICAL,SID_SECTION_ALIGN_MIDDLE == _nId);
break;
case SID_SECTION_ALIGN_DOWN:
case SID_OBJECT_ALIGN_DOWN:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::BOTTOM,SID_SECTION_ALIGN_DOWN == _nId);
break;
case SID_SECTION_SHRINK_BOTTOM:
case SID_SECTION_SHRINK_TOP:
case SID_SECTION_SHRINK:
{
uno::Reference<report::XSection> xSection = getDesignView()->getCurrentSection();
shrinkSection(RID_STR_UNDO_SHRINK, xSection, _nId);
}
break;
case SID_SELECTALL:
getDesignView()->SelectAll(SdrObjKind::NONE);
break;
case SID_SELECTALL_IN_SECTION:
{
OSectionView* pSectionView = getCurrentSectionView();
if ( pSectionView )
pSectionView->MarkAll();
}
break;
case SID_ESCAPE:
getDesignView()->SetMode(DlgEdMode::Select);
InvalidateFeature( SID_OBJECT_SELECT );
break;
case SID_SELECT_ALL_EDITS:
getDesignView()->SelectAll(SdrObjKind::ReportDesignFormattedField);
break;
case SID_SELECT_ALL_LABELS:
getDesignView()->SelectAll(SdrObjKind::ReportDesignFixedText);
break;
case SID_TERMINATE_INPLACEACTIVATION:
{
OSectionWindow* pSection = getDesignView()->getMarkedSection();
if ( pSection )
pSection->getReportSection().deactivateOle();
}
break;
case SID_SELECT:
if ( aArgs.getLength() == 1 )
select(aArgs[0].Value);
break;
case SID_SELECT_REPORT:
select(uno::Any(m_xReportDefinition));
break;
case SID_EXECUTE_REPORT:
getView()->PostUserEvent(LINK(this, OReportController,OnExecuteReport));
break;
case SID_RPT_NEW_FUNCTION:
createNewFunction(aArgs[0].Value);
break;
case SID_COLLAPSE_SECTION:
collapseSection(true);
break;
case SID_EXPAND_SECTION:
collapseSection(false);
break;
case SID_NEXT_MARK:
markSection(true);
break;
case SID_PREV_MARK:
markSection(false);
break;
case SID_DELETE:
if ( aArgs.getLength() == 1 )
{
uno::Reference< report::XFunction> xFunction;
aArgs[0].Value >>= xFunction;
if ( xFunction.is() )
{
uno::Reference< report::XFunctions> xFunctions(xFunction->getParent(),uno::UNO_QUERY_THROW);
sal_Int32 nIndex = getPositionInIndexAccess(xFunctions, xFunction);
const OUString sUndoAction = RptResId(RID_STR_UNDO_REMOVE_FUNCTION);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
xFunctions->removeByIndex(nIndex);
select(uno::Any(xFunctions->getParent()));
InvalidateFeature( SID_UNDO );
}
}
else
executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fn(&ODesignView::Delete));
break;
case SID_GRID_USE:
m_bGridUse = !m_bGridUse;
getDesignView()->setGridSnap(m_bGridUse);
break;
case SID_HELPLINES_MOVE:
m_bHelplinesMove = !m_bHelplinesMove;
getDesignView()->setDragStripes(m_bHelplinesMove);
break;
case SID_GRID_VISIBLE:
m_bGridVisible = !m_bGridVisible;
getDesignView()->toggleGrid(m_bGridVisible);
break;
case SID_RULER:
m_bShowRuler = !m_bShowRuler;
getDesignView()->showRuler(m_bShowRuler);
break;
case SID_OBJECT_SELECT:
getDesignView()->SetMode(DlgEdMode::Select);
InvalidateAll();
break;
case SID_INSERT_DIAGRAM:
getDesignView()->SetMode( DlgEdMode::Insert );
getDesignView()->SetInsertObj( SdrObjKind::OLE2);
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_FM_FIXEDTEXT:
getDesignView()->SetMode( DlgEdMode::Insert );
getDesignView()->SetInsertObj( SdrObjKind::ReportDesignFixedText );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_INSERT_HFIXEDLINE:
getDesignView()->SetMode( DlgEdMode::Insert );
getDesignView()->SetInsertObj( SdrObjKind::ReportDesignHorizontalFixedLine );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_INSERT_VFIXEDLINE:
getDesignView()->SetMode( DlgEdMode::Insert );
getDesignView()->SetInsertObj( SdrObjKind::ReportDesignVerticalFixedLine );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_FM_EDIT:
getDesignView()->SetMode( DlgEdMode::Insert );
getDesignView()->SetInsertObj( SdrObjKind::ReportDesignFormattedField );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_FM_IMAGECONTROL:
getDesignView()->SetMode( DlgEdMode::Insert );
getDesignView()->SetInsertObj( SdrObjKind::ReportDesignImageControl );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_DRAWTBX_CS_BASIC:
case SID_DRAWTBX_CS_BASIC1:
case SID_DRAWTBX_CS_BASIC2:
case SID_DRAWTBX_CS_BASIC3:
case SID_DRAWTBX_CS_BASIC4:
case SID_DRAWTBX_CS_BASIC5:
case SID_DRAWTBX_CS_BASIC6:
case SID_DRAWTBX_CS_BASIC7:
case SID_DRAWTBX_CS_BASIC8:
case SID_DRAWTBX_CS_BASIC9:
case SID_DRAWTBX_CS_BASIC10:
case SID_DRAWTBX_CS_BASIC11:
case SID_DRAWTBX_CS_BASIC12:
case SID_DRAWTBX_CS_BASIC13:
case SID_DRAWTBX_CS_BASIC14:
case SID_DRAWTBX_CS_BASIC15:
case SID_DRAWTBX_CS_BASIC16:
case SID_DRAWTBX_CS_BASIC17:
case SID_DRAWTBX_CS_BASIC18:
case SID_DRAWTBX_CS_BASIC19:
case SID_DRAWTBX_CS_BASIC20:
case SID_DRAWTBX_CS_BASIC21:
case SID_DRAWTBX_CS_BASIC22:
case SID_DRAWTBX_CS_SYMBOL1:
case SID_DRAWTBX_CS_SYMBOL2:
case SID_DRAWTBX_CS_SYMBOL3:
case SID_DRAWTBX_CS_SYMBOL4:
case SID_DRAWTBX_CS_SYMBOL5:
case SID_DRAWTBX_CS_SYMBOL6:
case SID_DRAWTBX_CS_SYMBOL7:
case SID_DRAWTBX_CS_SYMBOL8:
case SID_DRAWTBX_CS_SYMBOL9:
case SID_DRAWTBX_CS_SYMBOL10:
case SID_DRAWTBX_CS_SYMBOL11:
case SID_DRAWTBX_CS_SYMBOL12:
case SID_DRAWTBX_CS_SYMBOL13:
case SID_DRAWTBX_CS_SYMBOL14:
case SID_DRAWTBX_CS_SYMBOL15:
case SID_DRAWTBX_CS_SYMBOL16:
case SID_DRAWTBX_CS_SYMBOL17:
case SID_DRAWTBX_CS_SYMBOL18:
case SID_DRAWTBX_CS_ARROW1:
case SID_DRAWTBX_CS_ARROW2:
case SID_DRAWTBX_CS_ARROW3:
case SID_DRAWTBX_CS_ARROW4:
case SID_DRAWTBX_CS_ARROW5:
case SID_DRAWTBX_CS_ARROW6:
case SID_DRAWTBX_CS_ARROW7:
case SID_DRAWTBX_CS_ARROW8:
case SID_DRAWTBX_CS_ARROW9:
case SID_DRAWTBX_CS_ARROW10:
case SID_DRAWTBX_CS_ARROW11:
case SID_DRAWTBX_CS_ARROW12:
case SID_DRAWTBX_CS_ARROW13:
case SID_DRAWTBX_CS_ARROW14:
case SID_DRAWTBX_CS_ARROW15:
case SID_DRAWTBX_CS_ARROW16:
case SID_DRAWTBX_CS_ARROW17:
case SID_DRAWTBX_CS_ARROW18:
case SID_DRAWTBX_CS_ARROW19:
case SID_DRAWTBX_CS_ARROW20:
case SID_DRAWTBX_CS_ARROW21:
case SID_DRAWTBX_CS_ARROW22:
case SID_DRAWTBX_CS_ARROW23:
case SID_DRAWTBX_CS_ARROW24:
case SID_DRAWTBX_CS_ARROW25:
case SID_DRAWTBX_CS_ARROW26:
case SID_DRAWTBX_CS_STAR1:
case SID_DRAWTBX_CS_STAR2:
case SID_DRAWTBX_CS_STAR3:
case SID_DRAWTBX_CS_STAR4:
case SID_DRAWTBX_CS_STAR5:
case SID_DRAWTBX_CS_STAR6:
case SID_DRAWTBX_CS_STAR7:
case SID_DRAWTBX_CS_STAR8:
case SID_DRAWTBX_CS_STAR9:
case SID_DRAWTBX_CS_STAR10:
case SID_DRAWTBX_CS_STAR11:
case SID_DRAWTBX_CS_STAR12:
case SID_DRAWTBX_CS_FLOWCHART1:
case SID_DRAWTBX_CS_FLOWCHART2:
case SID_DRAWTBX_CS_FLOWCHART3:
case SID_DRAWTBX_CS_FLOWCHART4:
case SID_DRAWTBX_CS_FLOWCHART5:
case SID_DRAWTBX_CS_FLOWCHART6:
case SID_DRAWTBX_CS_FLOWCHART7:
case SID_DRAWTBX_CS_FLOWCHART8:
case SID_DRAWTBX_CS_FLOWCHART9:
case SID_DRAWTBX_CS_FLOWCHART10:
case SID_DRAWTBX_CS_FLOWCHART11:
case SID_DRAWTBX_CS_FLOWCHART12:
case SID_DRAWTBX_CS_FLOWCHART13:
case SID_DRAWTBX_CS_FLOWCHART14:
case SID_DRAWTBX_CS_FLOWCHART15:
case SID_DRAWTBX_CS_FLOWCHART16:
case SID_DRAWTBX_CS_FLOWCHART17:
case SID_DRAWTBX_CS_FLOWCHART18:
case SID_DRAWTBX_CS_FLOWCHART19:
case SID_DRAWTBX_CS_FLOWCHART20:
case SID_DRAWTBX_CS_FLOWCHART21:
case SID_DRAWTBX_CS_FLOWCHART22:
case SID_DRAWTBX_CS_FLOWCHART23:
case SID_DRAWTBX_CS_FLOWCHART24:
case SID_DRAWTBX_CS_FLOWCHART25:
case SID_DRAWTBX_CS_FLOWCHART26:
case SID_DRAWTBX_CS_FLOWCHART27:
case SID_DRAWTBX_CS_FLOWCHART28:
case SID_DRAWTBX_CS_CALLOUT1:
case SID_DRAWTBX_CS_CALLOUT2:
case SID_DRAWTBX_CS_CALLOUT3:
case SID_DRAWTBX_CS_CALLOUT4:
case SID_DRAWTBX_CS_CALLOUT5:
case SID_DRAWTBX_CS_CALLOUT6:
case SID_DRAWTBX_CS_CALLOUT7:
case SID_DRAWTBX_CS_SYMBOL:
case SID_DRAWTBX_CS_ARROW:
case SID_DRAWTBX_CS_FLOWCHART:
case SID_DRAWTBX_CS_CALLOUT:
case SID_DRAWTBX_CS_STAR:
getDesignView()->SetMode( DlgEdMode::Insert );
{
URL aUrl = getURLForId(_nId);
sal_Int32 nIndex = 1;
std::u16string_view sType = o3tl::getToken(aUrl.Complete, 0,'.',nIndex);
if ( nIndex == -1 || sType.empty() )
{
switch(_nId)
{
case SID_DRAWTBX_CS_SYMBOL:
sType = u"smiley";
break;
case SID_DRAWTBX_CS_ARROW:
sType = u"left-right-arrow";
break;
case SID_DRAWTBX_CS_FLOWCHART:
sType = u"flowchart-internal-storage";
break;
case SID_DRAWTBX_CS_CALLOUT:
sType = u"round-rectangular-callout";
break;
case SID_DRAWTBX_CS_STAR:
sType = u"star5";
break;
default:
sType = u"diamond";
}
}
else
sType = o3tl::getToken(aUrl.Complete, 0,'.',nIndex);
getDesignView()->SetInsertObj( SdrObjKind::CustomShape, OUString(sType));
createDefaultControl(aArgs);
}
InvalidateAll();
break;
case SID_RPT_SHOWREPORTEXPLORER:
if ( isUiVisible() )
getDesignView()->toggleReportExplorer();
break;
case SID_FM_ADD_FIELD:
if ( isUiVisible() )
getDesignView()->toggleAddField();
break;
case SID_SHOW_PROPERTYBROWSER:
if ( m_bShowProperties )
m_sLastActivePage = getDesignView()->getCurrentPage();
else
getDesignView()->setCurrentPage(m_sLastActivePage);
if ( isUiVisible() )
{
m_bShowProperties = !m_bShowProperties;
if ( aArgs.getLength() == 1 )
aArgs[0].Value >>= m_bShowProperties;
getDesignView()->togglePropertyBrowser(m_bShowProperties);
}
break;
case SID_PROPERTYBROWSER_LAST_PAGE: // nothing to do
m_sLastActivePage = getDesignView()->getCurrentPage();
break;
case SID_SPLIT_POSITION:
getDesignView()->Resize();
break;
case SID_PAGEDIALOG:
case SID_ATTR_CHAR_COLOR_BACKGROUND:
{
uno::Reference<report::XSection> xSection;
if (aArgs.getLength() == 1 )
aArgs[0].Value >>= xSection;
else if (_nId == SID_ATTR_CHAR_COLOR_BACKGROUND)
xSection.set(getDesignView()->getMarkedSection()->getReportSection().getSection());
openPageDialog(xSection);
bForceBroadcast = true;
}
break;
case SID_SORTINGANDGROUPING:
openSortingAndGroupingDialog();
break;
case SID_BACKGROUND_COLOR:
{
const util::Color aColor( lcl_extractBackgroundColor( aArgs ) );
if ( !impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CONTROLBACKGROUND,uno::Any(aColor),aArgs) )
{
uno::Reference< report::XSection > xSection = getDesignView()->getCurrentSection();
if ( xSection.is() )
{
xSection->setBackColor( aColor );
}
}
bForceBroadcast = true;
}
break;
case SID_ATTR_CHAR_WEIGHT:
case SID_ATTR_CHAR_POSTURE:
case SID_ATTR_CHAR_UNDERLINE:
{
uno::Reference< awt::XWindow> xWindow;
::std::vector< uno::Reference< uno::XInterface > > aControlsFormats;
lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats );
const OUString sUndoAction(RptResId(RID_STR_UNDO_CHANGEFONT));
UndoContext aUndoContext( getUndoManager(), sUndoAction );
for (const auto& rxControlFormat : aControlsFormats)
{
uno::Reference< report::XReportControlFormat> xReportControlFormat(rxControlFormat,uno::UNO_QUERY);
lcl_setFontWPU_nothrow(xReportControlFormat,_nId);
}
}
break;
case SID_ATTR_CHAR_COLOR:
case SID_ATTR_CHAR_COLOR2:
case SID_ATTR_CHAR_COLOR_EXT:
{
const util::Color aColor( lcl_extractBackgroundColor( aArgs ) );
impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CHARCOLOR,uno::Any(aColor),aArgs);
bForceBroadcast = true;
}
break;
case SID_ATTR_CHAR_FONT:
if ( aArgs.getLength() == 1 )
{
awt::FontDescriptor aFont;
if ( aArgs[0].Value >>= aFont )
{
impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CHARFONTNAME,uno::Any(aFont.Name),aArgs);
}
}
break;
case SID_ATTR_CHAR_FONTHEIGHT:
if ( aArgs.getLength() == 1 )
{
float fSelVal = 0.0;
if ( aArgs[0].Value >>= fSelVal )
impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CHARHEIGHT,aArgs[0].Value,aArgs);
}
break;
case SID_ATTR_PARA_ADJUST_LEFT:
case SID_ATTR_PARA_ADJUST_CENTER:
case SID_ATTR_PARA_ADJUST_RIGHT:
case SID_ATTR_PARA_ADJUST_BLOCK:
{
style::ParagraphAdjust eParagraphAdjust = style::ParagraphAdjust_LEFT;
switch(_nId)
{
case SID_ATTR_PARA_ADJUST_LEFT:
eParagraphAdjust = style::ParagraphAdjust_LEFT;
break;
case SID_ATTR_PARA_ADJUST_CENTER:
eParagraphAdjust = style::ParagraphAdjust_CENTER;
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
eParagraphAdjust = style::ParagraphAdjust_RIGHT;
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
eParagraphAdjust = style::ParagraphAdjust_BLOCK;
break;
}
impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::Any(static_cast<sal_Int16>(eParagraphAdjust)),aArgs);
InvalidateFeature(SID_ATTR_PARA_ADJUST_LEFT);
InvalidateFeature(SID_ATTR_PARA_ADJUST_CENTER);
InvalidateFeature(SID_ATTR_PARA_ADJUST_RIGHT);
InvalidateFeature(SID_ATTR_PARA_ADJUST_BLOCK);
}
break;
case SID_CHAR_DLG:
{
uno::Sequence< beans::NamedValue > aSettings;
uno::Reference< awt::XWindow> xWindow;
::std::vector< uno::Reference< uno::XInterface > > aControlsFormats;
lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats );
if ( !aControlsFormats.empty() )
{
const OUString sUndoAction( RptResId( RID_STR_UNDO_CHANGEFONT ) );
UndoContext aUndoContext( getUndoManager(), sUndoAction );
for (const auto& rxControlFormat : aControlsFormats)
{
uno::Reference< report::XReportControlFormat > xFormat( rxControlFormat, uno::UNO_QUERY );
if ( !xFormat.is() )
continue;
if ( !aSettings.hasElements() )
{
::rptui::openCharDialog( xFormat, xWindow, aSettings );
if ( !aSettings.hasElements() )
break;
}
applyCharacterSettings( xFormat, aSettings );
}
InvalidateAll();
}
}
break;
case SID_INSERT_GRAPHIC:
insertGraphic();
break;
case SID_SETCONTROLDEFAULTS:
break;
case SID_CONDITIONALFORMATTING:
{
uno::Reference< report::XFormattedField> xFormattedField(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY);
if ( xFormattedField.is() )
{
ConditionalFormattingDialog aDlg(getFrameWeld(), xFormattedField, *this);
aDlg.run();
}
}
break;
case SID_DATETIME:
if ( m_xReportDefinition.is() )
{
if ( !aArgs.hasElements() )
{
ODateTimeDialog aDlg(getFrameWeld(), getDesignView()->getCurrentSection(), this);
aDlg.run();
}
else
createDateTime(aArgs);
}
break;
case SID_INSERT_FLD_PGNUMBER:
if ( m_xReportDefinition.is() )
{
if ( !aArgs.hasElements() )
{
OPageNumberDialog aDlg(getFrameWeld(), m_xReportDefinition, this);
aDlg.run();
}
else
createPageNumber(aArgs);
}
break;
case SID_EXPORTDOC:
case SID_EXPORTDOCASPDF:
case SID_PRINTPREVIEW:
break;
case SID_EDITDOC:
if(isEditable())
{ // the state should be changed to not editable
setModified(false); // and we are not modified yet
}
setEditable(!isEditable());
InvalidateAll();
return;
case SID_GROUP:
break;
case SID_ATTR_ZOOM:
if ( !aArgs.hasElements() )
{
openZoomDialog();
}
else if ( aArgs.getLength() == 1 && aArgs[0].Name == "Zoom" )
{
SvxZoomItem aZoomItem;
aZoomItem.PutValue(aArgs[0].Value, 0);
m_nZoomValue = aZoomItem.GetValue();
m_eZoomType = aZoomItem.GetType();
impl_zoom_nothrow();
}
break;
case SID_ATTR_ZOOMSLIDER:
if ( aArgs.getLength() == 1 && aArgs[0].Name == "ZoomSlider" )
{
SvxZoomSliderItem aZoomSlider;
aZoomSlider.PutValue(aArgs[0].Value, 0);
m_nZoomValue = aZoomSlider.GetValue();
m_eZoomType = SvxZoomType::PERCENT;
impl_zoom_nothrow();
}
break;
default:
OReportController_BASE::Execute(_nId,aArgs);
}
InvalidateFeature(_nId,Reference< XStatusListener >(),bForceBroadcast);
}
void OReportController::impl_initialize( const ::comphelper::NamedValueCollection& rArguments )
{
OReportController_BASE::impl_initialize(rArguments);
rArguments.get_ensureType( PROPERTY_REPORTNAME, m_sName );
if ( m_sName.isEmpty() )
rArguments.get_ensureType( u"DocumentTitle"_ustr, m_sName );
try
{
if ( m_xReportDefinition.is() )
{
getView()->initialize(); // show the windows and fill with our information
m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition);
if ( !m_aReportModel )
throw RuntimeException();
m_aReportModel->attachController( *this );
clearUndoManager();
UndoSuppressor aSuppressUndo( getUndoManager() );
setMode(::comphelper::NamedValueCollection::getOrDefault(getModel()->getArgs(), u"Mode", u"normal"_ustr));
listen(true);
setEditable( !m_aReportModel->IsReadOnly() );
m_xFormatter.set(util::NumberFormatter::create(m_xContext), UNO_QUERY_THROW);
m_xFormatter->attachNumberFormatsSupplier(Reference< XNumberFormatsSupplier>(m_xReportDefinition,uno::UNO_QUERY));
utl::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() );
OUString sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault(u"HierarchicalDocumentName"_ustr,OUString());
if ( sHierarchicalDocumentName.isEmpty() && getConnection().is() )
{
uno::Reference<sdbcx::XTablesSupplier> xTablesSup(getConnection(),uno::UNO_QUERY_THROW);
uno::Reference<container::XNameAccess> xTables = xTablesSup->getTables();
const uno::Sequence< OUString > aNames( xTables->getElementNames() );
if ( aNames.hasElements() )
{
m_xReportDefinition->setCommand(aNames[0]);
m_xReportDefinition->setCommandType(sdb::CommandType::TABLE);
}
}
m_aVisualAreaSize = m_xReportDefinition->getVisualAreaSize(0);
}
// check if chart is supported by the engine
checkChartEnabled();
// restore the view data
getDesignView()->toggleGrid(m_bGridVisible);
getDesignView()->showRuler(m_bShowRuler);
getDesignView()->togglePropertyBrowser(m_bShowProperties);
getDesignView()->setCurrentPage(m_sLastActivePage);
getDesignView()->unmarkAllObjects();
if ( m_nPageNum != -1 )
{
if ( m_nPageNum < m_aReportModel->GetPageCount() )
{
const OReportPage* pPage = dynamic_cast<OReportPage*>(m_aReportModel->GetPage(static_cast<sal_uInt16>(m_nPageNum)));
if ( pPage )
{
executeUnChecked(SID_SELECT,{ comphelper::makePropertyValue(u""_ustr, pPage->getSection() ) });
}
}
else
m_nPageNum = -1;
}
getDesignView()->collapseSections(m_aCollapsedSections);
impl_zoom_nothrow();
getDesignView()->Resize();
getDesignView()->Invalidate();
InvalidateAll();
if ( m_bShowProperties && m_nPageNum == -1 )
{
m_sLastActivePage = "Data";
getDesignView()->setCurrentPage(m_sLastActivePage);
executeUnChecked(SID_SELECT_REPORT,{});
}
setModified(false); // and we are not modified yet
}
catch(const SQLException&)
{
DBG_UNHANDLED_EXCEPTION("reportdesign");
}
}
IMPL_LINK( OReportController, OnCreateHdl, OAddFieldWindow& ,_rAddFieldDlg, void)
{
weld::WaitObject aObj(getFrameWeld());
uno::Sequence< beans::PropertyValue > aArgs = _rAddFieldDlg.getSelectedFieldDescriptors();
// we use this way to create undo actions
if ( aArgs.hasElements() )
{
executeChecked(SID_ADD_CONTROL_PAIR,aArgs);
}
}
bool OReportController::Construct(vcl::Window* pParent)
{
VclPtrInstance<ODesignView> pMyOwnView( pParent, m_xContext, *this );
StartListening( *pMyOwnView );
setView( pMyOwnView );
// now that we have a view we can create the clipboard listener
m_aSystemClipboard = TransferableDataHelper::CreateFromSystemClipboard( getView() );
m_aSystemClipboard.StartClipboardListening( );
m_pClipboardNotifier = new TransferableClipboardListener( LINK( this, OReportController, OnClipboardChanged ) );
m_pClipboardNotifier->AddListener( getView() );
OReportController_BASE::Construct(pParent);
return true;
}
sal_Bool SAL_CALL OReportController::suspend(sal_Bool /*_bSuspend*/)
{
if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed )
return true;
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return false;
// this suspend will be handled in the DBAccess interceptor implementation
return true;
}
void OReportController::describeSupportedFeatures()
{
DBSubComponentController::describeSupportedFeatures();
implDescribeSupportedFeature( u".uno:TextDocument"_ustr, SID_RPT_TEXTDOCUMENT, CommandGroup::APPLICATION );
implDescribeSupportedFeature( u".uno:Spreadsheet"_ustr, SID_RPT_SPREADSHEET, CommandGroup::APPLICATION );
implDescribeSupportedFeature( u".uno:Redo"_ustr, SID_REDO, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:Undo"_ustr, SID_UNDO, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:SelectAll"_ustr, SID_SELECTALL, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:SelectAllInSection"_ustr, SID_SELECTALL_IN_SECTION, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:Delete"_ustr, SID_DELETE, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:SelectReport"_ustr, SID_SELECT_REPORT, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:ExecuteReport"_ustr, SID_EXECUTE_REPORT, CommandGroup::EDIT );
implDescribeSupportedFeature( u".uno:GridVisible"_ustr, SID_GRID_VISIBLE, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:GridUse"_ustr, SID_GRID_USE, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:HelplinesMove"_ustr, SID_HELPLINES_MOVE, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:ShowRuler"_ustr, SID_RULER, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:AddField"_ustr, SID_FM_ADD_FIELD, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:ReportNavigator"_ustr, SID_RPT_SHOWREPORTEXPLORER, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:ControlProperties"_ustr, SID_SHOW_PROPERTYBROWSER, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:DbSortingAndGrouping"_ustr, SID_SORTINGANDGROUPING, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:PageHeaderFooter"_ustr, SID_PAGEHEADERFOOTER, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:ReportHeaderFooter"_ustr, SID_REPORTHEADERFOOTER, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:ZoomSlider"_ustr, SID_ATTR_ZOOMSLIDER );
implDescribeSupportedFeature( u".uno:Zoom"_ustr, SID_ATTR_ZOOM, CommandGroup::VIEW );
implDescribeSupportedFeature( u".uno:ConditionalFormatting"_ustr, SID_CONDITIONALFORMATTING, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:PageDialog"_ustr, SID_PAGEDIALOG, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ResetAttributes"_ustr, SID_SETCONTROLDEFAULTS, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:Bold"_ustr, SID_ATTR_CHAR_WEIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:Italic"_ustr, SID_ATTR_CHAR_POSTURE, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:Underline"_ustr, SID_ATTR_CHAR_UNDERLINE, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DBBackgroundColor"_ustr, SID_ATTR_CHAR_COLOR_BACKGROUND, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:BackgroundColor"_ustr, SID_BACKGROUND_COLOR, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:CharColorExt"_ustr, SID_ATTR_CHAR_COLOR_EXT);
implDescribeSupportedFeature( u".uno:Color"_ustr, SID_ATTR_CHAR_COLOR);
implDescribeSupportedFeature( u".uno:FontColor"_ustr, SID_ATTR_CHAR_COLOR2, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:FontDialog"_ustr, SID_CHAR_DLG, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:LeftPara"_ustr, SID_ATTR_PARA_ADJUST_LEFT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:CenterPara"_ustr, SID_ATTR_PARA_ADJUST_CENTER, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:RightPara"_ustr, SID_ATTR_PARA_ADJUST_RIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:JustifyPara"_ustr, SID_ATTR_PARA_ADJUST_BLOCK, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:FontHeight"_ustr, SID_ATTR_CHAR_FONTHEIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:CharFontName"_ustr, SID_ATTR_CHAR_FONT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ArrangeMenu"_ustr, SID_ARRANGEMENU, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:BringToFront"_ustr, SID_FRAME_TO_TOP, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ObjectBackOne"_ustr, SID_FRAME_DOWN, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ObjectForwardOne"_ustr, SID_FRAME_UP, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SendToBack"_ustr, SID_FRAME_TO_BOTTOM, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SetObjectToForeground"_ustr, SID_OBJECT_HEAVEN, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SetObjectToBackground"_ustr, SID_OBJECT_HELL, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ObjectAlign"_ustr, SID_OBJECT_ALIGN, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ObjectAlignLeft"_ustr, SID_OBJECT_ALIGN_LEFT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:AlignCenter"_ustr, SID_OBJECT_ALIGN_CENTER, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ObjectAlignRight"_ustr, SID_OBJECT_ALIGN_RIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:AlignUp"_ustr, SID_OBJECT_ALIGN_UP, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:AlignMiddle"_ustr, SID_OBJECT_ALIGN_MIDDLE, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:AlignDown"_ustr, SID_OBJECT_ALIGN_DOWN, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionAlign"_ustr, SID_SECTION_ALIGN );
implDescribeSupportedFeature( u".uno:SectionAlignLeft"_ustr, SID_SECTION_ALIGN_LEFT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionAlignCenter"_ustr, SID_SECTION_ALIGN_CENTER, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionAlignRight"_ustr, SID_SECTION_ALIGN_RIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionAlignTop"_ustr, SID_SECTION_ALIGN_UP, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionAlignMiddle"_ustr, SID_SECTION_ALIGN_MIDDLE, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionAlignBottom"_ustr, SID_SECTION_ALIGN_DOWN, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionShrink"_ustr, SID_SECTION_SHRINK, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionShrinkTop"_ustr, SID_SECTION_SHRINK_TOP, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SectionShrinkBottom"_ustr, SID_SECTION_SHRINK_BOTTOM, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ObjectResize"_ustr, SID_OBJECT_RESIZING, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SmallestWidth"_ustr, SID_OBJECT_SMALLESTWIDTH, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:SmallestHeight"_ustr, SID_OBJECT_SMALLESTHEIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:GreatestWidth"_ustr, SID_OBJECT_GREATESTWIDTH, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:GreatestHeight"_ustr, SID_OBJECT_GREATESTHEIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeSelection"_ustr, SID_DISTRIBUTE_DLG, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeHorzLeft"_ustr, SID_DISTRIBUTE_HLEFT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeHorzCenter"_ustr, SID_DISTRIBUTE_HCENTER, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeHorzDistance"_ustr, SID_DISTRIBUTE_HDISTANCE, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeHorzRight"_ustr, SID_DISTRIBUTE_HRIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeVertTop"_ustr, SID_DISTRIBUTE_VTOP, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeVertCenter"_ustr, SID_DISTRIBUTE_VCENTER, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeVertDistance"_ustr, SID_DISTRIBUTE_VDISTANCE, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:DistributeVertBottom"_ustr, SID_DISTRIBUTE_VBOTTOM, CommandGroup::FORMAT );
implDescribeSupportedFeature( u".uno:ExportTo"_ustr, SID_EXPORTDOC, CommandGroup::APPLICATION );
implDescribeSupportedFeature( u".uno:ExportToPDF"_ustr, SID_EXPORTDOCASPDF, CommandGroup::APPLICATION );
implDescribeSupportedFeature( u".uno:PrintPreview"_ustr, SID_PRINTPREVIEW, CommandGroup::APPLICATION );
implDescribeSupportedFeature( u".uno:NewDoc"_ustr, SID_NEWDOC, CommandGroup::DOCUMENT );
implDescribeSupportedFeature( u".uno:Save"_ustr, SID_SAVEDOC, CommandGroup::DOCUMENT );
implDescribeSupportedFeature( u".uno:SaveAs"_ustr, SID_SAVEASDOC, CommandGroup::DOCUMENT );
implDescribeSupportedFeature( u".uno:SaveACopy"_ustr, SID_SAVEACOPY, CommandGroup::DOCUMENT );
implDescribeSupportedFeature( u".uno:InsertPageNumberField"_ustr, SID_INSERT_FLD_PGNUMBER, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:InsertDateTimeField"_ustr, SID_DATETIME, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:InsertObjectChart"_ustr, SID_INSERT_DIAGRAM, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:InsertGraphic"_ustr, SID_INSERT_GRAPHIC, CommandGroup::INSERT );
// controls
implDescribeSupportedFeature( u".uno:SelectObject"_ustr, SID_OBJECT_SELECT, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:Label"_ustr, SID_FM_FIXEDTEXT, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:Edit"_ustr, SID_FM_EDIT, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ImageControl"_ustr, SID_FM_IMAGECONTROL, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:HFixedLine"_ustr, SID_INSERT_HFIXEDLINE, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:VFixedLine"_ustr, SID_INSERT_VFIXEDLINE, CommandGroup::INSERT );
// shapes
implDescribeSupportedFeature( u".uno:BasicShapes"_ustr, SID_DRAWTBX_CS_BASIC, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.rectangle"_ustr, SID_DRAWTBX_CS_BASIC1, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.round-rectangle"_ustr,SID_DRAWTBX_CS_BASIC2, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.quadrat"_ustr, SID_DRAWTBX_CS_BASIC3, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.round-quadrat"_ustr, SID_DRAWTBX_CS_BASIC4, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.circle"_ustr, SID_DRAWTBX_CS_BASIC5, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.ellipse"_ustr, SID_DRAWTBX_CS_BASIC6, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.circle-pie"_ustr, SID_DRAWTBX_CS_BASIC7, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.isosceles-triangle"_ustr,SID_DRAWTBX_CS_BASIC8, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.right-triangle"_ustr,SID_DRAWTBX_CS_BASIC9, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.trapezoid"_ustr, SID_DRAWTBX_CS_BASIC10, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.diamond"_ustr, SID_DRAWTBX_CS_BASIC11, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.parallelogram"_ustr, SID_DRAWTBX_CS_BASIC12, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.pentagon"_ustr, SID_DRAWTBX_CS_BASIC13, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.hexagon"_ustr, SID_DRAWTBX_CS_BASIC14, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.octagon"_ustr, SID_DRAWTBX_CS_BASIC15, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.cross"_ustr, SID_DRAWTBX_CS_BASIC16, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.ring"_ustr, SID_DRAWTBX_CS_BASIC17, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.block-arc"_ustr, SID_DRAWTBX_CS_BASIC18, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.can"_ustr, SID_DRAWTBX_CS_BASIC19, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.cube"_ustr, SID_DRAWTBX_CS_BASIC20, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.paper"_ustr, SID_DRAWTBX_CS_BASIC21, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:BasicShapes.frame"_ustr, SID_DRAWTBX_CS_BASIC22, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes"_ustr, SID_DRAWTBX_CS_SYMBOL, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.smiley"_ustr , SID_DRAWTBX_CS_SYMBOL1, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.sun"_ustr , SID_DRAWTBX_CS_SYMBOL2, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.moon"_ustr , SID_DRAWTBX_CS_SYMBOL3, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.lightning"_ustr , SID_DRAWTBX_CS_SYMBOL4, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.heart"_ustr , SID_DRAWTBX_CS_SYMBOL5, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.flower"_ustr , SID_DRAWTBX_CS_SYMBOL6, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.cloud"_ustr , SID_DRAWTBX_CS_SYMBOL7, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.forbidden"_ustr , SID_DRAWTBX_CS_SYMBOL8, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.puzzle"_ustr , SID_DRAWTBX_CS_SYMBOL9, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.bracket-pair"_ustr ,SID_DRAWTBX_CS_SYMBOL10, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.left-bracket"_ustr ,SID_DRAWTBX_CS_SYMBOL11, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.right-bracket"_ustr,SID_DRAWTBX_CS_SYMBOL12, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.brace-pair"_ustr , SID_DRAWTBX_CS_SYMBOL13, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.left-brace"_ustr , SID_DRAWTBX_CS_SYMBOL14, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.right-brace"_ustr , SID_DRAWTBX_CS_SYMBOL15, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.quad-bevel"_ustr , SID_DRAWTBX_CS_SYMBOL16, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.octagon-bevel"_ustr,SID_DRAWTBX_CS_SYMBOL17, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:SymbolShapes.diamond-bevel"_ustr,SID_DRAWTBX_CS_SYMBOL18, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.left-arrow"_ustr , SID_DRAWTBX_CS_ARROW1, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.right-arrow"_ustr , SID_DRAWTBX_CS_ARROW2, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-arrow"_ustr , SID_DRAWTBX_CS_ARROW3, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.down-arrow"_ustr , SID_DRAWTBX_CS_ARROW4, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.left-right-arrow"_ustr , SID_DRAWTBX_CS_ARROW5, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-down-arrow"_ustr , SID_DRAWTBX_CS_ARROW6, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-right-arrow"_ustr , SID_DRAWTBX_CS_ARROW7, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-right-down-arrow"_ustr , SID_DRAWTBX_CS_ARROW8, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.quad-arrow"_ustr , SID_DRAWTBX_CS_ARROW9, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.corner-right-arrow"_ustr , SID_DRAWTBX_CS_ARROW10, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.split-arrow"_ustr , SID_DRAWTBX_CS_ARROW11, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.striped-right-arrow"_ustr , SID_DRAWTBX_CS_ARROW12, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.notched-right-arrow"_ustr , SID_DRAWTBX_CS_ARROW13, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.pentagon-right"_ustr , SID_DRAWTBX_CS_ARROW14, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.chevron"_ustr , SID_DRAWTBX_CS_ARROW15, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.right-arrow-callout"_ustr , SID_DRAWTBX_CS_ARROW16, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.left-arrow-callout"_ustr , SID_DRAWTBX_CS_ARROW17, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-arrow-callout"_ustr , SID_DRAWTBX_CS_ARROW18, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.down-arrow-callout"_ustr , SID_DRAWTBX_CS_ARROW19, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.left-right-arrow-callout"_ustr,SID_DRAWTBX_CS_ARROW20, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-down-arrow-callout"_ustr ,SID_DRAWTBX_CS_ARROW21, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.up-right-arrow-callout"_ustr,SID_DRAWTBX_CS_ARROW22, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.quad-arrow-callout"_ustr , SID_DRAWTBX_CS_ARROW23, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.circular-arrow"_ustr , SID_DRAWTBX_CS_ARROW24, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.split-round-arrow"_ustr , SID_DRAWTBX_CS_ARROW25, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:ArrowShapes.s-sharped-arrow"_ustr , SID_DRAWTBX_CS_ARROW26, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.bang"_ustr , SID_DRAWTBX_CS_STAR1, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.star4"_ustr , SID_DRAWTBX_CS_STAR2, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.star5"_ustr , SID_DRAWTBX_CS_STAR3, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.star6"_ustr , SID_DRAWTBX_CS_STAR4, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.star8"_ustr , SID_DRAWTBX_CS_STAR5, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.star12"_ustr , SID_DRAWTBX_CS_STAR6, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.star24"_ustr , SID_DRAWTBX_CS_STAR7, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.concave-star6"_ustr , SID_DRAWTBX_CS_STAR8, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.vertical-scroll"_ustr , SID_DRAWTBX_CS_STAR9, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.horizontal-scroll"_ustr , SID_DRAWTBX_CS_STAR10, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.signet"_ustr , SID_DRAWTBX_CS_STAR11, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:StarShapes.doorplate"_ustr , SID_DRAWTBX_CS_STAR12, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-process"_ustr , SID_DRAWTBX_CS_FLOWCHART1, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-alternate-process"_ustr , SID_DRAWTBX_CS_FLOWCHART2, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-decision"_ustr , SID_DRAWTBX_CS_FLOWCHART3, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-data"_ustr , SID_DRAWTBX_CS_FLOWCHART4, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-predefined-process"_ustr , SID_DRAWTBX_CS_FLOWCHART5, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-internal-storage"_ustr , SID_DRAWTBX_CS_FLOWCHART6, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-document"_ustr , SID_DRAWTBX_CS_FLOWCHART7, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-multidocument"_ustr , SID_DRAWTBX_CS_FLOWCHART8, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-terminator"_ustr , SID_DRAWTBX_CS_FLOWCHART9, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-preparation"_ustr , SID_DRAWTBX_CS_FLOWCHART10, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-manual-input"_ustr , SID_DRAWTBX_CS_FLOWCHART11, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-manual-operation"_ustr , SID_DRAWTBX_CS_FLOWCHART12, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-connector"_ustr , SID_DRAWTBX_CS_FLOWCHART13, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-off-page-connector"_ustr , SID_DRAWTBX_CS_FLOWCHART14, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-card"_ustr , SID_DRAWTBX_CS_FLOWCHART15, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-punched-tape"_ustr , SID_DRAWTBX_CS_FLOWCHART16, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-summing-junction"_ustr , SID_DRAWTBX_CS_FLOWCHART17, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-or"_ustr , SID_DRAWTBX_CS_FLOWCHART18, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-collate"_ustr , SID_DRAWTBX_CS_FLOWCHART19, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-sort"_ustr , SID_DRAWTBX_CS_FLOWCHART20, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-extract"_ustr , SID_DRAWTBX_CS_FLOWCHART21, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-merge"_ustr , SID_DRAWTBX_CS_FLOWCHART22, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-stored-data"_ustr , SID_DRAWTBX_CS_FLOWCHART23, CommandGroup::INSERT );
implDescribeSupportedFeature( u".uno:FlowChartShapes.flowchart-delay"_ustr , SID_DRAWTBX_CS_FLOWCHART24, CommandGroup::INSERT ); | |