[Libreoffice-commits] core.git: 9 commits - filter/source officecfg/registry sc/inc sc/Library_sc.mk sc/sdi sc/source sc/uiconfig sfx2/inc sfx2/source svx/inc svx/sdi

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Mar 14 17:32:28 PDT 2013


 filter/source/config/fragments/filters/chart8.xcu                    |    2 
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu    |   31 ---
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |    5 
 sc/Library_sc.mk                                                     |    1 
 sc/inc/xmlwrap.hxx                                                   |   13 +
 sc/sdi/tabvwsh.sdi                                                   |    1 
 sc/source/ui/app/drwtrans.cxx                                        |    2 
 sc/source/ui/app/transobj.cxx                                        |    2 
 sc/source/ui/docshell/docsh.cxx                                      |   47 ++++
 sc/source/ui/drawfunc/fuins2.cxx                                     |   95 ++++------
 sc/source/ui/inc/docsh.hxx                                           |    2 
 sc/source/ui/inc/fuinsert.hxx                                        |   16 -
 sc/source/ui/view/tabvwshb.cxx                                       |   16 +
 sc/uiconfig/scalc/menubar/menubar.xml                                |    3 
 sfx2/inc/guisaveas.hxx                                               |    2 
 sfx2/inc/sfx2/objsh.hxx                                              |    6 
 sfx2/source/doc/guisaveas.cxx                                        |   42 +++-
 sfx2/source/doc/objstor.cxx                                          |   51 ++++-
 sfx2/source/doc/sfxbasemodel.cxx                                     |    2 
 svx/inc/svx/svxids.hrc                                               |    1 
 svx/sdi/svx.sdi                                                      |   25 ++
 21 files changed, 253 insertions(+), 112 deletions(-)

New commits:
commit ff6c2e720ba3eb42636b0e7f2ad1981537658d39
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Mar 14 23:25:31 2013 +0100

    remove some unnecessary lines
    
    Change-Id: I0a83769f19a38fd5c0421ba6117603517cded17b

diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index f5a8aeb..95e589d 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -61,9 +61,6 @@
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
 #include <cppuhelper/bootstrap.hxx>
 
-#include <com/sun/star/embed/XEmbeddedObjectCreator.hpp>
-#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
-
 using namespace ::com::sun::star;
 // BM/IHA --
 
@@ -792,16 +789,10 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, Window* p
     OUString aName;
     uno::Reference< embed::XEmbeddedObject > xObj = rObjContainer.InsertEmbeddedObject( xStorage, aName );
 
-    uno::Reference< ::com::sun::star::chart2::data::XDataReceiver > xReceiver;
-    uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY );
-    if( xCompSupp.is())
-        xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
-
     const sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
     awt::Size aSz = xObj->getVisualAreaSize( nAspect );
     Size aSize( aSz.Width, aSz.Height );
 
-    MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
     ScRange aPositionRange = pViewSh->GetViewData()->GetCurPos();
     Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
     Rectangle aRect (aStart, aSize);
@@ -818,7 +809,6 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, Window* p
     pView->MarkObj( pObj, pPV );
 
     pViewShell->ActivateObject( (SdrOle2Obj*) pObj, SVVERB_SHOW );
-
 }
 
 void FuInsertChartFromFile::Activate()
commit 4517bb391afea870f856e030d8b1e5e8ee9364ac
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Mar 14 23:20:48 2013 +0100

    first step for Insert->Chart From File
    
    This needs some tweaks but it looks like we are already able to choose
    the chart and import it. There are some more tweaks needed to handle
    internal vs. external data provider, errors, other components, ...
    
    Change-Id: Ib3e7f8bbf7b7f49b071d85120930624e2add91a7

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index bad0084..b03d7d4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -380,6 +380,11 @@
                     <value xml:lang="en-US">Ch~art...</value>
                 </prop>
             </node>
+            <node oor:name=".uno:InsertObjectChartFromFile" oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">Load Chart From File</value>
+                </prop>
+            </node>
             <node oor:name=".uno:StarChartDialog" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">Ch~art...</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index be30696..74b99f1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -2131,6 +2131,11 @@
                     <value>1</value>
                 </prop>
             </node>
+            <node oor:name=".uno:InsertObjectChartFromFile" oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">Chart from File</value>
+                </prop>
+            </node>
             <node oor:name=".uno:DefaultBullet" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">Bullets On/Off</value>
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 05459a0..7bbdfca 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -113,6 +113,7 @@ interface BaseSelection
     SID_FM_CREATE_CONTROL   [ ExecMethod = ExecDraw ; ]
     SID_LINKS               [ ExecMethod = ExecDrawIns; StateMethod = GetDrawInsState; ]
     SID_DRAW_CHART          [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+    SID_INSERT_DIAGRAM_FROM_FILE [ ExecMethod = ExecDrawIns; StateMethod = GetDrawState; ]
     SID_FM_CREATE_FIELDCONTROL [ ExecMethod = ExecDrawIns ; ]
 
     // } Einfuegen von Objekten
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 30cdc7d..f5a8aeb 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -61,6 +61,9 @@
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
 #include <cppuhelper/bootstrap.hxx>
 
+#include <com/sun/star/embed/XEmbeddedObjectCreator.hpp>
+#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
+
 using namespace ::com::sun::star;
 // BM/IHA --
 
@@ -776,5 +779,57 @@ void FuInsertChart::Deactivate()
     FuPoor::Deactivate();
 }
 
+FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
+           SdrModel* pDoc, SfxRequest& rReq, const OUString& rURL):
+    FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
+{
+    uno::Reference< io::XInputStream > xStorage = comphelper::OStorageHelper::GetInputStreamFromURL(
+            rURL, comphelper::getProcessComponentContext());
+
+    comphelper::EmbeddedObjectContainer& rObjContainer =
+        pViewShell->GetObjectShell()->GetEmbeddedObjectContainer();
+
+    OUString aName;
+    uno::Reference< embed::XEmbeddedObject > xObj = rObjContainer.InsertEmbeddedObject( xStorage, aName );
+
+    uno::Reference< ::com::sun::star::chart2::data::XDataReceiver > xReceiver;
+    uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY );
+    if( xCompSupp.is())
+        xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
+
+    const sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
+    awt::Size aSz = xObj->getVisualAreaSize( nAspect );
+    Size aSize( aSz.Width, aSz.Height );
+
+    MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
+    ScRange aPositionRange = pViewSh->GetViewData()->GetCurPos();
+    Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
+    Rectangle aRect (aStart, aSize);
+    SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect);
+
+    pSkipPaintObj = pObj;
+
+    SdrPageView* pPV = pView->GetSdrPageView();
+
+    // use the page instead of the view to insert, so no undo action is created yet
+    SdrPage* pInsPage = pPV->GetPage();
+    pInsPage->InsertObject( pObj );
+    pView->UnmarkAllObj();
+    pView->MarkObj( pObj, pPV );
+
+    pViewShell->ActivateObject( (SdrOle2Obj*) pObj, SVVERB_SHOW );
+
+}
+
+void FuInsertChartFromFile::Activate()
+{
+    FuPoor::Activate();
+}
+
+void FuInsertChartFromFile::Deactivate()
+{
+    FuPoor::Deactivate();
+}
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuinsert.hxx b/sc/source/ui/inc/fuinsert.hxx
index a4eb584..26e2a89 100644
--- a/sc/source/ui/inc/fuinsert.hxx
+++ b/sc/source/ui/inc/fuinsert.hxx
@@ -58,7 +58,7 @@ class FuInsertChartFromFile : public FuPoor
 {
  public:
     FuInsertChartFromFile( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
-           SdrModel* pDoc, SfxRequest& rReq);
+           SdrModel* pDoc, SfxRequest& rReq, const OUString& rURL);
 
     virtual void Activate();
     virtual void Deactivate();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 2765f71..b1fc8d3 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -59,6 +59,9 @@
 #include "drawview.hxx"
 #include "ChartRangeSelectionListener.hxx"
 
+#include <tools/urlobj.hxx>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+
 using namespace com::sun::star;
 
 // STATIC DATA -----------------------------------------------------------
@@ -301,6 +304,19 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
             FuInsertOLE(this, pWin, pView, pDrModel, rReq);
             break;
 
+        case SID_INSERT_DIAGRAM_FROM_FILE:
+            {
+                sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+                        0, OUString("com.sun.star.chart2.ChartDocument"));
+                if(aDlg.Execute() == ERRCODE_NONE )
+                {
+                    INetURLObject aURLObj( aDlg.GetPath() );
+                    OUString aURL = aURLObj.GetURLNoPass();
+                    FuInsertChartFromFile(this, pWin, pView, pDrModel, rReq, aURL);
+                }
+            }
+            break;
+
         case SID_OBJECTRESIZE:
             {
                 //          Der Server moechte die Clientgrosse verandern
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 0544210..de494d5 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -214,9 +214,10 @@
                     <menu:menuitem menu:id=".uno:InsertSound"/>
                     <menu:menuitem menu:id=".uno:InsertVideo"/>
                     <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+                    <menu:menuitem menu:id=".uno:InsertObjectChart"/>
+                    <menu:menuitem menu:id=".uno:InsertObjectChartFromFile"/>
                 </menu:menupopup>
             </menu:menu>
-            <menu:menuitem menu:id=".uno:InsertObjectChart"/>
             <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
         </menu:menupopup>
     </menu:menu>
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index 43411c8..e92b3da 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -333,6 +333,7 @@
 #define SID_OBJECT_ALIGN_UP                             ( SID_SVX_START + 134 )
 #define SID_OBJECT_ALIGN_MIDDLE                         ( SID_SVX_START + 135 )
 #define SID_OBJECT_ALIGN_DOWN                           ( SID_SVX_START + 136 )
+#define SID_INSERT_DIAGRAM_FROM_FILE                    ( SID_SVX_START + 139 )
 #define SID_INSERT_DIAGRAM                              ( SID_SVX_START + 140 )
 #define SID_DRAW_CHART                                      SID_INSERT_DIAGRAM
 #define SID_INSERT_TABLE                                ( SID_SVX_START + 141 )
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index a0b4f85..c432a52 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -6449,6 +6449,31 @@ SfxVoidItem InsertObjectChart SID_INSERT_DIAGRAM
 ]
 
 //--------------------------------------------------------------------------
+SfxVoidItem InsertObjectChartFromFile SID_INSERT_DIAGRAM_FROM_FILE
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Asynchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = TRUE,
+    GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
 SfxVoidItem InsertPlugin SID_INSERT_PLUGIN
 (SfxStringItem ClassLocation FN_PARAM_2,
  SfxStringItem Commands FN_PARAM_3)
commit b327b0dc2724958acce6e1df1620c1a919ea6bf8
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Mar 13 02:20:27 2013 +0100

    remove empty destructor
    
    the base class destructor is already virtual
    
    Change-Id: Iab38666fab3a8ef33e2fd1ee1c53754ef50f5481

diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 74ad734..30cdc7d 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -426,10 +426,6 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
         rReq.Ignore();
 }
 
-FuInsertOLE::~FuInsertOLE()
-{
-}
-
 void FuInsertOLE::Activate()
 {
     FuPoor::Activate();
@@ -770,10 +766,6 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
     }
 }
 
-FuInsertChart::~FuInsertChart()
-{
-}
-
 void FuInsertChart::Activate()
 {
     FuPoor::Activate();
diff --git a/sc/source/ui/inc/fuinsert.hxx b/sc/source/ui/inc/fuinsert.hxx
index 7df16dd..a4eb584 100644
--- a/sc/source/ui/inc/fuinsert.hxx
+++ b/sc/source/ui/inc/fuinsert.hxx
@@ -39,7 +39,6 @@ class FuInsertOLE : public FuPoor
  public:
     FuInsertOLE( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
            SdrModel* pDoc, SfxRequest& rReq);
-    virtual ~FuInsertOLE();
 
     virtual void Activate();
     virtual void Deactivate();
@@ -50,7 +49,16 @@ class FuInsertChart : public FuPoor
  public:
     FuInsertChart( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
            SdrModel* pDoc, SfxRequest& rReq);
-    virtual ~FuInsertChart();
+
+    virtual void Activate();
+    virtual void Deactivate();
+};
+
+class FuInsertChartFromFile : public FuPoor
+{
+ public:
+    FuInsertChartFromFile( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+           SdrModel* pDoc, SfxRequest& rReq);
 
     virtual void Activate();
     virtual void Deactivate();
commit c07d31125a395727ebfb1d62d9b9008c74ca15ae
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Mar 13 02:15:17 2013 +0100

    remove unnecessary ascii art
    
    Change-Id: If554782930a8cf35fa4366d8f92020f1c7b5cbd3

diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 5aa268f..74ad734 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -196,12 +196,6 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
 
 }
 
-/*************************************************************************
-|*
-|* FuInsertOLE::Konstruktor
-|*
-\************************************************************************/
-
 FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
            SdrModel* pDoc, SfxRequest& rReq)
     : FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
@@ -432,44 +426,20 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
         rReq.Ignore();
 }
 
-/*************************************************************************
-|*
-|* FuInsertOLE::Destruktor
-|*
-\************************************************************************/
-
 FuInsertOLE::~FuInsertOLE()
 {
 }
 
-/*************************************************************************
-|*
-|* FuInsertOLE::Function aktivieren
-|*
-\************************************************************************/
-
 void FuInsertOLE::Activate()
 {
     FuPoor::Activate();
 }
 
-/*************************************************************************
-|*
-|* FuInsertOLE::Function deaktivieren
-|*
-\************************************************************************/
-
 void FuInsertOLE::Deactivate()
 {
     FuPoor::Deactivate();
 }
 
-/*************************************************************************
-|*
-|* FuInsertChart::Konstruktor
-|*
-\************************************************************************/
-
 FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
            SdrModel* pDoc, SfxRequest& rReq)
     : FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
@@ -800,33 +770,15 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
     }
 }
 
-/*************************************************************************
-|*
-|* FuInsertChart::Destruktor
-|*
-\************************************************************************/
-
 FuInsertChart::~FuInsertChart()
 {
 }
 
-/*************************************************************************
-|*
-|* FuInsertChart::Function aktivieren
-|*
-\************************************************************************/
-
 void FuInsertChart::Activate()
 {
     FuPoor::Activate();
 }
 
-/*************************************************************************
-|*
-|* FuInsertChart::Function deaktivieren
-|*
-\************************************************************************/
-
 void FuInsertChart::Deactivate()
 {
     FuPoor::Deactivate();
diff --git a/sc/source/ui/inc/fuinsert.hxx b/sc/source/ui/inc/fuinsert.hxx
index 6aeedea..7df16dd 100644
--- a/sc/source/ui/inc/fuinsert.hxx
+++ b/sc/source/ui/inc/fuinsert.hxx
@@ -34,8 +34,6 @@ class FuInsertGraphic : public FuPoor
     virtual void Deactivate();
 };
 
-/************************************************************************/
-
 class FuInsertOLE : public FuPoor
 {
  public:
@@ -47,8 +45,6 @@ class FuInsertOLE : public FuPoor
     virtual void Deactivate();
 };
 
-/************************************************************************/
-
 class FuInsertChart : public FuPoor
 {
  public:
@@ -60,8 +56,6 @@ class FuInsertChart : public FuPoor
     virtual void Deactivate();
 };
 
-/************************************************************************/
-
 class FuInsertMedia : public FuPoor
 {
  public:
commit 70cfeaf1e2a0b4b741c6914e79c76e8c9f4430f0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Mar 12 19:04:34 2013 +0100

    let the translators handle these strings
    
    Change-Id: I240ab25258cb66786cd8882c8c4e1da5e30f8863

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 3bd69a9..bad0084 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -377,33 +377,7 @@
             </node>
             <node oor:name=".uno:InsertObjectChart" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="de">D~iagramm...</value>
                     <value xml:lang="en-US">Ch~art...</value>
-                    <value xml:lang="ar">...رسم بياني</value>
-                    <value xml:lang="no">Ch~art...</value>
-                    <value xml:lang="ca">Diag~rama...</value>
-                    <value xml:lang="zh-TW">圖表(~A)...</value>
-                    <value xml:lang="cs">Graf...</value>
-                    <value xml:lang="da">D~iagram...</value>
-                    <value xml:lang="el">Δ~ιάγραμμα...</value>
-                    <value xml:lang="es">~Diagrama...</value>
-                    <value xml:lang="fi">~Kaavio...</value>
-                    <value xml:lang="fr">~Diagramme...</value>
-                    <value xml:lang="he">D~iagramm...</value>
-                    <value xml:lang="it">~Diagramma...</value>
-                    <value xml:lang="ja">グラフ(~A)...</value>
-                    <value xml:lang="ko">차트(~A)...</value>
-                    <value xml:lang="nl">~Diagram...</value>
-                    <value xml:lang="pl">Wykr~es...</value>
-                    <value xml:lang="pt-BR">~Gráfico...</value>
-                    <value xml:lang="ru">Диаграмма...</value>
-                    <value xml:lang="sk">Gr~af...</value>
-                    <value xml:lang="sv">~Diagram...</value>
-                    <value xml:lang="th">แผน~ภูมิ...</value>
-                    <value xml:lang="tr">Åžema...</value>
-                    <value xml:lang="hi">चा~र्ट...</value>
-                    <value xml:lang="zh-CN">图表(~A)...</value>
-                    <value xml:lang="pt">~Gráfico...</value>
                 </prop>
             </node>
             <node oor:name=".uno:StarChartDialog" oor:op="replace">
commit 3a5c97a32f8b2464297fa7ca46cde0a51d7ba88f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Mar 7 14:20:48 2013 +0100

    fix indentation
    
    Change-Id: Ia2f7ccc2a9ccc888dfef5d5bf0cb366b1b3ba981

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 29905f5..45262eb 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1524,7 +1524,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
                 aSuggestedDir = aModelData.GetDocProps().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsDir" ) ), ::rtl::OUString() );
         }
 
-    aSuggestedName = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsName" ) ), ::rtl::OUString() );
+        aSuggestedName = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsName" ) ), ::rtl::OUString() );
         if ( aSuggestedName.isEmpty() )
             aSuggestedName = aModelData.GetDocProps().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsName" ) ), ::rtl::OUString() );
 
commit 1b54ea0fb976d0dd322f833cab83afc1a12c5582
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Mar 7 12:58:41 2013 +0100

    use a scoped_ptr here
    
    Change-Id: Iac59e450521b427c5ddb77cb944dd12ef4bb0cea

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 092bf89..29905f5 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -922,7 +922,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
         aDialogFlags = SFXWB_EXPORT;
     }
 
-    sfx2::FileDialogHelper* pFileDlg = NULL;
+    boost::scoped_ptr<sfx2::FileDialogHelper> pFileDlg;
 
     ::rtl::OUString aDocServiceName = GetDocServiceName();
     DBG_ASSERT( !aDocServiceName.isEmpty(), "No document service for this module set!" );
@@ -941,13 +941,13 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
                                                         ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                                         ::rtl::OUString() );
 
-            pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf" ) ), rStandardDir, rBlackList );
+            pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf" ) ), rStandardDir, rBlackList ));
             pFileDlg->SetCurrentFilter( aFilterUIName );
         }
         else
         {
             // This is the normal dialog
-            pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList );
+            pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList ));
         }
 
         if ( aDocServiceName == "com.sun.star.drawing.DrawingDocument" )
@@ -978,7 +978,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
     else
     {
         // This is the normal dialog
-        pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList );
+        pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList ));
         pFileDlg->CreateMatcher( aDocServiceName );
     }
 
@@ -1066,7 +1066,6 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
     String aStringTypeFN;
     if ( pFileDlg->Execute( pDialogParams, aStringTypeFN ) != ERRCODE_NONE )
     {
-        delete pFileDlg;
         throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
     }
 
@@ -1166,8 +1165,6 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
         }
     }
 
-    delete pFileDlg;
-
     // merge in results of the dialog execution
     GetMediaDescr()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))] <<=
                                                 ::rtl::OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ));
commit ff98426745b76fef17e78d75f9b18b26ebc69a74
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Mar 15 01:22:13 2013 +0100

    initial work on an odc export
    
    We can now export a chart to odc when we are in chart edit mode from
    Calc. I need to add support for it to Writer and Impress as well.
    
    We can already open these files but copy&paste from the opened file
    fails. The next step is then to add a new menu entry
    Insert->Object->Chart from file
    
    Change-Id: I14d1702e79517e7319a1929de2be5501d375885d

diff --git a/filter/source/config/fragments/filters/chart8.xcu b/filter/source/config/fragments/filters/chart8.xcu
index 6b0a183..36c4e4a 100644
--- a/filter/source/config/fragments/filters/chart8.xcu
+++ b/filter/source/config/fragments/filters/chart8.xcu
@@ -16,7 +16,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
     <node oor:name="chart8" oor:op="replace">
-        <prop oor:name="Flags"><value>IMPORT EXPORT OWN DEFAULT NOTINFILEDIALOG NOTINCHOOSER PREFERRED ENCRYPTION</value></prop>
+        <prop oor:name="Flags"><value>IMPORT EXPORT OWN DEFAULT PREFERRED ENCRYPTION</value></prop>
         <prop oor:name="UIComponent"/>
         <prop oor:name="FilterService"><value>com.sun.star.comp.chart2.XMLFilter</value></prop>
         <prop oor:name="UserData"><value>XML</value></prop>
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 0295e74..066e0b6 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -298,6 +298,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 	sc/source/filter/xml/xmlsubti \
 	sc/source/filter/xml/xmltabi \
 	sc/source/filter/xml/xmlwrap \
+	sc/source/filter/chart/chart_imp \
 	sc/source/ui/Accessibility/AccessibilityHints \
 	sc/source/ui/Accessibility/AccessibleCell \
 	sc/source/ui/Accessibility/AccessibleCellBase \
diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index 42ab215..b4b505c 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -23,6 +23,7 @@
 #include <tools/solar.h>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/frame/XModel.hpp>
 
 class ScDocument;
 class SfxMedium;
@@ -71,6 +72,18 @@ public:
     sal_Bool Export(sal_Bool bStylesOnly);
 };
 
+class ScXMLChartExportWrapper
+{
+public:
+    ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed );
+    bool Export();
+
+private:
+    com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
+    ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > mxStorage;
+    SfxMedium& mrMedium;
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index c0fb8ab..1fdd9e3 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -578,7 +578,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
                         ::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE );
 
                     // write document storage
-                    pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false );
+                    pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false, false );
 
                     // mba: no relative ULRs for clipboard!
                     SfxMedium aMedium( xWorkStore, String() );
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 103f64f..5325fac 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -446,7 +446,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
                     ::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE );
 
                 // write document storage
-                pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false );
+                pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false, false );
 
                 // mba: no relative ULRs for clipboard!
                 SfxMedium aMedium( xWorkStore, String() );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index c56d010..150c269 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -47,6 +47,16 @@
 #include <com/sun/star/task/XJob.hpp>
 #include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
 #include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/table/XTableChartsSupplier.hpp>
+#include <com/sun/star/table/XTableCharts.hpp>
+#include <com/sun/star/table/XTableChart.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
+#include <com/sun/star/frame/XStorable2.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
 
 #include "scabstdlg.hxx"
 #include <sot/formats.hxx>
@@ -493,6 +503,29 @@ sal_Bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::un
     return bRet;
 }
 
+bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium )
+{
+    bool bRet = false;
+
+    try
+    {
+
+        uno::Reference< lang::XComponent > xCurrentComponent = frame::Desktop::create( comphelper::getProcessComponentContext() )->getCurrentComponent();
+
+        uno::Reference< frame::XStorable2 > xStorable( xCurrentComponent, uno::UNO_QUERY_THROW );
+
+        uno::Reference< frame::XModel > xChartDoc ( xCurrentComponent, uno::UNO_QUERY_THROW );
+
+        ScXMLChartExportWrapper aExport( xChartDoc, rMedium );
+        bRet = aExport.Export();
+    }
+    catch(...)
+    {
+        SAL_WARN("sc", "exception thrown while saving chart. Bug!!!");
+    }
+    return bRet;
+}
+
 sal_Bool ScDocShell::Load( SfxMedium& rMedium )
 {
     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" );
@@ -1584,10 +1617,20 @@ sal_Bool ScDocShell::SaveAs( SfxMedium& rMedium )
 
     PrepareSaveGuard aPrepareGuard( *this);
 
+    OUString aFltName = rMedium.GetFilter()->GetFilterName();
+    bool bChartExport = aFltName.indexOf("chart8") != -1;
+
     //  wait cursor is handled with progress bar
-    sal_Bool bRet = SfxObjectShell::SaveAs( rMedium );
-    if( bRet )
+    sal_Bool bRet = false;
+    if(!bChartExport)
+    {
+        bRet = SfxObjectShell::SaveAs( rMedium );
         bRet = SaveXML( &rMedium, NULL );
+    }
+    else
+    {
+        bRet = SaveCurrentChart( rMedium );
+    }
 
     return bRet;
 }
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 010ea82..55054f8 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -139,6 +139,8 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
     SC_DLLPRIVATE sal_Bool            SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
     SC_DLLPRIVATE SCTAB         GetSaveTab();
 
+    SC_DLLPRIVATE bool SaveCurrentChart( SfxMedium& rMedium );
+
     SC_DLLPRIVATE sal_uLong         DBaseImport( const String& rFullFileName, CharSet eCharSet,
                                              ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc );
     SC_DLLPRIVATE sal_uLong DBaseExport(
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 73a1934..7e34147 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -569,10 +569,12 @@ public:
     virtual void    SetModified( sal_Bool bModified = sal_True );
     sal_Bool        IsModified();
 
+    /**
+     * @param bChart true if the file is a chart doc and FillClass should not be called
+     */
     void            SetupStorage(
                         const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
-                        sal_Int32 nVersion,
-                        sal_Bool bTemplate ) const;
+                        sal_Int32 nVersion, sal_Bool bTemplate, bool bChart = false ) const;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetStorage();
 
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 727e817..092bf89 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -87,6 +87,10 @@
 #include <svtools/sfxecode.hxx>
 #include "../appl/app.hrc"
 
+#include <boost/scoped_ptr.hpp>
+
+#include <com/sun/star/frame/Desktop.hpp>
+
 // flags that specify requested operation
 #define EXPORT_REQUESTED            1
 #define PDFEXPORT_REQUESTED         2
@@ -322,6 +326,29 @@ ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner,
 , m_bRecommendReadOnly( sal_False )
 {
     CheckInteractionHandler();
+    rtl::OUString sModuleName;
+    try
+    {
+        uno::Reference< lang::XComponent > xCurrentComponent = frame::Desktop::create( comphelper::getProcessComponentContext() )->getCurrentComponent();
+        sModuleName = aOwner.GetModuleManager()->identify(xCurrentComponent);
+        if(sModuleName == "com.sun.star.chart2.ChartDocument")
+        {
+            // let us switch the model and set the xStorable and
+            // XStorable2 to the old model.
+            // This is an ugly hack because we have no SfxObjectShell for chart2 yet.
+            // We need SfxObjectShell for the heavy work around ODF document creation
+            // because chart2 only writes the basic stream out.
+            // In future in might make sense to implement a full scale object shell in
+            // chart2 and make chart2 an own program.
+            m_xModel = uno::Reference< frame::XModel >(xCurrentComponent, uno::UNO_QUERY_THROW );
+            m_xStorable = uno::Reference< frame::XStorable >(xModel, uno::UNO_QUERY_THROW );
+            m_xStorable2 = uno::Reference< frame::XStorable2 >(xModel, uno::UNO_QUERY_THROW );
+        }
+    }
+    catch(...)
+    {
+        // we don't want to pass on any errors;
+    }
 }
 
 //-------------------------------------------------------------------------
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index e352b5a..15828e1 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -305,10 +305,38 @@ SvGlobalName SfxObjectShell::GetClassName() const
     return GetFactory().GetClassId();
 }
 
+namespace {
+
+/**
+ * Chart2 does not have an Object shell, so handle this here for now
+ * If we ever implement a full scale object shell in chart2 move it there
+ */
+sal_uInt32 GetChartVersion( sal_Int32 nVersion, bool bTemplate )
+{
+    if( nVersion == SOFFICE_FILEFORMAT_60)
+    {
+        return SOT_FORMATSTR_ID_STARCHART_60;
+    }
+    else if( nVersion == SOFFICE_FILEFORMAT_8)
+    {
+        if (bTemplate)
+        {
+            SAL_WARN("sfx2", "no chart template support yet");
+            return SOT_FORMATSTR_ID_STARCHART_8;
+        }
+        else
+            return SOT_FORMATSTR_ID_STARCHART_8;
+    }
+
+    SAL_WARN("sfx2", "unsupported version");
+    return 0;
+}
+
+}
+
 //-------------------------------------------------------------------------
 void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xStorage,
-                                   sal_Int32 nVersion,
-                                   sal_Bool bTemplate ) const
+                                   sal_Int32 nVersion, sal_Bool bTemplate, bool bChart ) const
 {
     uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY );
 
@@ -318,7 +346,11 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
         OUString aFullTypeName, aShortTypeName, aAppName;
         sal_uInt32 nClipFormat=0;
 
-        FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate );
+        if(!bChart)
+            FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate );
+        else
+            nClipFormat = GetChartVersion(nVersion, bTemplate);
+
         if ( nClipFormat )
         {
             // basic doesn't have a ClipFormat
@@ -421,7 +453,7 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage
                     return sal_False;
                 }
 
-                SetupStorage( xStorage, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+                SetupStorage( xStorage, SOFFICE_FILEFORMAT_CURRENT, sal_False, false );
             }
         }
         catch ( uno::Exception& )
@@ -1874,7 +1906,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
             if ( !(a>>=aMediaType) || aMediaType.isEmpty() )
             {
                 OSL_FAIL( "The mediatype must be set already!\n" );
-                SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+                SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False, false );
             }
 
             pImp->bIsSaving = sal_False;
@@ -3017,7 +3049,12 @@ sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
         // OASIS templates have own mediatypes ( SO7 also actually, but it is to late to use them here )
         sal_Bool bTemplate = ( rMedium.GetFilter()->IsOwnTemplateFormat() && nVersion > SOFFICE_FILEFORMAT_60 );
 
-        SetupStorage( xStorage, nVersion, bTemplate );
+        const SfxFilter* pFilter = rMedium.GetFilter();
+        bool bChart = false;
+        if(pFilter->GetName() == OUString("chart8"))
+            bChart = true;
+
+        SetupStorage( xStorage, nVersion, bTemplate, bChart );
 #ifndef DISABLE_SCRIPTING
         if ( HasBasic() )
         {
@@ -3043,7 +3080,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
             pImp->m_xDocStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
             OSL_ENSURE( pImp->m_xDocStorage.is(), "The method must either return storage or throw an exception!" );
 
-            SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+            SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, sal_False, false );
             pImp->m_bCreateTempStor = sal_False;
             SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
         }
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 608214df..08e9b9f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3760,7 +3760,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const uno::Reference< XSTORAGE >& xS
     {
         // TODO/LATER: if the provided storage has some data inside the storing might fail, probably the storage must be truncated
         // TODO/LATER: is it possible to have a template here?
-        m_pData->m_pObjectShell->SetupStorage( xStorage, nVersion, sal_False );
+        m_pData->m_pObjectShell->SetupStorage( xStorage, nVersion, sal_False, false );
 
         // BaseURL is part of the ItemSet
         SfxMedium aMedium( xStorage, String(), &aSet );
commit ca4d16429ab0d060b8e894fc6363b75ba82c80b0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Mar 7 09:20:45 2013 +0100

    let us pass this parameter by value
    
    Change-Id: I1430da4ee9ff87b1fb549a43115aa8fe41c76343

diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
index 9d63290..906e22f 100644
--- a/sfx2/inc/guisaveas.hxx
+++ b/sfx2/inc/guisaveas.hxx
@@ -58,7 +58,7 @@ public:
     SfxStoringHelper();
 
     sal_Bool GUIStoreModel(
-                    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
+                    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel,
                     const ::rtl::OUString& aSlotName,
                     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
                     sal_Bool bPreselectPassword,
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index ecf930b..727e817 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1324,7 +1324,7 @@ uno::Reference< ::com::sun::star::frame::XModuleManager2 > SfxStoringHelper::Get
 }
 
 //-------------------------------------------------------------------------
-sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel,
+sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel,
                                             const ::rtl::OUString& aSlotName,
                                             uno::Sequence< beans::PropertyValue >& aArgsSequence,
                                             sal_Bool bPreselectPassword,


More information about the Libreoffice-commits mailing list