[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 3 09:34:41 PDT 2010


 sc/source/core/tool/docoptio.cxx    |    3 ++-
 sc/source/filter/excel/xeescher.cxx |    3 +++
 sc/source/filter/excel/xiname.cxx   |    2 +-
 sc/source/filter/xcl97/xcl97rec.cxx |    8 +++++---
 sc/source/ui/vba/excelvbahelper.cxx |    2 +-
 sc/source/ui/view/viewfunc.cxx      |    2 +-
 6 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 2803c076d8899ca72687c73258edd789b6f5a56f
Author: René Kjellerup <rk.katana.steel at gmail.com>
Date:   Wed Nov 3 12:33:38 2010 -0400

    Warning free sc module

diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 50fb8cb..4813d8c 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -385,7 +385,7 @@ ScDocCfg::ScDocCfg() :
     aValues = aCalcItem.GetProperties(aNames);
     aCalcItem.EnableNotification(aNames);
     pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -631,6 +631,7 @@ IMPL_LINK( ScDocCfg, FormulaCommitHdl, void *, EMPTYARG )
                 {
                     case ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1:    nVal = 1; break;
                     case ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1:  nVal = 2; break;
+                    default: break;
                 }
                 pValues[nProp] <<= nVal;
             }
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 43abdbe..e930a86 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -117,6 +117,8 @@ using ::oox::drawingml::ChartExport;
 
 #define  HMM2XL(x)        ((x)/26.5)+0.5
 
+#ifdef XLSX_OOXML_FUTURE
+// these function are only used within that context
 // Static Function Helpers
 static const char *ToHorizAlign( SdrTextHorzAdjust eAdjust )
 {
@@ -167,6 +169,7 @@ static void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr rComments, Rectan
     rComments->writeEscaped( OUString::valueOf( aRect.Bottom() ) );
     rComments->endElement( FSNS( XML_xdr, XML_rowOff ) );
 }
+#endif
 
 static void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, INT32 nTab, Rectangle &aFrom, Rectangle &aTo )
 {
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 26f6c44..a7726a1 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -232,7 +232,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
                 // discard deleted ranges ( for the moment at least )
                 if ( pData->IsValidReference( aRange ) )
                 {
-                    ScExtTabSettings& rTabSett = GetExtDocOptions().GetOrCreateTabSettings( nXclTab );
+                    /* ScExtTabSettings& rTabSett = */ GetExtDocOptions().GetOrCreateTabSettings( nXclTab );
                     // create a mapping between the unmodified localname to
                     // the name in the global name container for named ranges
                     OSL_TRACE(" mapping local name to global name for tab %d which exists? %s", nXclTab, GetDoc().HasTable( mnScTab ) ? "true" : "false" );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 6564c7a..eee05ba 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -103,9 +103,9 @@ sal_Int32 XclExpObjList::mnVmlCount;
 
 XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx ) :
     XclExpRoot( rRoot ),
+    mnScTab( rRoot.GetCurrScTab() ),
     mrEscherEx( rEscherEx ),
-    pSolverContainer( 0 ),
-    mnScTab( rRoot.GetCurrScTab() )
+    pSolverContainer( 0 )
 {
     pMsodrawingPerSheet = new XclExpMsoDrawing( rEscherEx );
     // open the DGCONTAINER and the patriarch group shape
@@ -972,6 +972,8 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const XclObjAny& rObj )
     WriteFromTo( rStrm, rObj.GetShape(), rObj.GetTab() );
 }
 
+/* is this function (WritePicPr) exported or only local, if such I'll remove it */
+/*
 static void
 WritePicPr( sax_fastparser::FSHelperPtr pDrawing, sal_Int32 nId, Reference< XPropertySet > xPropSet )
 {
@@ -1006,7 +1008,7 @@ WritePicPr( sax_fastparser::FSHelperPtr pDrawing, sal_Int32 nId, Reference< XPro
     pDrawing->endElement( FSNS( XML_xdr, XML_cNvPicPr ) );
     pDrawing->endElement( FSNS( XML_xdr, XML_nvPicPr ) );
 }
-
+*/
 
 static const char*
 GetEditAs( XclObjAny& rObj )
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 3ca5ba8..b3213a7 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -377,7 +377,7 @@ void CompileExcelFormulaToODF( ScDocument* pDoc, const String& rOldFormula, Stri
     }
     ScCompiler aCompiler( pDoc, ScAddress() );
     aCompiler.SetGrammar( excel::GetFormulaGrammar( pDoc, ScAddress(), uno::Any( rtl::OUString( rOldFormula ) ) ) );
-    ScTokenArray* pCode = aCompiler.CompileString( rOldFormula );
+    /* ScTokenArray* pCode = */ aCompiler.CompileString( rOldFormula ); // ignore the return ?
     aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_PODF_A1 );
     aCompiler.CreateStringFromTokenArray( rNewFormula );
 }
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index e928f68..42713bd 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -409,7 +409,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
                     ++nUndoPos;
                 }
 
-            DBG_ASSERT( nUndoPos==nSelCount, "nUndoPos!=nSelCount" );
+            OSL_ENSURE( nUndoPos==nSelCount, "nUndoPos!=nSelCount" );
 
             pUndoData = ( pData ? pData->Clone() : NULL );
         }


More information about the Libreoffice-commits mailing list