[ooo-build-commit] Branch 'ooo/master' - officecfg/registry svx/inc svx/sdi svx/source xmloff/source

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Aug 5 18:05:15 PDT 2009


 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |   14 
 svx/inc/svx/dialogs.hrc                                                  |    4 
 svx/inc/svx/svxdlg.hxx                                                   |    9 
 svx/inc/svx/svxids.hrc                                                   |    6 
 svx/inc/xmlgrhlp.hxx                                                     |    2 
 svx/sdi/svx.sdi                                                          |   51 +
 svx/source/cui/dlgfact.cxx                                               |    6 
 svx/source/cui/dlgfact.hxx                                               |    2 
 svx/source/cui/insrc.cxx                                                 |   88 +
 svx/source/cui/insrc.hrc                                                 |   43 
 svx/source/cui/insrc.hxx                                                 |   72 +
 svx/source/cui/insrc.src                                                 |  118 ++
 svx/source/cui/makefile.mk                                               |    6 
 svx/source/customshapes/EnhancedCustomShape2d.cxx                        |   25 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx                  |  478 ++++++++--
 svx/source/msfilter/msdffimp.cxx                                         |   12 
 svx/source/table/tablecontroller.cxx                                     |   46 
 svx/source/table/tablecontroller.hxx                                     |    3 
 svx/source/table/tablelayouter.cxx                                       |    2 
 svx/source/unodraw/gluepts.cxx                                           |   94 -
 svx/source/unodraw/unomod.cxx                                            |   11 
 svx/source/xml/xmlgrhlp.cxx                                              |   99 +-
 xmloff/source/draw/shapeexport2.cxx                                      |   25 
 xmloff/source/draw/shapeexport4.cxx                                      |   26 
 xmloff/source/draw/ximpshap.cxx                                          |   19 
 25 files changed, 1035 insertions(+), 226 deletions(-)

New commits:
commit b2b908637e7bb5feb99e4b651e77485273273cc3
Author: Release Engineers <releng at openoffice.org>
Date:   Wed Aug 5 17:01:07 2009 +0000

    CWS-TOOLING: integrate CWS impress172
    2009-07-30 15:29:39 +0200 cl  r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
    2009-07-29 11:40:35 +0200 wg  r274445 : i103869
    2009-07-22 14:39:13 +0200 sj  r274241 : #i102713# fixed cloud shape
    2009-07-07 15:28:04 +0200 sj  r273800 : fixed build problem
    2009-07-07 13:27:13 +0200 cl  r273792 : #i102921# moved insert col/rows dialog to svx
    2009-07-07 10:36:05 +0200 cl  r273782 : fixed compiler warnings
    2009-07-02 10:40:21 +0200 sj  r273626 : fixed build problem
    2009-07-02 10:27:56 +0200 cl  r273624 : fixed merge problem
    2009-07-02 10:27:19 +0200 cl  r273623 : fixed compiler warning
    2009-07-01 10:04:58 +0200 cl  r273550 : CWS-TOOLING: rebase CWS impress172 to trunk at 273468 (milestone: DEV300:m51)
    2009-06-30 16:22:02 +0200 cl  r273518 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 16:20:46 +0200 cl  r273517 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 16:20:28 +0200 cl  r273516 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 16:19:49 +0200 cl  r273515 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 16:19:28 +0200 cl  r273514 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 16:17:38 +0200 cl  r273513 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 15:45:44 +0200 cl  r273511 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 15:37:16 +0200 cl  r273510 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 15:33:47 +0200 cl  r273509 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 15:32:10 +0200 cl  r273508 : #i102921# added insert table row/col dialog for impress tables
    2009-06-30 15:30:05 +0200 cl  r273507 : #i102921# added insert table row/col dialog for impress tables
    2009-06-29 12:32:42 +0200 sj  r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
    2009-06-24 15:17:59 +0200 sj  r273349 : #158636# fixed text range hyperlink to first/last slide
    2009-06-22 13:18:30 +0200 sj  r273224 : #158651# fixed header footer import
    2009-06-19 15:18:24 +0200 sj  r273160 : #158614# default text of presentation objects now cleared
    2009-06-16 15:54:19 +0200 sj  r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
    2009-06-15 16:26:26 +0200 sj  r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
    2009-06-15 16:25:26 +0200 sj  r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
    2009-06-12 13:17:32 +0200 sj  r272915 : #i102713# fixed cloud shape
    2009-06-10 18:36:58 +0200 sj  r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
    2009-06-08 19:52:28 +0200 sj  r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
    2009-06-04 15:28:32 +0200 cl  r272640 : #i102358# applied patch to remove warnings
    2009-06-04 14:39:45 +0200 cl  r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
    2009-06-03 18:21:26 +0200 sj  r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
    2009-06-03 15:47:27 +0200 cl  r272583 : #i101817# added color collection based on scribus
    2009-06-03 14:43:59 +0200 cl  r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
    2009-06-03 12:39:29 +0200 cl  r272556 : #i93308# correct namespace for com.sun.star.text.textfields
    2009-06-03 12:27:00 +0200 cl  r272555 : #i93308# correct namespace for com.sun.star.text.textfields
    2009-06-03 11:33:44 +0200 cl  r272553 : #i23221# allow all settings (that make sense) for presentation styles
    2009-06-03 11:30:59 +0200 cl  r272552 : #i23221# allow all settings (that make sense) for presentation styles
    2009-06-03 11:30:22 +0200 cl  r272551 : #i23221# allow all settings (that make sense) for presentation styles
    2009-06-02 18:41:07 +0200 sj  r272527 : #i28358# applied patch (better conversion of dotted lines)
    2009-06-02 11:52:13 +0200 cl  r272491 : #i98668# applied patch to fix possible endless loop if exception occours
    2009-05-28 17:02:55 +0200 sj  r272416 : #i102336# retaining graphic file names unchanged
    2009-05-28 17:00:25 +0200 sj  r272415 : #i102336# retaining graphic file names unchanged
    2009-05-28 17:00:10 +0200 sj  r272414 : #i102336# retaining graphic file names unchanged
    2009-05-25 12:43:58 +0200 sj  r272232 : #i102069# added patch from thb (fixed rotated group objects)

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 46abbb8..104fb10 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1925,7 +1925,12 @@
                     <value>1</value>
                 </prop>
             </node>
-            <node oor:name=".uno:InsertColumns" oor:op="replace">
+      <node oor:name=".uno:InsertRowDialog" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Rows...</value>
+        </prop>
+      </node>
+      <node oor:name=".uno:InsertColumns" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="de">Spalte einfügen</value>
                     <value xml:lang="en-US">Insert Column</value>
@@ -1934,7 +1939,12 @@
                     <value>1</value>
                 </prop>
             </node>
-            <node oor:name=".uno:DeleteRows" oor:op="replace">
+      <node oor:name=".uno:InsertColumnDialog" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Columns...</value>
+        </prop>
+      </node>
+      <node oor:name=".uno:DeleteRows" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="de">Zeile löschen</value>
                     <value xml:lang="en-US">Delete Row</value>
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index aa8c667..de1fd8e 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -251,8 +251,10 @@
 // ResId fuer FontSubstitution
 #define RID_SVX_FONT_SUBSTITUTION			(RID_SVX_START + 18)
 
+// insert row&col dialog
+#define DLG_INS_ROW_COL						(RID_SVX_START + 156)
+
 //InetDlg
-//#define RID_SVXDLG_INTERNET					(RID_SVX_START + 156)
 #define RID_SVXPAGE_INET_MAIL               (RID_SVX_START + 155)
 #define RID_SVXPAGE_INET_PROXY              (RID_SVX_START + 157)
 #define RID_SVXPAGE_INET_CACHE              (RID_SVX_START + 158)
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index 0db2d86..613d575 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.hxx
@@ -347,6 +347,13 @@ public:
     virtual sal_Int32 getColumns() const = 0;
 };
 
+class SvxAbstractInsRowColDlg : public VclAbstractDialog
+{
+public:
+    virtual bool isInsertBefore() const = 0;
+    virtual sal_uInt16 getInsertCount() const = 0;
+};
+
 //-------------------------------------------------------------
 
 class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory
@@ -543,6 +550,8 @@ public:
     virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0;
 
     virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0;
+    
+    virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ) = 0;
 };
 
 #endif
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index 4bfad86..36ca4a4 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -831,7 +831,11 @@
 #define SID_OFASLOTS_START                              ( SID_SVX_START + 425 )
 //#define SID_SD_AUTOPILOT                                ( SID_SVX_START + 425 )   -> sfxsids.hrc
 #define SID_AUTOPILOT                                       SID_SD_AUTOPILOT
-// 4 defines of Writer's old wizards have been removed here
+
+#define SID_TABLE_INSERT_COL_DLG						( SID_SVX_START + 426 )
+#define SID_TABLE_INSERT_ROW_DLG						( SID_SVX_START + 427 )
+#define SID_TABLE_PARAM_INSERT_AFTER					( SID_SVX_START + 428 )
+
 #define SID_TABLEDESIGN									( SID_SVX_START + 429 )
 #define SID_MN_AUTOPILOT                                ( SID_SVX_START + 430 )
 #define SID_GENERAL_OPTIONS                             ( SID_SVX_START + 432 )
diff --git a/svx/inc/xmlgrhlp.hxx b/svx/inc/xmlgrhlp.hxx
index 96a381b..3952859 100644
--- a/svx/inc/xmlgrhlp.hxx
+++ b/svx/inc/xmlgrhlp.hxx
@@ -95,7 +95,7 @@ private:
     SVX_DLLPRIVATE sal_Bool					ImplWriteGraphic( const ::rtl::OUString& rPictureStorageName,
                                                   const ::rtl::OUString& rPictureStreamName,
                                                   const ::rtl::OUString& rGraphicId );
-    SVX_DLLPRIVATE void						ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos );
+    SVX_DLLPRIVATE void						ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName );
 
 protected:
                                 SvXMLGraphicHelper();
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index a69aae4..3c81922 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -14911,3 +14911,54 @@ SfxVoidItem RecheckDocument SID_RECHECK_DOCUMENT
     GroupId = GID_DOCUMENT;
 ]
 
+//--------------------------------------------------------------------------
+
+SfxVoidItem InsertColumnDialog SID_TABLE_INSERT_COL_DLG
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = TRUE,
+    HasCoreId = FALSE,
+    HasDialog = TRUE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Asynchron;
+
+    /* config: */
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = TRUE,
+    HasCoreId = FALSE,
+    HasDialog = TRUE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Asynchron;
+
+    /* config: */
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_TABLE;
+]
diff --git a/svx/source/cui/dlgfact.cxx b/svx/source/cui/dlgfact.cxx
index a894f52..28f879e 100644
--- a/svx/source/cui/dlgfact.cxx
+++ b/svx/source/cui/dlgfact.cxx
@@ -112,6 +112,7 @@
 #include "newtabledlg.hxx"
 #include "macroass.hxx"
 #include "acccfg.hxx"
+#include "insrc.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -2385,3 +2386,8 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
 {
     return new VclAbstractDialog_Impl( new OfaTreeOptionsDialog( pParent, rExtensionId ) );
 }
+
+SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId )
+{
+    return new SvxInsRowColDlg( pParent, bCol, nHelpId );
+}
diff --git a/svx/source/cui/dlgfact.hxx b/svx/source/cui/dlgfact.hxx
index ce47d30..a6bd99c 100644
--- a/svx/source/cui/dlgfact.hxx
+++ b/svx/source/cui/dlgfact.hxx
@@ -810,6 +810,8 @@ public:
 
     virtual VclAbstractDialog*          CreateOptionsDialog(
         Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& rApplicationContext );
+
+    virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId );
 };
 
 #endif
diff --git a/svx/source/cui/insrc.cxx b/svx/source/cui/insrc.cxx
new file mode 100644
index 0000000..e0a7bdc
--- /dev/null
+++ b/svx/source/cui/insrc.cxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * 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: insrc.cxx,v $
+ * $Revision: 1.10 $
+ *
+ * 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_svx.hxx"
+#ifdef SVX_DLLIMPLEMENTATION
+#undef SVX_DLLIMPLEMENTATION
+#endif
+
+#include <svx/dialmgr.hxx>
+#include <svx/svxdlg.hxx>
+#include <svx/dialogs.hrc>
+#include "insrc.hxx"
+#include "insrc.hrc"
+
+bool SvxInsRowColDlg::isInsertBefore() const
+{
+    return !aAfterBtn.IsChecked();
+}
+
+sal_uInt16 SvxInsRowColDlg::getInsertCount() const
+{
+    return static_cast< sal_uInt16 >( aCountEdit.GetValue() );
+}
+
+SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, ULONG nHelpId )
+    : ModalDialog( pParent, SVX_RES(DLG_INS_ROW_COL) ),
+    aCount( this, SVX_RES( FT_COUNT ) ),
+    aCountEdit( this, SVX_RES( ED_COUNT ) ),
+    aInsFL( this, SVX_RES( FL_INS ) ),
+    aBeforeBtn( this, SVX_RES( CB_POS_BEFORE ) ),
+    aAfterBtn( this, SVX_RES( CB_POS_AFTER ) ),
+    aPosFL( this, SVX_RES( FL_POS ) ),
+    aRow(SVX_RES(STR_ROW)),
+    aCol(SVX_RES(STR_COL)),
+    aOKBtn( this, SVX_RES( BT_OK ) ),
+    aCancelBtn( this, SVX_RES( BT_CANCEL ) ),
+    aHelpBtn( this, SVX_RES( BT_HELP ) ),
+    bColumn( bCol )
+{
+    FreeResource();
+    String aTmp( GetText() );
+    if( bColumn )
+    {
+        aTmp += aCol;
+    }
+    else
+    {
+        aTmp += aRow;
+    }
+    SetText( aTmp );
+    SetHelpId( nHelpId );
+}
+
+short SvxInsRowColDlg::Execute(void)
+{
+    return ModalDialog::Execute();
+}
+
+
+
diff --git a/svx/source/cui/insrc.hrc b/svx/source/cui/insrc.hrc
new file mode 100644
index 0000000..133bcf7
--- /dev/null
+++ b/svx/source/cui/insrc.hrc
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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: insrc.hrc,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+#define FT_COUNT	1
+#define ED_COUNT	2
+#define FL_INS          3
+
+#define CB_POS_BEFORE	10
+#define CB_POS_AFTER	11
+#define FL_POS                  12
+
+#define STR_ROW			20
+#define STR_COL			21
+
+#define BT_OK 		100
+#define BT_CANCEL 	101
+#define BT_HELP 	102
diff --git a/svx/source/cui/insrc.hxx b/svx/source/cui/insrc.hxx
new file mode 100644
index 0000000..ea6dd85
--- /dev/null
+++ b/svx/source/cui/insrc.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * 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: insrc.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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 _SVX_INSRC_HXX
+#define _SVX_INSRC_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/button.hxx>
+#include <vcl/group.hxx>
+#include <vcl/button.hxx>
+
+#include <tools/string.hxx>
+
+class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
+{
+    FixedText 		aCount;
+    NumericField 	aCountEdit;
+    FixedLine        aInsFL;
+
+    RadioButton 	aBeforeBtn;
+    RadioButton 	aAfterBtn;
+    FixedLine        aPosFL;
+
+    String 			aRow;
+    String 			aCol;
+
+    OKButton 		aOKBtn;
+    CancelButton 	aCancelBtn;
+    HelpButton 		aHelpBtn;
+
+    bool            bColumn;
+
+public:
+    SvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId );
+
+    virtual short Execute(void);
+
+    virtual bool isInsertBefore() const;
+    virtual sal_uInt16 getInsertCount() const;
+};
+
+#endif
+
diff --git a/svx/source/cui/insrc.src b/svx/source/cui/insrc.src
new file mode 100644
index 0000000..58b6ec6
--- /dev/null
+++ b/svx/source/cui/insrc.src
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * 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: insrc.src,v $
+ * $Revision: 1.32 $
+ *
+ * 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 <svx/dialogs.hrc>
+#include "insrc.hrc"
+
+ModalDialog DLG_INS_ROW_COL
+{
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 136 , 84 ) ;
+    Text [ en-US ] = "Insert" ;
+    Moveable = TRUE ;
+    OKButton BT_OK
+    {
+        Pos = MAP_APPFONT ( 80 , 6 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        TabStop = TRUE ;
+        DefButton = TRUE ;
+    };
+    CancelButton BT_CANCEL
+    {
+        Pos = MAP_APPFONT ( 80 , 23 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        TabStop = TRUE ;
+    };
+    HelpButton BT_HELP
+    {
+        Pos = MAP_APPFONT ( 80 , 43 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        TabStop = TRUE ;
+    };
+    RadioButton CB_POS_BEFORE
+    {
+        Pos = MAP_APPFONT ( 12 , 49 ) ;
+        Size = MAP_APPFONT ( 56 , 10 ) ;
+        Text [ en-US ] = "~Before" ;
+        TabStop = TRUE ;
+    };
+    RadioButton CB_POS_AFTER
+    {
+        Pos = MAP_APPFONT ( 12 , 62 ) ;
+        Size = MAP_APPFONT ( 56 , 10 ) ;
+        Text [ en-US ] = "A~fter" ;
+        TabStop = TRUE ;
+        Check = TRUE ;
+    };
+    NumericField ED_COUNT
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 44 , 14 ) ;
+        Size = MAP_APPFONT ( 24 , 12 ) ;
+        TabStop = TRUE ;
+        Left = TRUE ;
+        Repeat = TRUE ;
+        Spin = TRUE ;
+        Minimum = 1 ;
+        Maximum = 99 ;
+        Value = 1 ;
+        First = 1 ;
+        Last = 5 ;
+    };
+    FixedLine FL_INS
+    {
+        Pos = MAP_APPFONT ( 6 , 3 ) ;
+        Size = MAP_APPFONT ( 68 , 8 ) ;
+        Text [ en-US ] = "Insert" ;
+    };
+    FixedLine FL_POS
+    {
+        Pos = MAP_APPFONT ( 6 , 38 ) ;
+        Size = MAP_APPFONT ( 68 , 8 ) ;
+        Text [ en-US ] = "Position";
+    };
+    FixedText FT_COUNT
+    {
+        Pos = MAP_APPFONT ( 12 , 16 ) ;
+        Size = MAP_APPFONT ( 30 , 8 ) ;
+        Text [ en-US ] = "~Number" ;
+        Left = TRUE ;
+    };
+    String STR_ROW
+    {
+        Text [ en-US ] = " Rows" ;
+    };
+    String STR_COL
+    {
+        Text [ en-US ] = " Columns" ;
+    };
+};
diff --git a/svx/source/cui/makefile.mk b/svx/source/cui/makefile.mk
index 7db32bb..7a1db4a 100755
--- a/svx/source/cui/makefile.mk
+++ b/svx/source/cui/makefile.mk
@@ -100,7 +100,8 @@ SRC1FILES =  \
         textattr.src \
         treeopt.src \
         webconninfo.src \
-        zoom.src
+        zoom.src \
+        insrc.src
 
 SRS2NAME=cuidrawdlgs
 SRC2FILES =  \
@@ -221,7 +222,8 @@ SLOFILES+=\
         $(SLO)$/macroass.obj \
         $(SLO)$/cfg.obj \
         $(SLO)$/cfgutil.obj \
-        $(SLO)$/optchart.obj
+        $(SLO)$/optchart.obj \
+        $(SLO)$/insrc.obj
 
 .IF "$(GUI)"=="WNT"
 SLOFILES+=$(SLO)$/winpluginlib.obj
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 61b4f60..1f411f3 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -751,30 +751,9 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
         }
         break;
         case mso_sptCurvedLeftArrow :
-        {
-            if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
-            {
-                double fValue;
-                seqAdjustmentValues[ 2 ].Value >>= fValue;
-                fValue = 21600 - fValue;
-                seqAdjustmentValues[ 2 ].Value <<= fValue;
-            }
-            nFlags |= DFF_CUSTOMSHAPE_FLIP_H;
-        }
-        break;
+        case mso_sptCurvedRightArrow :
         case mso_sptCurvedUpArrow :
-        {
-            if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
-            {
-                double fValue;
-                seqAdjustmentValues[ 2 ].Value >>= fValue;
-                fValue = 21600 - fValue;
-                seqAdjustmentValues[ 2 ].Value <<= fValue;
-            }
-            nFlags |= DFF_CUSTOMSHAPE_FLIP_V | DFF_CUSTOMSHAPE_EXCH;
-        }
-        break;
-        case mso_sptCurvedDownArrow :			nFlags |= DFF_CUSTOMSHAPE_EXCH; break;
+        case mso_sptCurvedDownArrow :			nColorData = 0x2d000000; break;
         case mso_sptRibbon2 :					nColorData = 0x30dd0000; break;
         case mso_sptRibbon :					nColorData = 0x30dd0000; break;
 
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index c39ae74..548c09b 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -54,10 +54,6 @@ static const SvxMSDffTextRect TextRect[] =
 {
     { { 0, 0 }, { 0, 0 } }
 };
-static const sal_Int32 BoundRect[] =
-{
-    0, 0, 21600, 21600
-};
 static const mso_CustomShape mso =
 {
     (SvxMSDffVertPair*)mso_sptVert, sizeof( mso_sptVert ) / sizeof( SvxMSDffVertPair ),
@@ -668,10 +664,6 @@ static const SvxMSDffVertPair mso_sptCanGluePoints[] =
 {
     { 44, 6 MSO_I }, { 44, 0 }, { 0, 10800 }, { 44, 21600 }, { 88, 10800 }
 };
-static const sal_Int32 mso_sptCanBoundRect[] =
-{
-    0, 0, 88, 21600
-};
 static const SvxMSDffHandle mso_sptCanHandle[] =
 {
     {	MSDFF_HANDLE_FLAGS_RANGE,
@@ -1197,60 +1189,422 @@ static const mso_CustomShape msoBentUpArrow =
     (SvxMSDffHandle*)mso_sptBentUpArrowHandle, sizeof( mso_sptBentUpArrowHandle ) / sizeof( SvxMSDffHandle )
 };
 
-static const SvxMSDffVertPair mso_sptCurvedArrowVert[] =	// adjustment1 : y 10800 - 21600, adjustment2 : y 16424 - 21600
-{															// adjustment3 : x 0 - 21600
-    { 21600, 0 },
-    { 9675,	0 }, { 0, 10 MSO_I }, { 0, 9 MSO_I },										// ccp
-    { 0, 11 MSO_I },
-    { 0, 14 MSO_I }, { 15 MSO_I, 1 MSO_I }, { 2 MSO_I, 1 MSO_I },						// ccp
-    { 2 MSO_I, 21600 }, { 21600, 7 MSO_I }, { 2 MSO_I, 0 MSO_I }, { 2 MSO_I, 16 MSO_I },// pppp
-    { 2 MSO_I, 16 MSO_I }, { 80, 8 MSO_I },	{ 80, 8 MSO_I },							// ccp
-    { 80, 8 MSO_I }, { 21600, 5 MSO_I }, { 21600, 0	}									// ccp
-};
-static const sal_uInt16 mso_sptCurvedArrowSegm[] =
-{
-    0x4000, 0x2001, 0x0001, 0x2001, 0x0004, 0x2002, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCurvedArrowCalc[] =
-{
-    { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },						// 0
-    { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },					// 1
-    { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },					// 2
-    { 0x8000, { 21600, 0, DFF_Prop_adjust2Value } },				// 3
-    { 0xa000, { DFF_Prop_adjust2Value, 0, DFF_Prop_adjustValue } },	// 4
-    { 0xa000, { 0x0404, 0, 0x0403 } },								// 5
-    { 0x2001, { 0x0405, 1, 2 } },									// 6
-    { 0xa000, { DFF_Prop_adjust2Value, 0, 0x0406 } },				// 7
-    { 0x2001, { DFF_Prop_adjust2Value, 1, 2 } },					// 8
-    { 0xa000, { 0x0408, 0, 0x0406 } },								// 9
-    { 0x2001, { 0x0409, 10000, 22326 } },							// 10
-    { 0x6000, { 0x0409, 0x0405, 0 } },								// 11
-    { 0xa000, { DFF_Prop_adjust2Value, 0, 0x040b } },				// 12
-    { 0x2001, { 0x040c, 10000, 23148 } },							// 13
-    { 0x6000, { 0x040d, 0x040b, 0 } },								// 14
-    { 0x2001, { DFF_Prop_adjust3Value, 10000, 25467 } },			// 15
-    { 0x6000, { DFF_Prop_adjustValue, 0x0403, 0 } }					// 16
-};
-static const sal_Int32 mso_sptCurvedArrowDefault[] =
-{
-    3, 13000, 19400, 14400
-};
-static const SvxMSDffTextRectangles mso_sptCurvedArrowTextRect[] =	// todo
+
+static const SvxMSDffVertPair mso_sptCurvedDownVert[] =
 {
-    { { 0, 0 }, { 21600, 21600 } }
+    { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 0, 21600 }, { 4 MSO_I, 0 },
+    { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 4 MSO_I, 0 }, { 17 MSO_I, 24 MSO_I }, 
+    { 15 MSO_I, 0 }, { 1 MSO_I, 21 MSO_I }, { 17 MSO_I, 24 MSO_I }, { 15 MSO_I, 21600 },
+    { 15 MSO_I, 0 }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 0 }, { 13 MSO_I, 2 MSO_I },
+    { 14 MSO_I, 2 MSO_I }, { 8 MSO_I, 21600 }, { 12 MSO_I, 2 MSO_I },
+    { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 11 MSO_I, 2 MSO_I }, { 17 MSO_I, 24 MSO_I },
+    { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 17 MSO_I, 24 MSO_I }, { 4 MSO_I, 0 }
+};
+static const sal_uInt16 mso_sptCurvedDownSegm[] =
+{
+    0xa508,
+    0xa304,
+    0x6000,
+    0x8000,
+    0xa604,
+    0x0003,
+    0xa308,
+    0x6000,
+    0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedDownCalc[] =
+{
+    { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+    { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+    { 0x2001, { 0x403, 1, 2 } },
+    { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+    { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x406, 1, 2 } },
+    { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+    { 0x8000, { 21600, 0, DFF_Prop_adjust3Value } },
+    { 0xa00f, { 0x409, 21600, 0x404 } },
+    { 0x6000, { 0x404, 0x40a, 0 } },
+    { 0x6000, { 0x40b, DFF_Prop_adjust2Value, 21600 } },
+    { 0x6000, { 0x407, 0x40a, 0 } },
+    { 0xa000, { 0x40c, 21600, DFF_Prop_adjustValue } },
+    { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x40f, 1, 2 } },
+    { 0x6002, { 0x404, 0x407, 0 } },
+    { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+    { 0x2001, { 0x412, 1, 2 } },
+    { 0xa000, { 0x411, 0, 0x413 } },
+    { 0x0001, { 21600, 2, 1 } },
+    { 0xa000, { 0x411, 0, 0x404 } },
+    { 0x600f, { 0x416, 0x404, 21600 } },
+    { 0x8000, { 21600, 0, 0x417 } },
+    { 0x2000, { 0x408, 128, 0 } },
+    { 0x2001, { 0x405, 1, 2 } },
+    { 0x2000, { 0x405, 0, 128 } },
+    { 0xe000, { DFF_Prop_adjustValue, 0x411, 0x40c } },
+    { 0x600f, { 0x414, 0x404, 21600 } },
+    { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x41e, 1, 2 } },
+    { 0x0001, { 21600, 21600, 1 } },
+    { 0x6001, { 0x409, 0x409, 1 } },
+    { 0xa000, { 0x420, 0, 0x421 } },
+    { 0x200d, { 0x422, 0, 0 } },
+    { 0x2000, { 0x423, 21600, 0 } },
+    { 0x8001, { 21600, 21600, 0x424 } },
+    { 0x2000, { 0x425, 64, 0 } },
+    { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+    { 0x600f, { 0x41f, 0x427, 21600 } },
+    { 0x8000, { 21600, 0, 0x428 } },
+    { 0x2000, { 0x429, 64, 0 } },
+    { 0x2001, { 0x404, 1, 2 } },
+    { 0xa000, { DFF_Prop_adjust2Value, 0, 0x42b } },
+    { 0x0001, { 21600, 2195, 16384 } },
+    { 0x0001, { 21600, 14189, 16384 } }
 };
-static const mso_CustomShape msoCurvedArrow =
+static const sal_Int32 mso_sptCurvedDownDefault[] =
 {
-    (SvxMSDffVertPair*)mso_sptCurvedArrowVert, sizeof( mso_sptCurvedArrowVert ) / sizeof( SvxMSDffVertPair ),
-    (sal_uInt16*)mso_sptCurvedArrowSegm, sizeof( mso_sptCurvedArrowSegm ) >> 1,
-    (SvxMSDffCalculationData*)mso_sptCurvedArrowCalc, sizeof( mso_sptCurvedArrowCalc ) / sizeof( SvxMSDffCalculationData ),
-    (sal_Int32*)mso_sptCurvedArrowDefault,
-    (SvxMSDffTextRectangles*)mso_sptCurvedArrowTextRect, sizeof( mso_sptCurvedArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
+    3, 12960, 19440, 14400
+};
+static const SvxMSDffTextRectangles mso_sptCurvedDownTextRect[] =
+{
+    { { 43 MSO_I, 45 MSO_I }, { 44 MSO_I, 46 MSO_I } }
+};
+static const SvxMSDffVertPair mso_sptCurvedDownGluePoints[] =
+{
+    { 17 MSO_I, 0 }, { 16 MSO_I, 21600 }, { 12 MSO_I, 2 MSO_I }, { 8 MSO_I, 21600 }, { 14 MSO_I, 2 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedDownHandles[] =
+{
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+        0x100, 21600, 10800, 10800, 3 + 0x26, 3 + 0x1b, 0, 10800 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL,
+        0x101, 21600, 10800, 10800, 3 + 0x19, 21600, 0, 10800 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL,
+        21600, 0x102, 10800, 10800, 3375, 21600, 3 + 0x2a, 21600 }
+};
+static const mso_CustomShape msoCurvedDownArrow =
+{
+    (SvxMSDffVertPair*)mso_sptCurvedDownVert, sizeof( mso_sptCurvedDownVert ) / sizeof( SvxMSDffVertPair ),
+    (sal_uInt16*)mso_sptCurvedDownSegm, sizeof( mso_sptCurvedDownSegm ) >> 1,
+    (SvxMSDffCalculationData*)mso_sptCurvedDownCalc, sizeof( mso_sptCurvedDownCalc ) / sizeof( SvxMSDffCalculationData ),
+    (sal_Int32*)mso_sptCurvedDownDefault,
+    (SvxMSDffTextRectangles*)mso_sptCurvedDownTextRect, sizeof( mso_sptCurvedDownTextRect ) / sizeof( SvxMSDffTextRectangles ),
     21600, 21600,
     0x80000000, 0x80000000,
-    NULL, 0,
-    NULL, 0		// handles
+    (SvxMSDffVertPair*)mso_sptCurvedDownGluePoints, sizeof( mso_sptCurvedDownGluePoints ) / sizeof( SvxMSDffVertPair ),
+    (SvxMSDffHandle*)mso_sptCurvedDownHandles, sizeof( mso_sptCurvedDownHandles ) / sizeof( SvxMSDffHandle )
+};
+
+static const SvxMSDffVertPair mso_sptCurvedUpVert[] =
+{
+    { 0, 22 MSO_I }, { 3 MSO_I, 21 MSO_I }, { 0, 0 }, { 4 MSO_I, 21 MSO_I },
+        { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 21 MSO_I }, { 12 MSO_I, 2 MSO_I },
+    { 13 MSO_I, 2 MSO_I }, { 8 MSO_I, 0 }, { 11 MSO_I, 2 MSO_I },
+    { 0, 22 MSO_I }, { 3 MSO_I, 21 MSO_I }, { 10 MSO_I, 2 MSO_I }, { 16 MSO_I, 24 MSO_I },
+    { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 16 MSO_I, 24 MSO_I }, { 14 MSO_I, 0 },
+    { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 21 MSO_I }, { 16 MSO_I, 24 MSO_I }
+};
+static const sal_uInt16 mso_sptCurvedUpSegm[] =
+{
+    0xa408,
+    0x0003,
+    0xa508,
+    0x6000,
+    0x8000,
+    0xa604,
+    0xaa00,
+    0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedUpCalc[] =
+{
+    { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+    { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+    { 0x2001, { 0x403, 1, 2 } },
+    { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+    { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x406, 1, 2 } },
+    { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+    { 0xa00f, { DFF_Prop_adjust3Value, 21600, 0x404 } },
+    { 0x6000, { 0x404, 0x409, 0 } },
+    { 0x6000, { 0x40a, DFF_Prop_adjust2Value, 21600 } },
+    { 0x6000, { 0x407, 0x409, 0 } },
+    { 0xa000, { 0x40b, 21600, DFF_Prop_adjustValue } },
+    { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x40e, 1, 2 } },
+    { 0x6002, { 0x404, 0x407, 0 } },
+    { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+    { 0x2001, { 0x411, 1, 2 } },
+    { 0xa000, { 0x410, 0, 0x412 } },
+    { 0x0000, { 21600, 0, 0 } },
+    { 0x0000, { 21600, 0, 0 } },
+    { 0x0000, { 0, 0, 21600 } },
+    { 0xa000, { 0x410, 0, 0x404 } },
+    { 0x600f, { 0x417, 0x404, 21600 } },
+    { 0x2000, { 0x408, 128, 0 } },
+    { 0x2001, { 0x405, 1, 2 } },
+    { 0x2000, { 0x405, 0, 128 } },
+    { 0xe000, { DFF_Prop_adjustValue, 0x410, 0x40b } },
+    { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x41d, 1, 2 } },
+    { 0x0001, { 21600, 21600, 1 } },
+    { 0x6001, { DFF_Prop_adjust3Value, DFF_Prop_adjust3Value, 1 } },
+    { 0xa000, { 0x41f, 0, 0x420 } },
+    { 0x200d, { 0x421, 0, 0 } },
+    { 0x2000, { 0x422, 21600, 0 } },
+    { 0x8001, { 21600, 21600, 0x423 } },
+    { 0x2000, { 0x424, 64, 0 } },
+    { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+    { 0x600f, { 0x41e, 0x426, 21600 } },
+    { 0x2000, { 0x427, 0, 64 } },
+    { 0x2001, { 0x404, 1, 2 } },
+    { 0xa000, { DFF_Prop_adjust2Value, 0, 0x429 } },
+    { 0x0001, { 21600, 2195, 16384 } },
+    { 0x0001, { 21600, 14189, 16384 } }
+};
+static const sal_Int32 mso_sptCurvedUpDefault[] =
+{
+    3, 12960, 19440, 7200
+};
+static const SvxMSDffTextRectangles mso_sptCurvedUpTextRect[] =
+{
+    { { 41 MSO_I, 43 MSO_I }, { 42 MSO_I, 44 MSO_I } }
+};
+static const SvxMSDffVertPair mso_sptCurvedUpGluePoints[] =
+{
+    { 8 MSO_I, 0 }, { 11 MSO_I, 2 MSO_I }, { 15 MSO_I, 0 }, { 16 MSO_I, 21 MSO_I }, { 13 MSO_I, 2 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedUpHandles[] =
+{
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+        0x100, 0, 10800, 10800, 3 + 37, 3 + 27, 0, 10800 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+        0x101, 0, 10800, 10800, 3 + 25, 3 + 20, 0, 10800 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+        21600, 0x102, 10800, 10800, 3375, 21600, 0, 3 + 40 }
+};
+static const mso_CustomShape msoCurvedUpArrow =
+{
+    (SvxMSDffVertPair*)mso_sptCurvedUpVert, sizeof( mso_sptCurvedUpVert ) / sizeof( SvxMSDffVertPair ),
+    (sal_uInt16*)mso_sptCurvedUpSegm, sizeof( mso_sptCurvedUpSegm ) >> 1,
+    (SvxMSDffCalculationData*)mso_sptCurvedUpCalc, sizeof( mso_sptCurvedUpCalc ) / sizeof( SvxMSDffCalculationData ),
+    (sal_Int32*)mso_sptCurvedUpDefault,
+    (SvxMSDffTextRectangles*)mso_sptCurvedUpTextRect, sizeof( mso_sptCurvedUpTextRect ) / sizeof( SvxMSDffTextRectangles ),
+    21600, 21600,
+    0x80000000, 0x80000000,
+    (SvxMSDffVertPair*)mso_sptCurvedUpGluePoints, sizeof( mso_sptCurvedUpGluePoints ) / sizeof( SvxMSDffVertPair ),
+    (SvxMSDffHandle*)mso_sptCurvedUpHandles, sizeof( mso_sptCurvedUpHandles ) / sizeof( SvxMSDffHandle )
+};
+
+static const SvxMSDffVertPair mso_sptCurvedRightVert[] =
+{
+    { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 22 MSO_I, 0 }, { 0, 4 MSO_I }, { 0, 15 MSO_I }, { 23 MSO_I, 1 MSO_I }, { 0, 7 MSO_I }, { 2 MSO_I, 13 MSO_I },
+    { 2 MSO_I, 14 MSO_I }, { 22 MSO_I, 8 MSO_I }, { 2 MSO_I, 12 MSO_I },
+    { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 2 MSO_I, 11 MSO_I }, { 26 MSO_I, 17 MSO_I }, { 0, 15 MSO_I }, { 23 MSO_I, 1 MSO_I }, { 26 MSO_I, 17 MSO_I }, { 22 MSO_I, 15 MSO_I },
+    { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 0, 4 MSO_I }, { 26 MSO_I, 17 MSO_I }
+};
+static const sal_uInt16 mso_sptCurvedRightSegm[] =
+{
+    0xa408,
+    0x0003,
+    0xa508,
+    0x6000,
+    0x8000,
+    0xa404,
+    0xaa00,
+    0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedRightCalc[] =
+{
+    { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+    { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+    { 0x2001, { 0x403, 1, 2 } },
+    { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+    { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x406, 1, 2 } },
+    { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+    { 0x8000, { 21600, 0, DFF_Prop_adjust3Value } },
+    { 0xa00f, { 0x409, 21600, 0x404 } },
+    { 0x6000, { 0x404, 0x40a, 0 } },
+    { 0x6000, { 0x40b, DFF_Prop_adjust2Value, 21600 } },
+    { 0x6000, { 0x407, 0x40a, 0 } },
+    { 0xa000, { 0x40c, 21600, DFF_Prop_adjustValue } },
+    { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x40f, 1, 2 } },
+    { 0x6002, { 0x404, 0x407, 0 } },
+    { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+    { 0x2001, { 0x412, 1, 2 } },
+    { 0xa000, { 0x411, 0, 0x413 } },
+    { 0x0000, { 21600, 0, 0 } },
+    { 0x0000, { 21600, 0, 0 } },
+    { 0x0001, { 21600, 2, 1 } },
+    { 0xa000, { 0x411, 0, 0x404 } },
+    { 0x600f, { 0x418, 0x404, 21600 } },
+    { 0x8000, { 21600, 0, 0x419 } },
+    { 0x2000, { 0x408, 128, 0 } },
+    { 0x2001, { 0x405, 1, 2 } },
+    { 0x2000, { 0x405, 0, 128 } },
+    { 0xe000, { DFF_Prop_adjustValue, 0x411, 0x40c } },
+    { 0x600f, { 0x414, 0x404, 21600 } },
+    { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x420, 1, 2 } },
+    { 0x0001, { 21600, 21600, 1 } },
+    { 0x6001, { 0x409, 0x409, 1 } },
+    { 0xa000, { 0x422, 0, 0x423 } },
+    { 0x200d, { 0x424, 0, 0 } },
+    { 0x2000, { 0x425, 21600, 0 } },
+    { 0x8001, { 21600, 21600, 0x426 } },
+    { 0x2000, { 0x427, 64, 0 } },
+    { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+    { 0x600f, { 0x421, 0x429, 21600 } },
+    { 0x8000, { 21600, 0, 0x42a } },
+    { 0x2000, { 0x42b, 64, 0 } },
+    { 0x2001, { 0x404, 1, 2 } },
+    { 0xa000, { DFF_Prop_adjust2Value, 0, 0x42d } },
+    { 0x0001, { 21600, 2195, 16384 } },
+    { 0x0001, { 21600, 14189, 16384 } }
+};
+static const sal_Int32 mso_sptCurvedRightDefault[] =
+{
+    3, 12960, 19440, 14400
+};
+static const SvxMSDffTextRectangles mso_sptCurvedRightTextRect[] =
+{
+    { { 47 MSO_I, 45 MSO_I }, { 48 MSO_I, 46 MSO_I } }
+};
+static const SvxMSDffVertPair mso_sptCurvedRightGluePoints[] =
+{
+    { 0, 17 MSO_I }, { 2 MSO_I, 14 MSO_I }, { 22 MSO_I, 8 MSO_I }, { 2 MSO_I, 12 MSO_I }, { 22 MSO_I, 16 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedRightHandles[] =
+{
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+        21600, 0x100, 10800, 10800, 0, 10800, 3 + 40, 3 + 29 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+        21600, 0x101, 10800, 10800, 0, 10800, 3 + 27, 3 + 21 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+        0x102, 21600, 10800, 10800, 3 + 44, 3 + 22, 3375, 21600 }
+};
+static const mso_CustomShape msoCurvedRightArrow =
+{
+    (SvxMSDffVertPair*)mso_sptCurvedRightVert, sizeof( mso_sptCurvedRightVert ) / sizeof( SvxMSDffVertPair ),
+    (sal_uInt16*)mso_sptCurvedRightSegm, sizeof( mso_sptCurvedRightSegm ) >> 1,
+    (SvxMSDffCalculationData*)mso_sptCurvedRightCalc, sizeof( mso_sptCurvedRightCalc ) / sizeof( SvxMSDffCalculationData ),
+    (sal_Int32*)mso_sptCurvedRightDefault,
+    (SvxMSDffTextRectangles*)mso_sptCurvedRightTextRect, sizeof( mso_sptCurvedRightTextRect ) / sizeof( SvxMSDffTextRectangles ),
+    21600, 21600,
+    0x80000000, 0x80000000,
+    (SvxMSDffVertPair*)mso_sptCurvedRightGluePoints, sizeof( mso_sptCurvedRightGluePoints ) / sizeof( SvxMSDffVertPair ),
+    (SvxMSDffHandle*)mso_sptCurvedRightHandles, sizeof( mso_sptCurvedRightHandles ) / sizeof( SvxMSDffHandle )
+};
+
+static const SvxMSDffVertPair mso_sptCurvedLeftVert[] =
+{
+    { 22 MSO_I, 0 }, { 21 MSO_I, 3 MSO_I }, { 0, 0 }, { 21 MSO_I, 4 MSO_I }, { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 21 MSO_I, 7 MSO_I }, { 2 MSO_I, 12 MSO_I },
+    { 2 MSO_I, 13 MSO_I }, { 0, 8 MSO_I }, { 2 MSO_I, 11 MSO_I },
+    { 22 MSO_I, 0 }, { 21 MSO_I, 3 MSO_I }, { 2 MSO_I, 10 MSO_I }, { 24 MSO_I, 16 MSO_I }, { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 24 MSO_I, 16 MSO_I }, { 0, 14 MSO_I },
+    { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 21 MSO_I, 7 MSO_I }, { 24 MSO_I, 16 MSO_I }
+};
+static const sal_uInt16 mso_sptCurvedLeftSegm[] =
+{
+    0xa608,
+    0x0003,
+    0xa308,
+    0x6000,
+    0x8000,
+    0xa404,
+    0xaa00,
+    0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedLeftCalc[] =
+{
+    { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+    { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+    { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+    { 0x2001, { 0x403, 1, 2 } },
+    { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+    { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x406, 1, 2 } },
+    { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+    { 0xa00f, { DFF_Prop_adjust3Value, 21600, 0x404 } },
+    { 0x6000, { 0x404, 0x409, 0 } },
+    { 0x6000, { 0x40a, DFF_Prop_adjust2Value, 21600 } },
+    { 0x6000, { 0x407, 0x409, 0 } },
+    { 0xa000, { 0x40b, 21600, DFF_Prop_adjustValue } },
+    { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x40e, 1, 2 } },
+    { 0x6002, { 0x404, 0x407, 0 } },
+    { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+    { 0x2001, { 0x411, 1, 2 } },
+    { 0xa000, { 0x410, 0, 0x412 } },
+    { 0x0000, { 21600, 0, 0 } },
+    { 0x0000, { 21600, 0, 0 } },
+    { 0x0000, { 0, 0, 21600 } },
+    { 0xa000, { 0x410, 0, 0x404 } },
+    { 0x600f, { 0x417, 0x404, 21600 } },
+    { 0x2000, { 0x408, 128, 0 } },
+    { 0x2001, { 0x405, 1, 2 } },
+    { 0x2000, { 0x405, 0, 128 } },
+    { 0xe000, { DFF_Prop_adjustValue, 0x410, 0x40b } },
+    { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+    { 0x2001, { 0x41d, 1, 2 } },
+    { 0x0001, { 21600, 21600, 1 } },
+    { 0x6001, { DFF_Prop_adjust3Value, DFF_Prop_adjust3Value, 1 } },
+    { 0xa000, { 0x41f, 0, 0x420 } },
+    { 0x200d, { 0x421, 0, 0 } },
+    { 0x2000, { 0x422, 21600, 0 } },
+    { 0x8001, { 21600, 21600, 0x423 } },
+    { 0x2000, { 0x424, 64, 0 } },
+    { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+    { 0x600f, { 0x41e, 0x426, 21600 } },
+    { 0x2000, { 0x427, 0, 64 } },
+    { 0x2001, { 0x404, 1, 2 } },
+    { 0xa000, { DFF_Prop_adjust2Value, 0, 0x429 } },
+    { 0x0001, { 21600, 2195, 16384 } },
+    { 0x0001, { 21600, 14189, 16384 } }
+};
+static const sal_Int32 mso_sptCurvedLeftDefault[] =
+{
+    3, 12960, 19440, 7200
+};
+static const SvxMSDffTextRectangles mso_sptCurvedLeftTextRect[] =
+{
+    { { 43 MSO_I, 41 MSO_I }, { 44 MSO_I, 42 MSO_I } }
 };
+static const SvxMSDffVertPair mso_sptCurvedLeftGluePoints[] =
+{
+    { 0, 15 MSO_I }, { 2 MSO_I, 11 MSO_I }, { 0, 8 MSO_I }, { 2 MSO_I, 13 MSO_I }, { 21 MSO_I, 16 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedLeftHandles[] =
+{
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+        0, 0x100, 10800, 10800, 0, 10800, 3 + 37, 3 + 27 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+        0, 0x101, 10800, 10800, 0, 10800, 3 + 25, 3 + 20 },
+    {	MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+        0x102, 21600, 10800, 10800, 0, 3 + 40, 3375, 21600 }
+};
+static const mso_CustomShape msoCurvedLeftArrow =
+{
+    (SvxMSDffVertPair*)mso_sptCurvedLeftVert, sizeof( mso_sptCurvedLeftVert ) / sizeof( SvxMSDffVertPair ),
+    (sal_uInt16*)mso_sptCurvedLeftSegm, sizeof( mso_sptCurvedLeftSegm ) >> 1,
+    (SvxMSDffCalculationData*)mso_sptCurvedLeftCalc, sizeof( mso_sptCurvedLeftCalc ) / sizeof( SvxMSDffCalculationData ),
+    (sal_Int32*)mso_sptCurvedLeftDefault,
+    (SvxMSDffTextRectangles*)mso_sptCurvedLeftTextRect, sizeof( mso_sptCurvedLeftTextRect ) / sizeof( SvxMSDffTextRectangles ),
+    21600, 21600,
+    0x80000000, 0x80000000,
+    (SvxMSDffVertPair*)mso_sptCurvedLeftGluePoints, sizeof( mso_sptCurvedLeftGluePoints ) / sizeof( SvxMSDffVertPair ),
+    (SvxMSDffHandle*)mso_sptCurvedLeftHandles, sizeof( mso_sptCurvedLeftHandles ) / sizeof( SvxMSDffHandle )
+};
+
+
+
+
 
 static const SvxMSDffVertPair mso_sptStripedRightArrowVert[] =	// adjustment1 : x 3375 - 21600
 {																// adjustment2 : y 0 - 10800
@@ -3046,10 +3400,6 @@ static const SvxMSDffVertPair mso_sptHeartGluePoints[] =
 {
     { 10800, 2180 }, { 3090, 10800 }, { 10800, 21600 }, { 18490, 10800 }
 };
-static const sal_Int32 mso_sptHeartBoundRect[] =
-{
-    -9, 0, 21606, 21602
-};
 static const mso_CustomShape msoHeart =
 {
     (SvxMSDffVertPair*)mso_sptHeartVert, sizeof( mso_sptHeartVert ) / sizeof( SvxMSDffVertPair ),
@@ -7772,10 +8122,10 @@ const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType )
         case mso_sptUturnArrow :				pCustomShape = &msoUturnArrow; break;
         case mso_sptLeftUpArrow :				pCustomShape = &msoLeftUpArrow; break;
         case mso_sptBentUpArrow :				pCustomShape = &msoBentUpArrow; break;
-        case mso_sptCurvedRightArrow :			pCustomShape = &msoCurvedArrow; break;
-        case mso_sptCurvedLeftArrow :			pCustomShape = &msoCurvedArrow; break;
-        case mso_sptCurvedUpArrow :				pCustomShape = &msoCurvedArrow; break;
-        case mso_sptCurvedDownArrow :			pCustomShape = &msoCurvedArrow; break;
+        case mso_sptCurvedRightArrow :			pCustomShape = &msoCurvedRightArrow; break;
+        case mso_sptCurvedLeftArrow :			pCustomShape = &msoCurvedLeftArrow; break;
+        case mso_sptCurvedUpArrow :				pCustomShape = &msoCurvedUpArrow; break;
+        case mso_sptCurvedDownArrow :			pCustomShape = &msoCurvedDownArrow; break;
         case mso_sptStripedRightArrow :			pCustomShape = &msoStripedRightArrow; break;
         case mso_sptNotchedRightArrow :			pCustomShape = &msoNotchedRightArrow; break;
         case mso_sptHomePlate :					pCustomShape = &msoHomePlate; break;
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 554a185..31e7716 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -4754,13 +4754,13 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
             if ( ( nGroupRotateAngle > 4500 && nGroupRotateAngle <= 13500 )
                 || ( nGroupRotateAngle > 22500 && nGroupRotateAngle <= 31500 ) )
             {
-                sal_Int32 nHalfWidth = ( aGlobalChildRect.GetWidth() + 1 ) >> 1;
-                sal_Int32 nHalfHeight = ( aGlobalChildRect.GetHeight() + 1 ) >> 1;
-                Point aTopLeft( aGlobalChildRect.Left() + nHalfWidth - nHalfHeight,
-                                aGlobalChildRect.Top() + nHalfHeight - nHalfWidth );
-                Size aNewSize( aGlobalChildRect.GetHeight(), aGlobalChildRect.GetWidth() );
+                sal_Int32 nHalfWidth = ( aClientRect.GetWidth() + 1 ) >> 1;
+                sal_Int32 nHalfHeight = ( aClientRect.GetHeight() + 1 ) >> 1;
+                Point aTopLeft( aClientRect.Left() + nHalfWidth - nHalfHeight,
+                                aClientRect.Top() + nHalfHeight - nHalfWidth );
+                Size aNewSize( aClientRect.GetHeight(), aClientRect.GetWidth() );
                 Rectangle aNewRect( aTopLeft, aNewSize );
-                aGlobalChildRect = aNewRect;
+                aClientRect = aNewRect;
             }
 
             // now importing the inner objects of the group
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index fccaf18..180485f 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -493,7 +493,7 @@ void SvxTableController::GetState( SfxItemSet& rSet )
 
 // --------------------------------------------------------------------
 
-void SvxTableController::onInsert( sal_uInt16 nSId )
+void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
 {
     ::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
     if( !pTableObj )
@@ -501,6 +501,21 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
 
     if( mxTable.is() ) try
     {
+        // 
+        bool bInsertAfter = true;
+        sal_uInt16 nCount = 0;
+        if( pArgs )
+        {
+            const SfxPoolItem* pItem = 0;
+            pArgs->GetItemState(nSId, FALSE, &pItem);
+            if (pItem)
+            {
+                nCount = ((const SfxInt16Item* )pItem)->GetValue();
+                if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, TRUE, &pItem))
+                    bInsertAfter = ((const SfxBoolItem* )pItem)->GetValue();
+            }
+        }
+            
         CellPos aStart, aEnd;
         if( hasSelectedCells() )
         {
@@ -508,15 +523,18 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
         }
         else
         {
-            aStart.mnCol = mxTable->getColumnCount() - 1;
-            aStart.mnRow = mxTable->getRowCount() - 1;
-            aEnd = aStart;
+            if( bInsertAfter )
+            {		        
+                aStart.mnCol = mxTable->getColumnCount() - 1;
+                aStart.mnRow = mxTable->getRowCount() - 1;
+                aEnd = aStart;
+            }
         }
 
         if( pTableObj->IsTextEditActive() )
             mpView->SdrEndTextEdit(sal_True);
 
-        RemoveSelection();
+        RemoveSelection();	
         
         const OUString sSize( RTL_CONSTASCII_USTRINGPARAM( "Size" ) );
 
@@ -535,8 +553,9 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
             }
 
             Reference< XTableColumns > xCols( mxTable->getColumns() );
-            const sal_Int32 nNewColumns = aEnd.mnCol - aStart.mnCol + 1;
-            xCols->insertByIndex( aEnd.mnCol + 1, nNewColumns );
+            const sal_Int32 nNewColumns = (nCount == 0) ? (aEnd.mnCol - aStart.mnCol + 1) : nCount;
+            const sal_Int32 nNewStartColumn = aEnd.mnCol + (bInsertAfter ? 1 : 0);
+            xCols->insertByIndex( nNewStartColumn, nNewColumns );
             
             for( sal_Int32 nOffset = 0; nOffset < nNewColumns; nOffset++ )
             {
@@ -552,7 +571,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
             if( mpModel )
                 mpModel->SetChanged();
 
-            aStart.mnCol = aEnd.mnCol+1;
+            aStart.mnCol = nNewStartColumn;
             aStart.mnRow = 0;
             aEnd.mnCol = aStart.mnCol + nNewColumns - 1;
             aEnd.mnRow = mxTable->getRowCount() - 1;
@@ -570,8 +589,9 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
             }
 
             Reference< XTableRows > xRows( mxTable->getRows() );
-            const sal_Int32 nNewRows = aEnd.mnRow - aStart.mnRow + 1;
-            xRows->insertByIndex( aEnd.mnRow + 1, nNewRows );
+            const sal_Int32 nNewRows = (nCount == 0) ? (aEnd.mnRow - aStart.mnRow + 1) : nCount;
+            const sal_Int32 nNewRowStart = aEnd.mnRow + (bInsertAfter ? 1 : 0);
+            xRows->insertByIndex( nNewRowStart, nNewRows );
 
             for( sal_Int32 nOffset = 0; nOffset < nNewRows; nOffset++ )
             {
@@ -591,7 +611,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
                 mpModel->SetChanged();
 
             aStart.mnCol = 0;
-            aStart.mnRow = aEnd.mnRow+1;
+            aStart.mnRow = nNewRowStart;
             aEnd.mnCol = mxTable->getColumnCount() - 1;
             aEnd.mnRow = aStart.mnRow + nNewRows - 1;
             break;
@@ -759,7 +779,7 @@ void SvxTableController::Execute( SfxRequest& rReq )
     {
     case SID_TABLE_INSERT_ROW:
     case SID_TABLE_INSERT_COL:
-        onInsert( nSId );
+        onInsert( nSId, rReq.GetArgs() );
         break;
     case SID_TABLE_DELETE_ROW:
     case SID_TABLE_DELETE_COL:
@@ -1490,7 +1510,7 @@ bool SvxTableController::executeAction( sal_uInt16 nAction, bool bSelect, Window
             CellPos aNextCell( pTableObj->getNextCell( aSelectionEnd, true ) );
             if( aSelectionEnd == aNextCell )
             {
-                onInsert( SID_TABLE_INSERT_ROW );
+                onInsert( SID_TABLE_INSERT_ROW, 0 );
                 aNextCell = pTableObj->getNextCell( aSelectionEnd, true );
             }
             gotoCell( aNextCell, false, pWindow, nAction );
diff --git a/svx/source/table/tablecontroller.hxx b/svx/source/table/tablecontroller.hxx
index 2ea934e..41cbcd9 100644
--- a/svx/source/table/tablecontroller.hxx
+++ b/svx/source/table/tablecontroller.hxx
@@ -43,6 +43,7 @@
 
 class SdrObjEditView;
 class SdrObject;
+class SfxItemSet;
 
 namespace sdr { namespace table {
 
@@ -72,7 +73,7 @@ public:
     virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr );
 
     // slots
-    void onInsert( sal_uInt16 nSId );
+    void onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs = 0 );
     void onDelete( sal_uInt16 nSId );
     void onSelect( sal_uInt16 nSId );
     void onFormatTable( SfxRequest& rReq );
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 00402e9..9818f0a 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -118,6 +118,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos  ) const
 
                 width += maColumns[aPos.mnCol++].mnSize;
                 nColSpan--;
+                nColSpan--;
             }
         }
     }
@@ -128,6 +129,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos  ) const
     
     return basegfx::B2ITuple( width, height );
 }
+
 // -----------------------------------------------------------------------------
 
 bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rArea ) const
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index d511dbe..ca41fa9 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -49,19 +49,15 @@ using namespace ::cppu;
 
 const USHORT NON_USER_DEFINED_GLUE_POINTS = 4;
 
-class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >,
-                                public SfxListener
+class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >
 {
 private:
-    SdrObject*	mpObject;
+    SdrObjectWeakRef    mpObject;
 
 public:
     SvxUnoGluePointAccess( SdrObject* pObject ) throw();
     virtual	~SvxUnoGluePointAccess() throw();
 
-    // SfxListener
-    virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
-
     // XIdentifierContainer
     virtual sal_Int32 SAL_CALL insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
     virtual void SAL_CALL removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
@@ -223,52 +219,16 @@ static void convert( const drawing::GluePoint2& rUnoGlue, SdrGluePoint& rSdrGlue
 SvxUnoGluePointAccess::SvxUnoGluePointAccess( SdrObject* pObject ) throw()
 : mpObject( pObject )
 {
-    StartListening( *mpObject->GetModel() );
-
 }
 
 SvxUnoGluePointAccess::~SvxUnoGluePointAccess() throw()
 {
-    if( mpObject && mpObject->GetModel())
-        EndListening( *mpObject->GetModel() );
-}
-
-void SvxUnoGluePointAccess::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
-{
-    const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
-
-    if( pSdrHint && mpObject)
-    {
-        if( pSdrHint->GetKind() == HINT_OBJREMOVED )
-        {
-            if( mpObject == pSdrHint->GetObject() )
-                mpObject = NULL;
-        }
-        else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
-        {
-            mpObject = NULL;
-        }
-        // #110094#-9 
-        //else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
-        //{
-        //	SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
-        //	while( pObjList )
-        //	{
-        //		if( pSdrHint->GetObjList() == pObjList )
-        //		{
-        //			mpObject = NULL;
-        //			break;
-        //		}
-        //		pObjList = pObjList->GetUpList();
-        //	}
-        //}
-    }
 }
 
 // XIdentifierContainer
 sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( mpObject )
+    if( mpObject.is() )
     {
         SdrGluePointList* pList = mpObject->ForceGluePointList();
         if( pList )
@@ -298,7 +258,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) thr
 
 void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( mpObject && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
+    if( mpObject.is() && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
     {
         const USHORT nId = (USHORT)(Identifier - NON_USER_DEFINED_GLUE_POINTS) + 1;
 
@@ -327,7 +287,7 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier )
 // XIdentifierReplace
 void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( mpObject && mpObject->IsNode() )
+    if( mpObject.is() && mpObject->IsNode() )
     {
         struct drawing::GluePoint2 aGluePoint;
         if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint))
@@ -361,7 +321,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, c
 // XIdentifierAccess
 uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( mpObject && mpObject->IsNode() )
+    if( mpObject.is() && mpObject->IsNode() )
     {
         struct drawing::GluePoint2 aGluePoint;
 
@@ -401,21 +361,29 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier )
 
 uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() throw (uno::RuntimeException)
 {
-    const SdrGluePointList* pList = mpObject->GetGluePointList();
-    const USHORT nCount = pList ? pList->GetCount() : 0;
+    if( mpObject.is() )
+    { 
+        const SdrGluePointList* pList = mpObject->GetGluePointList();
+        const USHORT nCount = pList ? pList->GetCount() : 0;
 
-    USHORT i;
+        USHORT i;
 
-    uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
-    sal_Int32 *pIdentifier = aIdSequence.getArray();
-    
-    for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
-        *pIdentifier++ = (sal_Int32)i;
+        uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
+        sal_Int32 *pIdentifier = aIdSequence.getArray();
+        
+        for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
+            *pIdentifier++ = (sal_Int32)i;
 
-    for( i = 0; i < nCount; i++ )
-        *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1;
+        for( i = 0; i < nCount; i++ )
+            *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1;
 
-    return aIdSequence;
+        return aIdSequence;
+    }
+    else
+    {
+        uno::Sequence< sal_Int32 > aEmpty;
+        return aEmpty;
+    }
 }
 
 /* deprecated */
@@ -425,7 +393,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E
     throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
             lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( mpObject )
+    if( mpObject.is() )
     {
         SdrGluePointList* pList = mpObject->ForceGluePointList();
         if( pList )
@@ -455,7 +423,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E
 void SAL_CALL SvxUnoGluePointAccess::removeByIndex( sal_Int32 Index )
     throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( mpObject )
+    if( mpObject.is() )
     {
         SdrGluePointList* pList = mpObject->ForceGluePointList();
         if( pList )
@@ -487,7 +455,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIndex( sal_Int32 Index, const uno:
         throw lang::IllegalArgumentException();
 
     Index -= 4;
-    if( mpObject && Index >= 0 )
+    if( mpObject.is() && Index >= 0 )
     {
         SdrGluePointList* pList = const_cast< SdrGluePointList* >( mpObject->GetGluePointList() );
         if( pList && Index < pList->GetCount() )
@@ -509,7 +477,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
     throw(uno::RuntimeException)
 {
     sal_Int32 nCount = 0;
-    if( mpObject )
+    if( mpObject.is() )
     {
         // each node has a default of 4 glue points
         // and any number of user defined glue points
@@ -529,7 +497,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
 uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
     throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    if( Index >= 0 && mpObject && mpObject->IsNode() )
+    if( Index >= 0 && mpObject.is() && mpObject->IsNode() )
     {
         struct drawing::GluePoint2 aGluePoint;
 
@@ -571,7 +539,7 @@ uno::Type SAL_CALL SvxUnoGluePointAccess::getElementType()
 sal_Bool SAL_CALL SvxUnoGluePointAccess::hasElements()
     throw( uno::RuntimeException)
 {
-    return mpObject && mpObject->IsNode();
+    return mpObject.is() && mpObject->IsNode();
 }
 
 /**
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 3d455fb..9b3a4ec 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -215,9 +215,14 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField(
 {
     uno::Reference< uno::XInterface > xRet;
 
-    const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
-
-    if( ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0 )
+    const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.textfield.") );
+    
+    // #i93308# up to OOo 3.2 we used this wrong namespace name with the capital T & F. This is
+    // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation.
+    const OUString aTextFieldPrexit2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
+
+    if( (ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0) ||
+        (ServiceSpecifier.compareTo( aTextFieldPrexit2, aTextFieldPrexit2.getLength() ) == 0) )
     {
         OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) );
 
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 356b987..1ba98b3 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -670,17 +670,16 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
 
 // -----------------------------------------------------------------------------
 
-void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos )
+void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName )
 {
+    rtl::OUString aURLString( rURLStr );
     ::rtl::OUString	aPictureStorageName, aPictureStreamName;
-
-    if( ( maURLSet.find( rURLStr ) != maURLSet.end() ) )
+    if( ( maURLSet.find( aURLString ) != maURLSet.end() ) )
     {
         URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() );
-
         while( aIter != aEnd )
         {
-            if( rURLStr == (*aIter).first )
+            if( aURLString == (*aIter).first )
             {
                 maGrfURLs[ nInsertPos ].second = (*aIter).second;
                 aIter = aEnd;
@@ -689,7 +688,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
                 aIter++;
         }
     }
-    else if( ImplGetStreamNames( rURLStr, aPictureStorageName, aPictureStreamName ) )
+    else if( ImplGetStreamNames( aURLString, aPictureStorageName, aPictureStreamName ) )
     {
         URLPair& rURLPair = maGrfURLs[ nInsertPos ];
 
@@ -718,22 +717,23 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
                 String			aStreamName( aGraphicObjectId );
                 Graphic			aGraphic( (Graphic&) aGrfObject.GetGraphic() );
                 const GfxLink	aGfxLink( aGraphic.GetLink() );
+                String			aExtension;
 
                 if( aGfxLink.GetDataSize() )
                 {
                     switch( aGfxLink.GetType() )
                     {
-                        case( GFX_LINK_TYPE_EPS_BUFFER ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_GIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_JPG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_PNG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_TIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_WMF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_MET ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_PCT ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
+                        case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
+                        case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
 
                         default:
-                            aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
+                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
                         break;
                     }
                 }
@@ -742,30 +742,52 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
                     if( aGrfObject.GetType() == GRAPHIC_BITMAP )
                     {
                         if( aGrfObject.IsAnimated() )
-                            aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) );
+                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) );
                         else
-                            aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) );
+                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) );
                     }
                     else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE )
                     {
                         // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm
                         GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() );
                         if ( ImplCheckForEPS( rMtf ) )
-                            aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) );
+                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) );
                         else
-                            aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
+                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
                     }
                 }
 
+                rtl::OUString aURLEntry;
+                const String sPictures( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) );
+
+                if ( rRequestedFileName.getLength() )
+                {
+                    aURLEntry = sPictures;
+                    aURLEntry += rRequestedFileName;
+                    aURLEntry += aExtension;
+
+                    URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() );
+                    while( aIter != aEnd )
+                    {
+                        if( aURLEntry == (*aIter).second )
+                            break;
+                        aIter++;
+                    }
+                    if ( aIter == aEnd )
+                        aStreamName = rRequestedFileName;
+                }
+
+                aStreamName += aExtension;
+
                 if( mbDirect && aStreamName.Len() )
                     ImplWriteGraphic( aPictureStorageName, aStreamName, aGraphicObjectId );
 
-                rURLPair.second = String( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) );
+                rURLPair.second = sPictures;
                 rURLPair.second += aStreamName;
             }
         }
 
-        maURLSet.insert( rURLStr );
+        maURLSet.insert( aURLString );
     }
 }
 
@@ -820,14 +842,45 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper )
 // -----------------------------------------------------------------------------
 
 // XGraphicObjectResolver
-::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& aURL )
+::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& rURL )
     throw(uno::RuntimeException)
 {
     ::osl::MutexGuard   aGuard( maMutex );
     const sal_Int32     nIndex = maGrfURLs.size();
 
+    rtl::OUString aURL( rURL );
+    rtl::OUString aUserData;
+    rtl::OUString aRequestedFileName;
+
+    sal_Int32 nUser = rURL.indexOf( '?', 0 );
+    if ( nUser >= 0 )
+    {
+        aURL = rtl::OUString( rURL.copy( 0, nUser ) );
+        nUser++;
+        aUserData = rURL.copy( nUser, rURL.getLength() - nUser );
+    }
+    if ( aUserData.getLength() )
+    {
+        sal_Int32 nIndex2 = 0;
+        do
+        {
+            rtl::OUString aToken = aUserData.getToken( 0, ';', nIndex2 );
+            sal_Int32 n = aToken.indexOf( '=' );
+            if ( ( n > 0 ) && ( ( n + 1 ) < aToken.getLength() ) )
+            {
+                rtl::OUString aParam( aToken.copy( 0, n ) );
+                rtl::OUString aValue( aToken.copy( n + 1, aToken.getLength() - ( n + 1 ) ) );
+
+                const rtl::OUString sRequestedName( RTL_CONSTASCII_USTRINGPARAM("requestedName") );
+                if ( aParam.match( sRequestedName ) )
+                    aRequestedFileName = aValue;
+            }
+        }
+        while ( nIndex2 >= 0 );
+    }
+
     maGrfURLs.push_back( ::std::make_pair( aURL, ::rtl::OUString() ) );
-    ImplInsertGraphicURL( aURL, nIndex );
+    ImplInsertGraphicURL( aURL, nIndex, aRequestedFileName );
 
     return maGrfURLs[ nIndex ].second;
 }
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx
index 39927fb..af04a6e 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -49,6 +49,7 @@
 #endif
 #include "sdpropls.hxx"
 #include <tools/debug.hxx>
+#include <tools/urlobj.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <xmloff/xmlexp.hxx>
 #include <xmloff/xmluconv.hxx>
@@ -1166,8 +1167,30 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
                 OUString aStreamURL;
                 OUString aStr;
 
+                xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicStreamURL"))) >>= aStreamURL;
                 xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL"))) >>= sImageURL;
-                aStr = mrExport.AddEmbeddedGraphicObject( sImageURL );
+
+                OUString aResolveURL( sImageURL );				
+                const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.Package:") );
+
+                    // sj: trying to preserve the filename
+                if ( aStreamURL.match( sPackageURL, 0 ) )
+                {
+                    rtl::OUString sRequestedName( aStreamURL.copy( sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
+                    sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 1;
+                    if ( ( nLastIndex > 0 ) && ( nLastIndex < sRequestedName.getLength() ) )
+                        sRequestedName = sRequestedName.copy( nLastIndex, sRequestedName.getLength() - nLastIndex );
+                    nLastIndex = sRequestedName.lastIndexOf( '.' );
+                    if ( nLastIndex >= 0 )
+                        sRequestedName = sRequestedName.copy( 0, nLastIndex );
+                    if ( sRequestedName.getLength() )
+                    {
+                        aResolveURL = aResolveURL.concat( OUString(RTL_CONSTASCII_USTRINGPARAM("?requestedName=")));
+                        aResolveURL = aResolveURL.concat( sRequestedName );
+                    }
+                }
+
+                aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL );
                 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
 
                 if( aStr.getLength() )
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index d3025e0..a858748 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -1130,21 +1130,21 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
                 {
                     mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TEMPLATE_NAME, sTemplate );
 
-                    const XMLPropertyMapEntry* pEntry = &aXMLTableShapeAttributes[0];
-
-                    while( pEntry->msApiName ) try
+                    for( const XMLPropertyMapEntry* pEntry = &aXMLTableShapeAttributes[0]; pEntry->msApiName; pEntry++ )
                     {
-                        sal_Bool bBool = sal_False;
-                        const OUString sAPIPropertyName( OUString(pEntry->msApiName, pEntry->nApiNameLength, RTL_TEXTENCODING_ASCII_US ) );
+                        try
+                        {
+                            sal_Bool bBool = sal_False;
+                            const OUString sAPIPropertyName( OUString(pEntry->msApiName, pEntry->nApiNameLength, RTL_TEXTENCODING_ASCII_US ) );
 
-                        xPropSet->getPropertyValue( sAPIPropertyName ) >>= bBool;
-                        if( bBool )
-                            mrExport.AddAttribute(pEntry->mnNameSpace, pEntry->meXMLName, XML_TRUE );
-                        pEntry++;
-                    }
-                    catch( uno::Exception& )
-                    {
-                        DBG_ERROR("XMLShapeExport::ImpExportTableShape(), exception caught!");
+                            xPropSet->getPropertyValue( sAPIPropertyName ) >>= bBool;
+                            if( bBool )
+                                mrExport.AddAttribute(pEntry->mnNameSpace, pEntry->meXMLName, XML_TRUE );
+                        }
+                        catch( uno::Exception& )
+                        {
+                            DBG_ERROR("XMLShapeExport::ImpExportTableShape(), exception caught!");
+                        }
                     }
                 }
             }
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index f826488..6b6aedb 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3584,17 +3584,18 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
             }
 
             const XMLPropertyMapEntry* pEntry = &aXMLTableShapeAttributes[0];
-            int i = 0;
-            while( pEntry->msApiName && (i < 6) ) try
+            for( int i = 0; pEntry->msApiName && (i < 6); i++, pEntry++ )
             {
-                const OUString sAPIPropertyName( OUString(pEntry->msApiName, pEntry->nApiNameLength, RTL_TEXTENCODING_ASCII_US ) );
-                xProps->setPropertyValue( sAPIPropertyName, Any( maTemplateStylesUsed[i++] ) );
-                pEntry++;
+                try
+                {
+                    const OUString sAPIPropertyName( OUString(pEntry->msApiName, pEntry->nApiNameLength, RTL_TEXTENCODING_ASCII_US ) );
+                    xProps->setPropertyValue( sAPIPropertyName, Any( maTemplateStylesUsed[i] ) );
+                }
+                catch( Exception& )
+                {
+                    DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!");
+                }			
             }
-            catch( Exception& )
-            {
-                DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!");
-            }			
         }
 
         GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes );


More information about the ooo-build-commit mailing list