summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2009-09-08 13:05:14 +0000
committerThomas Benisch <tbe@openoffice.org>2009-09-08 13:05:14 +0000
commit63ec5317c74d46f2c8d4027a6571402caf262ed5 (patch)
tree348dd3ad4616548a9085c34cbf2a5dd9b572ae09 /chart2/source/controller
parent02dd808a086acd4f2aea8a16a3970207fa4708d9 (diff)
#i12587# Inserting/editing arbitrary text objects in chart
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/ResourceIds.hrc178
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx170
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeParagraph.src140
-rw-r--r--chart2/source/controller/inc/ShapeController.hrc106
-rw-r--r--chart2/source/controller/inc/dlg_ShapeParagraph.hxx114
-rw-r--r--chart2/source/controller/main/ShapeController.cxx1432
-rw-r--r--chart2/source/controller/main/ShapeController.hxx206
-rw-r--r--chart2/source/controller/menus/ShapeEditContextMenu.src138
8 files changed, 1242 insertions, 1242 deletions
diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc
index a9a4b1611bb6..43123a42a59e 100644
--- a/chart2/source/controller/dialogs/ResourceIds.hrc
+++ b/chart2/source/controller/dialogs/ResourceIds.hrc
@@ -1,89 +1,89 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ResourceIds.hrc,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CHART2_RESOURCE_IDS_HRC
-#define _CHART2_RESOURCE_IDS_HRC
-
-//-----------------------------------------------------------------------------
-//for strings see Strings.hrc
-
-//-----------------------------------------------------------------------------
-//for Bimaps see Bimaps.hrc and Bimaps_HC.hrc
-
-//-----------------------------------------------------------------------------
-//Dialog Ids:
-#define DLG_DIAGRAM_TYPE 743
-#define DLG_CHART_WIZARD 902
-#define DLG_DATA_SOURCE 901
-#define DLG_AXIS_OR_GRID 839
-#define DLG_DATA_DESCR 836
-#define DLG_LEGEND 835
-#define DLG_TITLE 834
-#define DLG_3D_VIEW 752
-#define DLG_OBJECT_PROPERTIES 903
-#define DLG_SPLINE_PROPERTIES 904
-#define DLG_DATA_TRENDLINE 841
-#define DLG_DATA_YERRORBAR 842
-#define DLG_SHAPE_FONT 921
-#define DLG_SHAPE_PARAGRAPH 922
-
-//-----------------------------------------------------------------------------
-//TabPage Ids:
-#define TP_LEGEND_POS 900
-#define TP_DATA_DESCR 901
-#define TP_ALIGNMENT 902
-//#define TP_SYMBOL 906
-#define TP_LAYOUT 907
-#define TP_OPTIONS 908
-#define TP_POLAROPTIONS 909
-#define TP_AXIS_LABEL 920
-#define TP_SCALE 903
-#define TP_AXIS_POSITIONS 904
-#define TP_CHARTTYPE 910
-#define TP_RANGECHOOSER 911
-#define TP_WIZARD_TITLEANDOBJECTS 912
-#define TP_LOCATION 913
-#define TP_DATA_SOURCE 914
-
-#define TP_3D_SCENEGEOMETRY 915
-#define TP_3D_SCENEAPPEARANCE 916
-#define TP_3D_SCENEILLUMINATION 917
-
-#define TP_TRENDLINE 918
-#define TP_YERRORBAR 919
-
-//-----------------------------------------------------------------------------
-//listbox Ids:
-#define LB_BAR_GEOMETRY 1000
-#define LB_TEXT_SEPARATOR 1001
-
-//-----------------------------------------------------------------------------
-
-#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ResourceIds.hrc,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_RESOURCE_IDS_HRC
+#define _CHART2_RESOURCE_IDS_HRC
+
+//-----------------------------------------------------------------------------
+//for strings see Strings.hrc
+
+//-----------------------------------------------------------------------------
+//for Bimaps see Bimaps.hrc and Bimaps_HC.hrc
+
+//-----------------------------------------------------------------------------
+//Dialog Ids:
+#define DLG_DIAGRAM_TYPE 743
+#define DLG_CHART_WIZARD 902
+#define DLG_DATA_SOURCE 901
+#define DLG_AXIS_OR_GRID 839
+#define DLG_DATA_DESCR 836
+#define DLG_LEGEND 835
+#define DLG_TITLE 834
+#define DLG_3D_VIEW 752
+#define DLG_OBJECT_PROPERTIES 903
+#define DLG_SPLINE_PROPERTIES 904
+#define DLG_DATA_TRENDLINE 841
+#define DLG_DATA_YERRORBAR 842
+#define DLG_SHAPE_FONT 921
+#define DLG_SHAPE_PARAGRAPH 922
+
+//-----------------------------------------------------------------------------
+//TabPage Ids:
+#define TP_LEGEND_POS 900
+#define TP_DATA_DESCR 901
+#define TP_ALIGNMENT 902
+//#define TP_SYMBOL 906
+#define TP_LAYOUT 907
+#define TP_OPTIONS 908
+#define TP_POLAROPTIONS 909
+#define TP_AXIS_LABEL 920
+#define TP_SCALE 903
+#define TP_AXIS_POSITIONS 904
+#define TP_CHARTTYPE 910
+#define TP_RANGECHOOSER 911
+#define TP_WIZARD_TITLEANDOBJECTS 912
+#define TP_LOCATION 913
+#define TP_DATA_SOURCE 914
+
+#define TP_3D_SCENEGEOMETRY 915
+#define TP_3D_SCENEAPPEARANCE 916
+#define TP_3D_SCENEILLUMINATION 917
+
+#define TP_TRENDLINE 918
+#define TP_YERRORBAR 919
+
+//-----------------------------------------------------------------------------
+//listbox Ids:
+#define LB_BAR_GEOMETRY 1000
+#define LB_TEXT_SEPARATOR 1001
+
+//-----------------------------------------------------------------------------
+
+#endif
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
index 4e56aca25563..d57adca58e7c 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
@@ -1,79 +1,79 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: dlg_ShapeFont.cxx,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-
-#include "dlg_ShapeParagraph.hxx"
-#include "ResId.hxx"
-#include "ResourceIds.hrc"
-
-#include <svtools/cjkoptions.hxx>
-#include <svtools/intitem.hxx>
-#include <svx/dialogs.hrc>
-#include <svx/flagsdef.hxx>
-
-using ::com::sun::star::uno::Reference;
-using namespace ::com::sun::star;
-
-//.............................................................................
-namespace chart
-{
-//.............................................................................
-
-ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr )
- :SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr )
-{
- FreeResource();
-
- SvtCJKOptions aCJKOptions;
-
- AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
- AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
- if ( aCJKOptions.IsAsianTypographyEnabled() )
- {
- AddTabPage( RID_SVXPAGE_PARA_ASIAN );
- }
- else
- {
- RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
- }
- AddTabPage( RID_SVXPAGE_TABULATOR );
-}
-
-ShapeParagraphDialog::~ShapeParagraphDialog()
-{
-}
-
-void ShapeParagraphDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
-{
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlg_ShapeFont.cxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "dlg_ShapeParagraph.hxx"
+#include "ResId.hxx"
+#include "ResourceIds.hrc"
+
+#include <svtools/cjkoptions.hxx>
+#include <svtools/intitem.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/flagsdef.hxx>
+
+using ::com::sun::star::uno::Reference;
+using namespace ::com::sun::star;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr )
+ :SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr )
+{
+ FreeResource();
+
+ SvtCJKOptions aCJKOptions;
+
+ AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
+ AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
+ if ( aCJKOptions.IsAsianTypographyEnabled() )
+ {
+ AddTabPage( RID_SVXPAGE_PARA_ASIAN );
+ }
+ else
+ {
+ RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
+ }
+ AddTabPage( RID_SVXPAGE_TABULATOR );
+}
+
+ShapeParagraphDialog::~ShapeParagraphDialog()
+{
+}
+
+void ShapeParagraphDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
switch ( nId )
{
@@ -84,13 +84,13 @@ void ShapeParagraphDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
rPage.PageCreated( aSet );
}
break;
- default:
- {
- }
- break;
+ default:
+ {
+ }
+ break;
}
-}
-
-//.............................................................................
-} //namespace chart
-//.............................................................................
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.src b/chart2/source/controller/dialogs/dlg_ShapeParagraph.src
index d927c643666d..b8f0bd92d706 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.src
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.src
@@ -1,70 +1,70 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: dlg_ShapeFont.src,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "ResourceIds.hrc"
-#include <svx/dialogs.hrc>
-
-TabDialog DLG_SHAPE_PARAGRAPH
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 289 , 176 ) ;
- Text [ en-US ] = "Paragraph" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- TabControl 1
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 3 , 3 ) ;
- Size = MAP_APPFONT ( 260 , 135 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
- Text [ en-US ] = "Indents & Spacing";
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ;
- Text [ en-US ] = "Alignment";
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_PARA_ASIAN ;
- Text [ en-US ] = "Asian Typography";
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_TABULATOR ;
- Text [ en-US ] = "Tab";
- };
- };
- };
-};
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlg_ShapeFont.src,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "ResourceIds.hrc"
+#include <svx/dialogs.hrc>
+
+TabDialog DLG_SHAPE_PARAGRAPH
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ Text [ en-US ] = "Paragraph" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
+ Text [ en-US ] = "Indents & Spacing";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ;
+ Text [ en-US ] = "Alignment";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_PARA_ASIAN ;
+ Text [ en-US ] = "Asian Typography";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_TABULATOR ;
+ Text [ en-US ] = "Tab";
+ };
+ };
+ };
+};
diff --git a/chart2/source/controller/inc/ShapeController.hrc b/chart2/source/controller/inc/ShapeController.hrc
index 6d7aa994bb28..af5f2b7d4bc9 100644
--- a/chart2/source/controller/inc/ShapeController.hrc
+++ b/chart2/source/controller/inc/ShapeController.hrc
@@ -1,53 +1,53 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ShapeController.hrc,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART_SHAPECONTROLLER_HRC
-#define CHART_SHAPECONTROLLER_HRC
-
-//-----------------------------------------------------------------------------
-//Command Ids:
-#define COMMAND_ID_FORMAT_LINE 1
-#define COMMAND_ID_FORMAT_AREA 2
-#define COMMAND_ID_TEXT_ATTRIBUTES 3
-#define COMMAND_ID_TRANSFORM_DIALOG 4
-#define COMMAND_ID_OBJECT_TITLE_DESCRIPTION 5
-#define COMMAND_ID_RENAME_OBJECT 6
-#define COMMAND_ID_ARRANGE_ROW 7
-#define COMMAND_ID_BRING_TO_FRONT 8
-#define COMMAND_ID_FORWARD 9
-#define COMMAND_ID_BACKWARD 10
-#define COMMAND_ID_SEND_TO_BACK 11
-#define COMMAND_ID_CUT 12
-#define COMMAND_ID_COPY 13
-#define COMMAND_ID_PASTE 14
-#define COMMAND_ID_FONT_DIALOG 15
-#define COMMAND_ID_PARAGRAPH_DIALOG 16
-
-// CHART_SHAPECONTROLLER_HRC
-#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ShapeController.hrc,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_SHAPECONTROLLER_HRC
+#define CHART_SHAPECONTROLLER_HRC
+
+//-----------------------------------------------------------------------------
+//Command Ids:
+#define COMMAND_ID_FORMAT_LINE 1
+#define COMMAND_ID_FORMAT_AREA 2
+#define COMMAND_ID_TEXT_ATTRIBUTES 3
+#define COMMAND_ID_TRANSFORM_DIALOG 4
+#define COMMAND_ID_OBJECT_TITLE_DESCRIPTION 5
+#define COMMAND_ID_RENAME_OBJECT 6
+#define COMMAND_ID_ARRANGE_ROW 7
+#define COMMAND_ID_BRING_TO_FRONT 8
+#define COMMAND_ID_FORWARD 9
+#define COMMAND_ID_BACKWARD 10
+#define COMMAND_ID_SEND_TO_BACK 11
+#define COMMAND_ID_CUT 12
+#define COMMAND_ID_COPY 13
+#define COMMAND_ID_PASTE 14
+#define COMMAND_ID_FONT_DIALOG 15
+#define COMMAND_ID_PARAGRAPH_DIALOG 16
+
+// CHART_SHAPECONTROLLER_HRC
+#endif
diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
index f9ad8ab41c7a..e020aef7530b 100644
--- a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
@@ -1,57 +1,57 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: dlg_ShapeFont.hxx,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART2_DLG_SHAPEPARAGRAPH_HXX
-#define CHART2_DLG_SHAPEPARAGRAPH_HXX
-
-#include <sfx2/tabdlg.hxx>
-
-//.............................................................................
-namespace chart
-{
-//.............................................................................
-
-/** dialog for paragraph properties of shapes
- */
-class ShapeParagraphDialog : public SfxTabDialog
-{
-public:
- ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr );
- virtual ~ShapeParagraphDialog();
-
-private:
- virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
-};
-
-//.............................................................................
-} // namespace chart
-//.............................................................................
-
-// CHART2_DLG_SHAPEPARAGRAPH_HXX
-#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlg_ShapeFont.hxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DLG_SHAPEPARAGRAPH_HXX
+#define CHART2_DLG_SHAPEPARAGRAPH_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+/** dialog for paragraph properties of shapes
+ */
+class ShapeParagraphDialog : public SfxTabDialog
+{
+public:
+ ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr );
+ virtual ~ShapeParagraphDialog();
+
+private:
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_DLG_SHAPEPARAGRAPH_HXX
+#endif
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 00c7f7f34b63..8a2e0e92e3e6 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -1,594 +1,594 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ShapeController.cxx,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-
-#include "ShapeController.hxx"
-#include "ShapeController.hrc"
-#include "ChartController.hxx"
-#include "ChartWindow.hxx"
-#include "ViewElementListProvider.hxx"
-#include "dlg_ShapeFont.hxx"
-#include "dlg_ShapeParagraph.hxx"
-#include "chartview/DrawModelWrapper.hxx"
-#include "macros.hxx"
-
-#include <com/sun/star/frame/XStorable.hpp>
-
-#include <vos/mutex.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/svapp.hxx>
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ShapeController.cxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "ShapeController.hxx"
+#include "ShapeController.hrc"
+#include "ChartController.hxx"
+#include "ChartWindow.hxx"
+#include "ViewElementListProvider.hxx"
+#include "dlg_ShapeFont.hxx"
+#include "dlg_ShapeParagraph.hxx"
+#include "chartview/DrawModelWrapper.hxx"
+#include "macros.hxx"
+
+#include <com/sun/star/frame/XStorable.hpp>
+
+#include <vos/mutex.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
#include <svx/brkitem.hxx>
-#include <svx/dialogs.hrc>
-#include <svx/drawitem.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/drawitem.hxx>
#include <svx/eeitem.hxx>
#include <svx/hyznitem.hxx>
#include <svx/orphitem.hxx>
#include <svx/spltitem.hxx>
-#include <svx/svxdlg.hxx>
-#include <svx/svxids.hrc>
+#include <svx/svxdlg.hxx>
+#include <svx/svxids.hrc>
#include <svx/widwitem.hxx>
-
-#include <boost/scoped_ptr.hpp>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::frame;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-
-//.............................................................................
-namespace chart
-{
-//.............................................................................
-
-ShapeController::ShapeController( const Reference< uno::XComponentContext >& rxContext,
- ChartController* pController )
- :FeatureCommandDispatchBase( rxContext )
- ,m_pChartController( pController )
-{
-}
-
-ShapeController::~ShapeController()
-{
-}
-
-void ShapeController::initialize()
-{
- FeatureCommandDispatchBase::initialize();
-}
-
-// WeakComponentImplHelperBase
-void ShapeController::disposing()
-{
-}
-
-// XEventListener
-void ShapeController::disposing( const lang::EventObject& /* Source */ )
- throw (uno::RuntimeException)
-{
-}
-
-FeatureState ShapeController::getState( const ::rtl::OUString& rCommand )
-{
- FeatureState aReturn;
- aReturn.bEnabled = false;
- aReturn.aState <<= false;
-
- bool bWritable = false;
- if ( m_pChartController )
- {
- Reference< frame::XStorable > xStorable( m_pChartController->getModel(), uno::UNO_QUERY );
- if ( xStorable.is() )
- {
- bWritable = !xStorable->isReadonly();
- }
- }
-
- sal_uInt16 nFeatureId = m_aSupportedFeatures[ rCommand ].nFeatureId;
-
- switch ( nFeatureId )
- {
- case COMMAND_ID_FORMAT_LINE:
- case COMMAND_ID_FORMAT_AREA:
- case COMMAND_ID_TEXT_ATTRIBUTES:
- case COMMAND_ID_TRANSFORM_DIALOG:
- case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
- case COMMAND_ID_RENAME_OBJECT:
- {
- aReturn.bEnabled = bWritable;
- aReturn.aState <<= false;
- }
- break;
- case COMMAND_ID_BRING_TO_FRONT:
- case COMMAND_ID_FORWARD:
- {
- aReturn.bEnabled = ( bWritable && isForwardPossible() );
- aReturn.aState <<= false;
- }
- break;
- case COMMAND_ID_BACKWARD:
- case COMMAND_ID_SEND_TO_BACK:
- {
-
- aReturn.bEnabled = ( bWritable && isBackwardPossible() );
- aReturn.aState <<= false;
- }
- break;
- case COMMAND_ID_FONT_DIALOG:
- case COMMAND_ID_PARAGRAPH_DIALOG:
- {
- aReturn.bEnabled = bWritable;
- aReturn.aState <<= false;
- }
- break;
- default:
- {
- aReturn.bEnabled = false;
- aReturn.aState <<= false;
- }
- break;
- }
-
- return aReturn;
-}
-
-void ShapeController::execute( const ::rtl::OUString& rCommand, const Sequence< beans::PropertyValue>& rArgs )
-{
- (void)rArgs;
-
- sal_uInt16 nFeatureId = m_aSupportedFeatures[ rCommand ].nFeatureId;
-
- switch ( nFeatureId )
- {
- case COMMAND_ID_FORMAT_LINE:
- {
- executeDispatch_FormatLine();
- }
- break;
- case COMMAND_ID_FORMAT_AREA:
- {
- executeDispatch_FormatArea();
- }
- break;
- case COMMAND_ID_TEXT_ATTRIBUTES:
- {
- executeDispatch_TextAttributes();
- }
- break;
- case COMMAND_ID_TRANSFORM_DIALOG:
- {
- executeDispatch_TransformDialog();
- }
- break;
- case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
- {
- executeDispatch_ObjectTitleDescription();
- }
- break;
- case COMMAND_ID_RENAME_OBJECT:
- {
- executeDispatch_RenameObject();
- }
- break;
- case COMMAND_ID_BRING_TO_FRONT:
- case COMMAND_ID_FORWARD:
- case COMMAND_ID_BACKWARD:
- case COMMAND_ID_SEND_TO_BACK:
- {
- executeDispatch_ChangeZOrder( nFeatureId );
- }
- break;
- case COMMAND_ID_FONT_DIALOG:
- {
- executeDispatch_FontDialog();
- }
- break;
- case COMMAND_ID_PARAGRAPH_DIALOG:
- {
- executeDispatch_ParagraphDialog();
- }
- break;
- default:
- {
- }
- break;
- }
-}
-
-void ShapeController::describeSupportedFeatures()
-{
- implDescribeSupportedFeature( ".uno:FormatLine", COMMAND_ID_FORMAT_LINE, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:FormatArea", COMMAND_ID_FORMAT_AREA, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:TextAttributes", COMMAND_ID_TEXT_ATTRIBUTES, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:TransformDialog", COMMAND_ID_TRANSFORM_DIALOG, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:ObjectTitleDescription", COMMAND_ID_OBJECT_TITLE_DESCRIPTION, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:RenameObject", COMMAND_ID_RENAME_OBJECT, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:BringToFront", COMMAND_ID_BRING_TO_FRONT, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:Forward", COMMAND_ID_FORWARD, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:Backward", COMMAND_ID_BACKWARD, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:SendToBack", COMMAND_ID_SEND_TO_BACK, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:FontDialog", COMMAND_ID_FONT_DIALOG, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:ParagraphDialog", COMMAND_ID_PARAGRAPH_DIALOG, CommandGroup::EDIT );
-}
-
-IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxNameDialog*, pDialog )
-{
- String aName;
- if ( pDialog )
- {
- pDialog->GetName( aName );
- }
- if ( aName.Len() )
- {
- DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
- if ( pDrawViewWrapper && pDrawViewWrapper->getNamedSdrObject( aName ) )
- {
- return 0;
- }
- }
- return 1;
-}
-
-void ShapeController::executeDispatch_FormatLine()
-{
- if ( m_pChartController )
- {
- Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
- DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
- {
- SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
- SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
- BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
- if ( bHasMarked )
- {
- pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
- }
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
- pFact->CreateSvxLineTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
- RID_SVXDLG_LINE, pSelectedObj, bHasMarked ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- if ( bHasMarked )
- {
- pDrawViewWrapper->SetAttrToMarked( *pOutAttr, FALSE );
- }
- else
- {
- pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
- }
- }
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_FormatArea()
-{
- if ( m_pChartController )
- {
- Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
- DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
- {
- SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
- BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
- if ( bHasMarked )
- {
- pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
- }
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< AbstractSvxAreaTabDialog > pDlg(
- pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
- RID_SVXDLG_AREA, pDrawViewWrapper ) );
- if ( pDlg.get() )
- {
- SfxItemPool& rItemPool = pDrawViewWrapper->GetModel()->GetItemPool();
- SfxItemSet aSet( rItemPool, rItemPool.GetFirstWhich(), rItemPool.GetLastWhich() );
- const SvxColorTableItem* pColorItem = static_cast< const SvxColorTableItem* >( aSet.GetItem( SID_COLOR_TABLE ) );
- if ( pColorItem && pColorItem->GetColorTable() == XColorTable::GetStdColorTable() )
- {
- pDlg->DontDeleteColorTable();
- }
- if ( pDlg->Execute() == RET_OK )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- if ( bHasMarked )
- {
- pDrawViewWrapper->SetAttrToMarked( *pOutAttr, FALSE );
- }
- else
- {
- pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
- }
- }
- }
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_TextAttributes()
-{
- if ( m_pChartController )
- {
- Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pParent && pDrawViewWrapper )
- {
- SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
- BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
- if ( bHasMarked )
- {
- pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
- }
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
- pFact->CreateTextTabDialog( pParent, &aAttr, RID_SVXDLG_TEXT, pDrawViewWrapper ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- if ( bHasMarked )
- {
- pDrawViewWrapper->SetAttributes( *pOutAttr );
- }
- else
- {
- pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
- }
- }
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_TransformDialog()
-{
- if ( m_pChartController )
- {
- Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pParent && pDrawViewWrapper )
- {
- SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
- if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == OBJ_CAPTION )
- {
- // item set for caption
- SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
- pDrawViewWrapper->GetAttributes( aAttr );
- // item set for position and size
- SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
- pFact->CreateCaptionDialog( pParent, pDrawViewWrapper, RID_SVXDLG_CAPTION ) );
- if ( pDlg.get() )
- {
- const USHORT* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
- SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
- aCombAttr.Put( aAttr );
- aCombAttr.Put( aGeoAttr );
- pDlg->SetInputSet( &aCombAttr );
- if ( pDlg->Execute() == RET_OK )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- pDrawViewWrapper->SetAttributes( *pOutAttr );
- pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
- }
- }
- }
- }
- else
- {
- SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
- pFact->CreateSvxTransformTabDialog( pParent, &aGeoAttr, pDrawViewWrapper, RID_SVXDLG_TRANSFORM ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
- }
- }
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_ObjectTitleDescription()
-{
- if ( m_pChartController )
- {
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
- {
- SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
- if ( pSelectedObj )
- {
- String aTitle( pSelectedObj->GetTitle() );
- String aDescription( pSelectedObj->GetDescription() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< AbstractSvxObjectTitleDescDialog > pDlg(
- pFact->CreateSvxObjectTitleDescDialog( NULL, aTitle, aDescription, RID_SVXDLG_OBJECT_TITLE_DESC ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- pDlg->GetTitle( aTitle );
- pDlg->GetDescription( aDescription );
- pSelectedObj->SetTitle( aTitle );
- pSelectedObj->SetDescription( aDescription );
- }
- }
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_RenameObject()
-{
- if ( m_pChartController )
- {
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
- {
- SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
- if ( pSelectedObj )
- {
- String aName( pSelectedObj->GetName() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::boost::scoped_ptr< AbstractSvxObjectNameDialog > pDlg(
- pFact->CreateSvxObjectNameDialog( NULL, aName, RID_SVXDLG_OBJECT_NAME ) );
- pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- pDlg->GetName( aName );
- if ( aName != pSelectedObj->GetName() )
- {
- pSelectedObj->SetName( aName );
- }
- }
- }
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
-{
- DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
- if ( pDrawViewWrapper )
- {
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- switch ( nId )
- {
- case COMMAND_ID_BRING_TO_FRONT:
- {
- if ( isForwardPossible() )
- {
- pDrawViewWrapper->PutMarkedToTop();
- }
- }
- break;
- case COMMAND_ID_FORWARD:
- {
- if ( isForwardPossible() )
- {
- pDrawViewWrapper->MovMarkedToTop();
- }
- }
- break;
- case COMMAND_ID_BACKWARD:
- {
- if ( isBackwardPossible() )
- {
- pDrawViewWrapper->MovMarkedToBtm();
- }
- }
- break;
- case COMMAND_ID_SEND_TO_BACK:
- {
- if ( isBackwardPossible() )
- {
- SdrObject* pFirstObj = getFirstAdditionalShape();
- pDrawViewWrapper->PutMarkedBehindObj( pFirstObj );
- }
- }
- break;
- default:
- {
- }
- break;
- }
- }
-}
-
-void ShapeController::executeDispatch_FontDialog()
-{
- if ( m_pChartController )
- {
- Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
- DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
- {
- SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
- pDrawViewWrapper->GetAttributes( aAttr );
- ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- ::boost::scoped_ptr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- pDrawViewWrapper->SetAttributes( *pOutAttr );
- }
- }
- }
-}
-
-void ShapeController::executeDispatch_ParagraphDialog()
-{
- if ( m_pChartController )
- {
- Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pParent && pDrawViewWrapper )
- {
- SfxItemPool& rPool = pDrawViewWrapper->GetModel()->GetItemPool();
- SfxItemSet aAttr( rPool );
- pDrawViewWrapper->GetAttributes( aAttr );
-
+
+#include <boost/scoped_ptr.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::frame;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeController::ShapeController( const Reference< uno::XComponentContext >& rxContext,
+ ChartController* pController )
+ :FeatureCommandDispatchBase( rxContext )
+ ,m_pChartController( pController )
+{
+}
+
+ShapeController::~ShapeController()
+{
+}
+
+void ShapeController::initialize()
+{
+ FeatureCommandDispatchBase::initialize();
+}
+
+// WeakComponentImplHelperBase
+void ShapeController::disposing()
+{
+}
+
+// XEventListener
+void ShapeController::disposing( const lang::EventObject& /* Source */ )
+ throw (uno::RuntimeException)
+{
+}
+
+FeatureState ShapeController::getState( const ::rtl::OUString& rCommand )
+{
+ FeatureState aReturn;
+ aReturn.bEnabled = false;
+ aReturn.aState <<= false;
+
+ bool bWritable = false;
+ if ( m_pChartController )
+ {
+ Reference< frame::XStorable > xStorable( m_pChartController->getModel(), uno::UNO_QUERY );
+ if ( xStorable.is() )
+ {
+ bWritable = !xStorable->isReadonly();
+ }
+ }
+
+ sal_uInt16 nFeatureId = m_aSupportedFeatures[ rCommand ].nFeatureId;
+
+ switch ( nFeatureId )
+ {
+ case COMMAND_ID_FORMAT_LINE:
+ case COMMAND_ID_FORMAT_AREA:
+ case COMMAND_ID_TEXT_ATTRIBUTES:
+ case COMMAND_ID_TRANSFORM_DIALOG:
+ case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
+ case COMMAND_ID_RENAME_OBJECT:
+ {
+ aReturn.bEnabled = bWritable;
+ aReturn.aState <<= false;
+ }
+ break;
+ case COMMAND_ID_BRING_TO_FRONT:
+ case COMMAND_ID_FORWARD:
+ {
+ aReturn.bEnabled = ( bWritable && isForwardPossible() );
+ aReturn.aState <<= false;
+ }
+ break;
+ case COMMAND_ID_BACKWARD:
+ case COMMAND_ID_SEND_TO_BACK:
+ {
+
+ aReturn.bEnabled = ( bWritable && isBackwardPossible() );
+ aReturn.aState <<= false;
+ }
+ break;
+ case COMMAND_ID_FONT_DIALOG:
+ case COMMAND_ID_PARAGRAPH_DIALOG:
+ {
+ aReturn.bEnabled = bWritable;
+ aReturn.aState <<= false;
+ }
+ break;
+ default:
+ {
+ aReturn.bEnabled = false;
+ aReturn.aState <<= false;
+ }
+ break;
+ }
+
+ return aReturn;
+}
+
+void ShapeController::execute( const ::rtl::OUString& rCommand, const Sequence< beans::PropertyValue>& rArgs )
+{
+ (void)rArgs;
+
+ sal_uInt16 nFeatureId = m_aSupportedFeatures[ rCommand ].nFeatureId;
+
+ switch ( nFeatureId )
+ {
+ case COMMAND_ID_FORMAT_LINE:
+ {
+ executeDispatch_FormatLine();
+ }
+ break;
+ case COMMAND_ID_FORMAT_AREA:
+ {
+ executeDispatch_FormatArea();
+ }
+ break;
+ case COMMAND_ID_TEXT_ATTRIBUTES:
+ {
+ executeDispatch_TextAttributes();
+ }
+ break;
+ case COMMAND_ID_TRANSFORM_DIALOG:
+ {
+ executeDispatch_TransformDialog();
+ }
+ break;
+ case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
+ {
+ executeDispatch_ObjectTitleDescription();
+ }
+ break;
+ case COMMAND_ID_RENAME_OBJECT:
+ {
+ executeDispatch_RenameObject();
+ }
+ break;
+ case COMMAND_ID_BRING_TO_FRONT:
+ case COMMAND_ID_FORWARD:
+ case COMMAND_ID_BACKWARD:
+ case COMMAND_ID_SEND_TO_BACK:
+ {
+ executeDispatch_ChangeZOrder( nFeatureId );
+ }
+ break;
+ case COMMAND_ID_FONT_DIALOG:
+ {
+ executeDispatch_FontDialog();
+ }
+ break;
+ case COMMAND_ID_PARAGRAPH_DIALOG:
+ {
+ executeDispatch_ParagraphDialog();
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+}
+
+void ShapeController::describeSupportedFeatures()
+{
+ implDescribeSupportedFeature( ".uno:FormatLine", COMMAND_ID_FORMAT_LINE, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:FormatArea", COMMAND_ID_FORMAT_AREA, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:TextAttributes", COMMAND_ID_TEXT_ATTRIBUTES, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:TransformDialog", COMMAND_ID_TRANSFORM_DIALOG, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:ObjectTitleDescription", COMMAND_ID_OBJECT_TITLE_DESCRIPTION, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:RenameObject", COMMAND_ID_RENAME_OBJECT, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:BringToFront", COMMAND_ID_BRING_TO_FRONT, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:Forward", COMMAND_ID_FORWARD, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:Backward", COMMAND_ID_BACKWARD, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:SendToBack", COMMAND_ID_SEND_TO_BACK, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:FontDialog", COMMAND_ID_FONT_DIALOG, CommandGroup::EDIT );
+ implDescribeSupportedFeature( ".uno:ParagraphDialog", COMMAND_ID_PARAGRAPH_DIALOG, CommandGroup::EDIT );
+}
+
+IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxNameDialog*, pDialog )
+{
+ String aName;
+ if ( pDialog )
+ {
+ pDialog->GetName( aName );
+ }
+ if ( aName.Len() )
+ {
+ DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
+ if ( pDrawViewWrapper && pDrawViewWrapper->getNamedSdrObject( aName ) )
+ {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+void ShapeController::executeDispatch_FormatLine()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
+ BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
+ }
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateSvxLineTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
+ RID_SVXDLG_LINE, pSelectedObj, bHasMarked ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttrToMarked( *pOutAttr, FALSE );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_FormatArea()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
+ {
+ SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
+ BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
+ }
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< AbstractSvxAreaTabDialog > pDlg(
+ pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
+ RID_SVXDLG_AREA, pDrawViewWrapper ) );
+ if ( pDlg.get() )
+ {
+ SfxItemPool& rItemPool = pDrawViewWrapper->GetModel()->GetItemPool();
+ SfxItemSet aSet( rItemPool, rItemPool.GetFirstWhich(), rItemPool.GetLastWhich() );
+ const SvxColorTableItem* pColorItem = static_cast< const SvxColorTableItem* >( aSet.GetItem( SID_COLOR_TABLE ) );
+ if ( pColorItem && pColorItem->GetColorTable() == XColorTable::GetStdColorTable() )
+ {
+ pDlg->DontDeleteColorTable();
+ }
+ if ( pDlg->Execute() == RET_OK )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttrToMarked( *pOutAttr, FALSE );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_TextAttributes()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawViewWrapper )
+ {
+ SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
+ BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
+ }
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateTextTabDialog( pParent, &aAttr, RID_SVXDLG_TEXT, pDrawViewWrapper ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_TransformDialog()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == OBJ_CAPTION )
+ {
+ // item set for caption
+ SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
+ pDrawViewWrapper->GetAttributes( aAttr );
+ // item set for position and size
+ SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateCaptionDialog( pParent, pDrawViewWrapper, RID_SVXDLG_CAPTION ) );
+ if ( pDlg.get() )
+ {
+ const USHORT* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
+ SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
+ aCombAttr.Put( aAttr );
+ aCombAttr.Put( aGeoAttr );
+ pDlg->SetInputSet( &aCombAttr );
+ if ( pDlg->Execute() == RET_OK )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
+ }
+ }
+ }
+ }
+ else
+ {
+ SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateSvxTransformTabDialog( pParent, &aGeoAttr, pDrawViewWrapper, RID_SVXDLG_TRANSFORM ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_ObjectTitleDescription()
+{
+ if ( m_pChartController )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ if ( pSelectedObj )
+ {
+ String aTitle( pSelectedObj->GetTitle() );
+ String aDescription( pSelectedObj->GetDescription() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< AbstractSvxObjectTitleDescDialog > pDlg(
+ pFact->CreateSvxObjectTitleDescDialog( NULL, aTitle, aDescription, RID_SVXDLG_OBJECT_TITLE_DESC ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ pDlg->GetTitle( aTitle );
+ pDlg->GetDescription( aDescription );
+ pSelectedObj->SetTitle( aTitle );
+ pSelectedObj->SetDescription( aDescription );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_RenameObject()
+{
+ if ( m_pChartController )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ if ( pSelectedObj )
+ {
+ String aName( pSelectedObj->GetName() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< AbstractSvxObjectNameDialog > pDlg(
+ pFact->CreateSvxObjectNameDialog( NULL, aName, RID_SVXDLG_OBJECT_NAME ) );
+ pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ pDlg->GetName( aName );
+ if ( aName != pSelectedObj->GetName() )
+ {
+ pSelectedObj->SetName( aName );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
+{
+ DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
+ if ( pDrawViewWrapper )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ switch ( nId )
+ {
+ case COMMAND_ID_BRING_TO_FRONT:
+ {
+ if ( isForwardPossible() )
+ {
+ pDrawViewWrapper->PutMarkedToTop();
+ }
+ }
+ break;
+ case COMMAND_ID_FORWARD:
+ {
+ if ( isForwardPossible() )
+ {
+ pDrawViewWrapper->MovMarkedToTop();
+ }
+ }
+ break;
+ case COMMAND_ID_BACKWARD:
+ {
+ if ( isBackwardPossible() )
+ {
+ pDrawViewWrapper->MovMarkedToBtm();
+ }
+ }
+ break;
+ case COMMAND_ID_SEND_TO_BACK:
+ {
+ if ( isBackwardPossible() )
+ {
+ SdrObject* pFirstObj = getFirstAdditionalShape();
+ pDrawViewWrapper->PutMarkedBehindObj( pFirstObj );
+ }
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+ }
+}
+
+void ShapeController::executeDispatch_FontDialog()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
+ {
+ SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
+ pDrawViewWrapper->GetAttributes( aAttr );
+ ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ ::boost::scoped_ptr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_ParagraphDialog()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawViewWrapper )
+ {
+ SfxItemPool& rPool = pDrawViewWrapper->GetModel()->GetItemPool();
+ SfxItemSet aAttr( rPool );
+ pDrawViewWrapper->GetAttributes( aAttr );
+
SfxItemSet aNewAttr( rPool,
EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
@@ -603,134 +603,134 @@ void ShapeController::executeDispatch_ParagraphDialog()
aNewAttr.Put( SvxFmtSplitItem( sal_True, SID_ATTR_PARA_SPLIT) );
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
-
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- ::boost::scoped_ptr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
- if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- pDrawViewWrapper->SetAttributes( *pOutAttr );
- }
- }
- }
-}
-
-SdrObject* ShapeController::getFirstAdditionalShape()
-{
- SdrObject* pFirstObj = NULL;
-
- try
- {
- DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
- if ( pDrawModelWrapper )
- {
- Reference< drawing::XShape > xFirstShape;
- Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
- Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
- Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
- sal_Int32 nCount = xDrawPageShapes->getCount();
- for ( sal_Int32 i = 0; i < nCount; ++i )
- {
- Reference< drawing::XShape > xShape;
- if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
- {
- if ( xShape.is() && xShape != xChartRoot )
- {
- xFirstShape = xShape;
- break;
- }
- }
- }
- if ( xFirstShape.is() )
- {
- pFirstObj = DrawViewWrapper::getSdrObject( xFirstShape );
- }
- }
- }
- catch ( uno::Exception& ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-
- return pFirstObj;
-}
-
-SdrObject* ShapeController::getLastAdditionalShape()
-{
- SdrObject* pLastObj = NULL;
-
- try
- {
- DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
- if ( pDrawModelWrapper )
- {
- Reference< drawing::XShape > xLastShape;
- Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
- Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
- Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
- sal_Int32 nCount = xDrawPageShapes->getCount();
- for ( sal_Int32 i = nCount - 1; i >= 0; --i )
- {
- Reference< drawing::XShape > xShape;
- if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
- {
- if ( xShape.is() && xShape != xChartRoot )
- {
- xLastShape = xShape;
- break;
- }
- }
- }
- if ( xLastShape.is() )
- {
- pLastObj = DrawViewWrapper::getSdrObject( xLastShape );
- }
- }
- }
- catch ( uno::Exception& ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-
- return pLastObj;
-}
-
-bool ShapeController::isBackwardPossible()
-{
- if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
- {
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pDrawViewWrapper )
- {
- SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
- SdrObject* pFirstObj = getFirstAdditionalShape();
- if ( pSelectedObj && pFirstObj && pSelectedObj != pFirstObj )
- {
- return true;
- }
- }
- }
- return false;
-}
-
-bool ShapeController::isForwardPossible()
-{
- if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
- {
- DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
- if ( pDrawViewWrapper )
- {
- SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
- SdrObject* pLastObj = getLastAdditionalShape();
- if ( pSelectedObj && pLastObj && pSelectedObj != pLastObj )
- {
- return true;
- }
- }
- }
- return false;
-}
-
-//.............................................................................
-} // namespace chart
-//.............................................................................
+
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ ::boost::scoped_ptr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ }
+ }
+}
+
+SdrObject* ShapeController::getFirstAdditionalShape()
+{
+ SdrObject* pFirstObj = NULL;
+
+ try
+ {
+ DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
+ if ( pDrawModelWrapper )
+ {
+ Reference< drawing::XShape > xFirstShape;
+ Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
+ Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
+ Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
+ sal_Int32 nCount = xDrawPageShapes->getCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ Reference< drawing::XShape > xShape;
+ if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
+ {
+ if ( xShape.is() && xShape != xChartRoot )
+ {
+ xFirstShape = xShape;
+ break;
+ }
+ }
+ }
+ if ( xFirstShape.is() )
+ {
+ pFirstObj = DrawViewWrapper::getSdrObject( xFirstShape );
+ }
+ }
+ }
+ catch ( uno::Exception& ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+
+ return pFirstObj;
+}
+
+SdrObject* ShapeController::getLastAdditionalShape()
+{
+ SdrObject* pLastObj = NULL;
+
+ try
+ {
+ DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
+ if ( pDrawModelWrapper )
+ {
+ Reference< drawing::XShape > xLastShape;
+ Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
+ Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
+ Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
+ sal_Int32 nCount = xDrawPageShapes->getCount();
+ for ( sal_Int32 i = nCount - 1; i >= 0; --i )
+ {
+ Reference< drawing::XShape > xShape;
+ if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
+ {
+ if ( xShape.is() && xShape != xChartRoot )
+ {
+ xLastShape = xShape;
+ break;
+ }
+ }
+ }
+ if ( xLastShape.is() )
+ {
+ pLastObj = DrawViewWrapper::getSdrObject( xLastShape );
+ }
+ }
+ }
+ catch ( uno::Exception& ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+
+ return pLastObj;
+}
+
+bool ShapeController::isBackwardPossible()
+{
+ if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ SdrObject* pFirstObj = getFirstAdditionalShape();
+ if ( pSelectedObj && pFirstObj && pSelectedObj != pFirstObj )
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool ShapeController::isForwardPossible()
+{
+ if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ SdrObject* pLastObj = getLastAdditionalShape();
+ if ( pSelectedObj && pLastObj && pSelectedObj != pLastObj )
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/main/ShapeController.hxx b/chart2/source/controller/main/ShapeController.hxx
index 4da2ff8b3b1a..f74da29e54f3 100644
--- a/chart2/source/controller/main/ShapeController.hxx
+++ b/chart2/source/controller/main/ShapeController.hxx
@@ -1,103 +1,103 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ShapeController.hxx,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART2_SHAPECONTROLLER_HXX
-#define CHART2_SHAPECONTROLLER_HXX
-
-#include "FeatureCommandDispatchBase.hxx"
-#include <tools/link.hxx>
-
-class AbstractSvxNameDialog;
-class SdrObject;
-
-//.............................................................................
-namespace chart
-{
-//.............................................................................
-
-class ChartController;
-
-/** This is a CommandDispatch implementation for shapes.
- */
-class ShapeController: public FeatureCommandDispatchBase
-{
- friend class ControllerCommandDispatch;
-
-public:
- ShapeController( const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
- virtual ~ShapeController();
-
- // late initialisation, especially for adding as listener
- virtual void initialize();
-
-protected:
- // WeakComponentImplHelperBase
- virtual void SAL_CALL disposing();
-
- // XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
- throw (::com::sun::star::uno::RuntimeException);
-
- // state of a feature
- virtual FeatureState getState( const ::rtl::OUString& rCommand );
-
- // execute a feature
- virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs );
-
- // all the features which should be handled by this class
- virtual void describeSupportedFeatures();
-
-private:
- DECL_LINK( CheckNameHdl, AbstractSvxNameDialog* );
-
- void executeDispatch_FormatLine();
- void executeDispatch_FormatArea();
- void executeDispatch_TextAttributes();
- void executeDispatch_TransformDialog();
- void executeDispatch_ObjectTitleDescription();
- void executeDispatch_RenameObject();
- void executeDispatch_ChangeZOrder( sal_uInt16 nId );
- void executeDispatch_FontDialog();
- void executeDispatch_ParagraphDialog();
-
- SdrObject* getFirstAdditionalShape();
- SdrObject* getLastAdditionalShape();
- bool isBackwardPossible();
- bool isForwardPossible();
-
- ChartController* m_pChartController;
-};
-
-//.............................................................................
-} // namespace chart
-//.............................................................................
-
-// CHART2_SHAPECONTROLLER_HXX
-#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ShapeController.hxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_SHAPECONTROLLER_HXX
+#define CHART2_SHAPECONTROLLER_HXX
+
+#include "FeatureCommandDispatchBase.hxx"
+#include <tools/link.hxx>
+
+class AbstractSvxNameDialog;
+class SdrObject;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ChartController;
+
+/** This is a CommandDispatch implementation for shapes.
+ */
+class ShapeController: public FeatureCommandDispatchBase
+{
+ friend class ControllerCommandDispatch;
+
+public:
+ ShapeController( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
+ virtual ~ShapeController();
+
+ // late initialisation, especially for adding as listener
+ virtual void initialize();
+
+protected:
+ // WeakComponentImplHelperBase
+ virtual void SAL_CALL disposing();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // state of a feature
+ virtual FeatureState getState( const ::rtl::OUString& rCommand );
+
+ // execute a feature
+ virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs );
+
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+
+private:
+ DECL_LINK( CheckNameHdl, AbstractSvxNameDialog* );
+
+ void executeDispatch_FormatLine();
+ void executeDispatch_FormatArea();
+ void executeDispatch_TextAttributes();
+ void executeDispatch_TransformDialog();
+ void executeDispatch_ObjectTitleDescription();
+ void executeDispatch_RenameObject();
+ void executeDispatch_ChangeZOrder( sal_uInt16 nId );
+ void executeDispatch_FontDialog();
+ void executeDispatch_ParagraphDialog();
+
+ SdrObject* getFirstAdditionalShape();
+ SdrObject* getLastAdditionalShape();
+ bool isBackwardPossible();
+ bool isForwardPossible();
+
+ ChartController* m_pChartController;
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_SHAPECONTROLLER_HXX
+#endif
diff --git a/chart2/source/controller/menus/ShapeEditContextMenu.src b/chart2/source/controller/menus/ShapeEditContextMenu.src
index c98886b855d0..c23e977bfa09 100644
--- a/chart2/source/controller/menus/ShapeEditContextMenu.src
+++ b/chart2/source/controller/menus/ShapeEditContextMenu.src
@@ -1,69 +1,69 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ShapeContextMenu.src,v $
- * $Revision: 1.0 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "MenuResIds.hrc"
-#include "ShapeController.hrc"
-
-#include <svx/svxids.hrc>
-
-Menu RID_CONTEXTMENU_SHAPEEDIT
-{
- ItemList =
- {
- MenuItem
- {
- Identifier = COMMAND_ID_FONT_DIALOG;
- Command = ".uno:FontDialog";
- };
- MenuItem
- {
- Identifier = COMMAND_ID_PARAGRAPH_DIALOG;
- Command = ".uno:ParagraphDialog";
- };
- MenuItem
- {
- Separator = TRUE;
- };
- MenuItem
- {
- Identifier = COMMAND_ID_CUT;
- Command = ".uno:Cut";
- };
- MenuItem
- {
- Identifier = COMMAND_ID_COPY;
- Command = ".uno:Copy";
- };
- MenuItem
- {
- Identifier = COMMAND_ID_PASTE;
- Command = ".uno:Paste";
- };
- };
-};
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ShapeContextMenu.src,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "MenuResIds.hrc"
+#include "ShapeController.hrc"
+
+#include <svx/svxids.hrc>
+
+Menu RID_CONTEXTMENU_SHAPEEDIT
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = COMMAND_ID_FONT_DIALOG;
+ Command = ".uno:FontDialog";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_PARAGRAPH_DIALOG;
+ Command = ".uno:ParagraphDialog";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_CUT;
+ Command = ".uno:Cut";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_COPY;
+ Command = ".uno:Copy";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_PASTE;
+ Command = ".uno:Paste";
+ };
+ };
+};