Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hi

I looked in to the warnings in 'sc' and changed a few things around to
satisfy the compiler ^_^

I haven't said so yet, but I'll let you choose the licensing best fitted for
all my contributions.
(general guideline: the same as the code I've modified ;))

comments are most welcome.

René
-- 
-- as life grows older, I gain experience.
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 50fb8cb..54ac0fd 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..fa11a8e 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..2c90d80 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..8561687 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 );
         }

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.