[Libreoffice-commits] .: Branch 'integration/dev300_m98' - sc/inc sc/source

Michael Meeks mmeeks at kemper.freedesktop.org
Tue Mar 8 05:11:27 PST 2011


 sc/inc/document.hxx                  |    7 ++-----
 sc/inc/funcdesc.hxx                  |    4 ++--
 sc/inc/sc.hrc                        |    2 +-
 sc/source/core/data/dpobject.cxx     |    5 -----
 sc/source/core/data/funcdesc.cxx     |    9 ++++-----
 sc/source/ui/app/inputwin.cxx        |   16 ----------------
 sc/source/ui/cctrl/dpcontrol.cxx     |    2 +-
 sc/source/ui/inc/anyrefdg.hxx        |    2 +-
 sc/source/ui/inc/datafdlg.hxx        |   13 +------------
 sc/source/ui/inc/docfunc.hxx         |    3 ---
 sc/source/ui/vba/excelvbahelper.cxx  |    5 ++++-
 sc/source/ui/vba/excelvbahelper.hxx  |   17 ++++++++++++++---
 sc/source/ui/vba/vbaapplication.cxx  |    5 +++++
 sc/source/ui/vba/vbaapplication.hxx  |    1 +
 sc/source/ui/vba/vbaeventshelper.cxx |   19 +++----------------
 sc/source/ui/vba/vbasheetobject.cxx  |    6 +++---
 sc/source/ui/vba/vbaworkbooks.cxx    |   13 ++++++-------
 17 files changed, 48 insertions(+), 81 deletions(-)

New commits:
commit 829b16c9f8a8f869ea0ae06f836c21fda824cd0a
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Tue Mar 8 13:07:34 2011 +0000

    lots of calc merging issues fixed

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d776560..ad67eb8 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -245,11 +245,6 @@ private:
     ScRangeName*		pRangeName;
     ScDBCollection*		pDBCollection;
     ScDPCollection*		pDPCollection;
-    // Wang Xu Ming -- 2009-8-17
-    // DataPilot Migration - Cache&&Performance
-    std::list<ScDPObject>        m_listDPObjectsInClip; 
-    std::list<ScDPTableDataCache*>   m_listDPObjectsCaches;
-    // End Comments
     ScChartCollection*	pChartCollection;
     std::auto_ptr< ScTemporaryChartLock > apTemporaryChartLock;
     ScPatternAttr*		pSelectionAttr;					// Attributes of a block
@@ -1509,6 +1504,8 @@ public:
 
     BOOL			ContinueOnlineSpelling();	// TRUE = found s.th.
 
+    void            RepaintRange( const ScRange& rRange );
+
     BOOL			IsIdleDisabled() const		{ return bIdleDisabled; }
     void			DisableIdle(BOOL bDo)		{ bIdleDisabled = bDo; }
 
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index 562f84c..94b1263 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -112,7 +112,7 @@ public:
 
       @return   help id of the function
     */
-    virtual long getHelpId() const ;
+    virtual ::rtl::OString getHelpId() const ;
 
     /**
       Returns number of arguments
@@ -207,7 +207,7 @@ public:
     sal_uInt16            nFIndex;                /**< Unique function index */
     sal_uInt16            nCategory;              /**< Function category */
     sal_uInt16            nArgCount;              /**< All parameter count, suppressed and unsuppressed */
-    sal_uInt16            nHelpId;                /**< HelpId of function */
+    rtl::OString          sHelpId;                /**< HelpID of function > */
     bool                  bIncomplete         :1; /**< Incomplete argument info (set for add-in info from configuration) */
     bool                  bHasSuppressedArgs  :1; /**< Whether there is any suppressed parameter. */
 };
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 2d01291..367807a 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -965,7 +965,7 @@
 #define SCSTR_RENAMEOBJECT	        (STR_START + 215)
 #define SCSTR_PRINT_OPTIONS             (STR_START + 216)
 #define SCSTR_WARN_ME_IN_FUTURE_CHECK   (STR_START + 217)
-#define SCSTR_PRINT_OPTIONS             (STR_START + 218)
+// #define SCSTR_PRINT_OPTIONS             (STR_START + 218)
 
 // Navigator - in der Reihenfolge wie SC_CONTENT_...
 #define SCSTR_CONTENT_ROOT		(STR_START + 250)
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 638e462..da6432d 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2638,11 +2638,6 @@ void ScDPObject::SetCacheId( long nCacheId )
     }
 }
 
-const ScDPTableDataCache* ScDPObject::GetCache() const
-{
-    return pDoc->GetDPObjectCache( GetCacheId() );
-}
-
 void ScDPCollection::FreeTable(ScDPObject* pDPObj)
 {
     const ScRange& rOutRange = pDPObj->GetOutRange();
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index e58cbe4..0c16be9 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -82,7 +82,6 @@ ScFuncDesc::ScFuncDesc() :
         nFIndex         (0),
         nCategory       (0),
         nArgCount       (0),
-        nHelpId         (0),
         bIncomplete     (false),
         bHasSuppressedArgs(false)
 {}
@@ -120,7 +119,7 @@ void ScFuncDesc::Clear()
 
     nFIndex = 0;
     nCategory = 0;
-    nHelpId = 0;
+    sHelpId = "";
     bIncomplete = false;
     bHasSuppressedArgs = false;
 }
@@ -338,9 +337,9 @@ void ScFuncDesc::initArgumentInfo()  const
     }
 }
 
-long ScFuncDesc::getHelpId() const
+rtl::OString ScFuncDesc::getHelpId() const
 {
-    return (long)nHelpId;
+    return sHelpId;
 }
 
 sal_uInt32 ScFuncDesc::getParameterCount() const
@@ -750,7 +749,7 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed )
 {
     rbSuppressed = (bool)GetNum();
     pDesc->nCategory = GetNum();
-    pDesc->nHelpId = GetNum() + 32768; //! Hack, see scfuncs.src
+    pDesc->sHelpId = ReadByteStringRes();
     pDesc->nArgCount = GetNum();
     sal_uInt16 nArgs = pDesc->nArgCount;
     if (nArgs >= VAR_ARGS)
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6055ea8..b1de6e3 100755
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1334,22 +1334,6 @@ void ScTextWnd::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextDat
         maAccTextDatas.erase( aIt );
 }
 
-void ScTextWnd::InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData )
-{
-    OSL_ENSURE( ::std::find( maAccTextDatas.begin(), maAccTextDatas.end(), &rTextData ) == maAccTextDatas.end(),
-        "ScTextWnd::InsertAccessibleTextData - passed object already registered" );
-    maAccTextDatas.push_back( &rTextData );
-}
-
-void ScTextWnd::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData )
-{
-    AccTextDataVector::iterator aEnd = maAccTextDatas.end();
-    AccTextDataVector::iterator aIt = ::std::find( maAccTextDatas.begin(), aEnd, &rTextData );
-    OSL_ENSURE( aIt != aEnd, "ScTextWnd::RemoveAccessibleTextData - passed object not registered" );
-    if( aIt != aEnd )
-        maAccTextDatas.erase( aIt );
-}
-
 // -----------------------------------------------------------------------
 
 void ScTextWnd::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 829ad7f..79fde76 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -36,8 +36,8 @@
 
 #include <vcl/outdev.hxx>
 #include <vcl/settings.hxx>
-#include <vcl/wintypes.hxx>
 #include <vcl/decoview.hxx>
+#include <tools/wintypes.hxx>
 #include "strload.hxx"
 #include "global.hxx"
 #include "scitems.hxx"
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 7e57f2b..04e01e4 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -29,7 +29,7 @@
 #ifndef SC_ANYREFDG_HXX
 #define SC_ANYREFDG_HXX
 
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
 #include <vcl/edit.hxx>
 #include <vcl/accel.hxx>
 #include <sfx2/basedlgs.hxx>
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index 46cdd9a..5eca114 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -29,20 +29,9 @@
 #ifndef SC_DATAFDLG_HXX
 #define SC_DATAFDLG_HXX
 
-
-#ifndef _SV_DIALOG_HXX //autogen
 #include <vcl/dialog.hxx>
-#endif
-
-#ifndef _SV_BUTTON_HXX //autogen
-#include <vcl/imagebtn.hxx>
-#endif
-
-#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
-#endif
-
-
 #include "global.hxx"
 
 #include <tabvwsh.hxx>
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 02a0c96..c0f161c 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -130,9 +130,6 @@ public:
     bool            SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
     bool            SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
 
-    bool            SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
-    bool            SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
-
     BOOL            SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi );
 
     BOOL            SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi );
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index bcb1fff..bd5ea87 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -35,6 +35,9 @@
 #include "transobj.hxx"
 #include "scmod.hxx"
 #include "cellsuno.hxx"
+#include "compiler.hxx"
+#include "token.hxx"
+#include "tokenarray.hxx"
 
 namespace ooo {
 namespace vba {
@@ -274,7 +277,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) thro
     // are *NO* special document module objects ( of course being able to switch between vba/non vba mode at
     // the document in the future could fix this, especially IF the switching of the vba mode takes care to
     // create the special document module objects if they don't exist.
-    uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xRange ) ), uno::UNO_QUERY );
+    uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xSheet ) ), uno::UNO_QUERY );
 
     return xParent;
 }
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index 48facfd..d152511 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -28,12 +28,15 @@
 #ifndef SC_EXCEL_VBA_HELPER_HXX
 #define SC_EXCEL_VBA_HELPER_HXX
 
-#include <vbahelper/vbahelper.hxx>
-#include "docsh.hxx"
+#include<vbahelper/vbahelper.hxx>
+#include <docsh.hxx>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/sheet/XDatabaseRanges.hpp>
+#include <com/sun/star/sheet/XDatabaseRange.hpp>
 #include <com/sun/star/table/XCellRange.hpp>
 #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
-#include <com/sun/star/sheet/XSpreadsheet.hpp>
 #include <ooo/vba/XHelperInterface.hpp>
+#include <formula/grammar.hxx>
 
 class ScCellRangesBase;
 
@@ -54,6 +57,13 @@ ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel
 ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
 SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
 
+sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const ::rtl::OUString& sRangeStr );
+formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAddress& sAddress, const css::uno::Any& aFormula );
+void CompileExcelFormulaToODF( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula );
+void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula, const formula::FormulaGrammar::Grammar eGrammar );
+css::uno::Reference< css::sheet::XDatabaseRanges > GetDataBaseRanges( ScDocShell* pShell ) throw ( css::uno::RuntimeException );
+css::uno::Reference< css::sheet::XDatabaseRange > GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet, rtl::OUString& sName ) throw ( css::uno::RuntimeException );
+
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet ) throw ( css::uno::RuntimeException );
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException );
@@ -61,6 +71,7 @@ css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const cs
 css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::frame::XModel >& xModel, SCTAB nTab ) throw ( css::uno::RuntimeException );
 
 ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+ScDocShell* GetDocShellFromRanges( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
 ScDocument* GetDocumentFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
 css::uno::Reference< css::frame::XModel > GetModelFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
 
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 7e6dbbd..85191df 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1346,6 +1346,11 @@ ScVbaApplication::Volatile( const uno::Any& aVolatile )  throw ( uno::RuntimeExc
     return;
 }
 
+void SAL_CALL
+ScVbaApplication::DoEvents() throw ( uno::RuntimeException )
+{
+}
+
 ::sal_Bool SAL_CALL
 ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
 {
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 3428785..362882d 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -134,6 +134,7 @@ public:
     virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicError
 Exception, css::uno::RuntimeException);
     virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorExce
 ption, css::uno::RuntimeException);
     virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) throw (css::uno::RuntimeException );
+    virtual void SAL_CALL DoEvents() throw (css::uno::RuntimeException);
     virtual css::uno::Any SAL_CALL Caller( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
     virtual css::uno::Any SAL_CALL MenuBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
     virtual css::uno::Any SAL_CALL GetOpenFilename( const css::uno::Any& FileFilter, const css::uno::Any& FilterIndex, const css::uno::Any& Title, const css::uno::Any& ButtonText, const css::uno::Any& MultiSelect ) throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index d24c484..1fe22d9 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -722,19 +722,6 @@ SCTAB ScVbaEventsHelper::getTabFromArgs( const uno::Sequence< uno::Any >& rArgs,
     throw lang::IllegalArgumentException();
 }
 
-bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException, uno::RuntimeException)
-{
-    uno::Reference< uno::XInterface > xNewSelection = getXSomethingFromArgs< uno::XInterface >( rArgs, nIndex, false );
-    if( ScCellRangesBase* pNewCellRanges = ScCellRangesBase::getImplementation( xNewSelection ) )
-    {
-        bool bChanged = maOldSelection != pNewCellRanges->GetRangeList();
-        maOldSelection = pNewCellRanges->GetRangeList();
-        return bChanged;
-    }
-    maOldSelection.RemoveAll();
-    return true;
-}
-
 namespace {
 
 /** Compares the passed range lists representing sheet selections. Ignores
@@ -742,13 +729,13 @@ namespace {
 bool lclSelectionChanged( const ScRangeList& rLeft, const ScRangeList& rRight )
 {
     // one of the range lists empty? -> return false, if both lists empty
-    bool bLeftEmpty = rLeft.Count() == 0;
-    bool bRightEmpty = rRight.Count() == 0;
+    bool bLeftEmpty = rLeft.count() == 0;
+    bool bRightEmpty = rRight.count() == 0;
     if( bLeftEmpty || bRightEmpty )
         return !(bLeftEmpty && bRightEmpty);
 
     // check sheet indexes of the range lists (assuming that all ranges in a list are on the same sheet)
-    if( rLeft.GetObject( 0 )->aStart.Tab() != rRight.GetObject( 0 )->aStart.Tab() )
+    if( rLeft[0]->aStart.Tab() != rRight[0]->aStart.Tab() )
         return false;
 
     // compare all ranges
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 140edd4..c33a8b6 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -248,7 +248,7 @@ sal_Int32 SAL_CALL ScVbaSheetObjectBase::getPlacement() throw (uno::RuntimeExcep
         SdrObject* pObj = pShape->GetSdrObject();
         if (pObj)
         {
-            ScAnchorType eType = ScDrawLayer::GetAnchor(pObj);
+            ScAnchorType eType = ScDrawLayer::GetAnchorType(pObj);
             if (eType == SCA_PAGE)
                 nRet = excel::XlPlacement::xlFreeFloating;
         }
@@ -269,8 +269,8 @@ void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 nPlacement ) throw (
                 eType = SCA_PAGE;
 
             // xlMove is not supported, treated as SCA_CELL (xlMoveAndSize)
-
-            ScDrawLayer::SetAnchor(pObj, eType);
+            //            ScDrawLayer::SetAnchor(pObj, eType);
+            // FIXME: implement me for new anchoring methods ...
         }
     }
 }
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 2a98679..ab30d51 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -222,7 +222,9 @@ ScVbaWorkbooks::createCollectionObject( const css::uno::Any& aSource )
 uno::Any SAL_CALL
 ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
 {
-    uno::Reference< sheet::XSpreadsheetDocument > xSpreadDoc;
+    uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
+
+    // need to set up the document modules ( and vba mode ) here
     sal_Int32 nWorkbookType = 0;
     ::rtl::OUString aTemplateFileName;
     if( Template >>= nWorkbookType )
@@ -230,7 +232,6 @@ ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
         // nWorkbookType is a constant from XlWBATemplate (added in Excel 2007)
         // TODO: create chart-sheet if supported by Calc
 
-        xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
         // create a document with one sheet only
         uno::Reference< sheet::XSpreadsheets > xSheets( xSpreadDoc->getSheets(), uno::UNO_SET_THROW );
         uno::Reference< container::XIndexAccess > xSheetsIA( xSheets, uno::UNO_QUERY_THROW );
@@ -243,12 +244,10 @@ ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
     else if( Template >>= aTemplateFileName )
     {
         // TODO: create document from template
-        xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
     }
     else if( !Template.hasValue() )
     {
         // regular spreadsheet document with configured number of sheets
-        xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
     }
     else
     {
@@ -256,7 +255,7 @@ ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
         throw uno::RuntimeException();
     }
 
-    // need to set up the document modules ( and vba mode ) here                                
+    // need to set up the document modules ( and vba mode ) here
     setUpDocumentModules( xSpreadDoc );
     if( xSpreadDoc.is() )
         return getWorkbook( mxContext, xSpreadDoc, mxParent );
@@ -266,7 +265,7 @@ ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
 void SAL_CALL
 ScVbaWorkbooks::Close() throw (uno::RuntimeException)
 {
-    closeDocuments();
+    VbaDocumentsBase::Close();
 }
 
 bool
@@ -385,7 +384,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
     else if ( !isSpreadSheetFile( sType ) )
         throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() );
     
-    uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
+    uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Open( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
     uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent );
     uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY );
     if ( xWBook.is() )


More information about the Libreoffice-commits mailing list