summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/attarray.cxx6
-rw-r--r--sc/source/core/tool/chartlis.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx4
-rw-r--r--sc/source/ui/vba/testvba/testvba.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.hxx4
-rw-r--r--sc/source/ui/vba/vbaformatconditions.hxx2
-rw-r--r--sc/source/ui/vba/vbaoutline.cxx2
-rw-r--r--sc/source/ui/vba/vbapane.hxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.hxx4
-rw-r--r--sc/source/ui/vba/vbastyle.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx1
14 files changed, 18 insertions, 19 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index e9793ae4d722..32b442faeb57 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -234,14 +234,14 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
BOOL ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
{
- long nLo = 0;
long nHi = static_cast<long>(nCount) - 1;
- long nStartRow = 0;
- long nEndRow = 0;
long i = 0;
BOOL bFound = (nCount == 1);
if (pData)
{
+ long nLo = 0;
+ long nStartRow = 0;
+ long nEndRow = 0;
while ( !bFound && nLo <= nHi )
{
i = (nLo + nHi) / 2;
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index b752d8bfccde..dede0311b327 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -336,7 +336,6 @@ public:
endListening(aRange);
}
}
-
private:
void startListening(const ScRange& rRange)
{
@@ -353,7 +352,6 @@ private:
else
mpDoc->EndListeningArea(rRange, &mrParent);
}
-
private:
ScDocument* mpDoc;
ScChartListener& mrParent;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 02c23670a743..9baac8c6b05b 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -4206,7 +4206,6 @@ static void lcl_GetLastMatch( SCSIZE& rIndex, const VectorMatrixAccessor& rMat,
void ScInterpreter::ScMatch()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMatch" );
- ScMatrixRef pMatSrc = NULL;
BYTE nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
@@ -4222,6 +4221,7 @@ void ScInterpreter::ScMatch()
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
+ ScMatrixRef pMatSrc = NULL;
switch (GetStackType())
{
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 9183dd6dc751..a6ee4ce71cb8 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -69,10 +69,10 @@ private:
USHORT ScDelimiterTable::GetCode( const String& rDel ) const
{
sal_Unicode nCode = 0;
- xub_StrLen i = 0;
if ( nCount >= 2 )
{
+ xub_StrLen i = 0;
while ( i<nCount )
{
if ( rDel == theDelTab.GetToken( i, cSep ) )
@@ -93,10 +93,10 @@ USHORT ScDelimiterTable::GetCode( const String& rDel ) const
String ScDelimiterTable::GetDelimiter( sal_Unicode nCode ) const
{
String aStrDel;
- xub_StrLen i = 0;
if ( nCount >= 2 )
{
+ xub_StrLen i = 0;
while ( i<nCount )
{
if ( nCode == (sal_Unicode) theDelTab.GetToken( i+1, cSep ).ToInt32() )
diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx
index ee7b86269bc7..7235fb494e2c 100644
--- a/sc/source/ui/vba/testvba/testvba.cxx
+++ b/sc/source/ui/vba/testvba/testvba.cxx
@@ -120,7 +120,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
return sLogLocation;
}
- void init()
+ void init() const
{
// blow away previous logs?
}
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 705f79ed42f9..9276a0e52c15 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -96,7 +96,7 @@ ScVbaChart::getName() throw (css::uno::RuntimeException)
{
xProps->getPropertyValue( CHART_NAME ) >>= sName;
}
- catch( uno::Exception e ) // swallow exceptions
+ catch( uno::Exception & ) // swallow exceptions
{
}
return sName;
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index a0cee5d04a29..4c83fe8c05e6 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -69,12 +69,12 @@ friend class ScVbaAxis;
bool hasMarkers() throw ( css::script::BasicErrorException );
sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) throw ( css::script::BasicErrorException );
void assignDiagramAttributes();
- void setDefaultSeriesDescriptionLabels(){}
+ void setDefaultSeriesDescriptionLabels() const {}
public:
ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart );
// Non-interface
- css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() { return mxDiagramPropertySet; }
+ css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() const { return mxDiagramPropertySet; }
bool isSeriesIndexValid(sal_Int32 _seriesindex) throw( css::script::BasicErrorException );
bool areIndicesValid(sal_Int32 _seriesindex, sal_Int32 _valindex) throw ( css::script::BasicErrorException );
void setSeriesName(sal_Int32 _index, rtl::OUString _sname) throw ( css::script::BasicErrorException );
diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx
index dea8f4c45a62..192f9cdc5005 100644
--- a/sc/source/ui/vba/vbaformatconditions.hxx
+++ b/sc/source/ui/vba/vbaformatconditions.hxx
@@ -50,7 +50,7 @@ public:
rtl::OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException );
rtl::OUString getStyleName();
void removeFormatCondition( const rtl::OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( css::script::BasicErrorException );
- css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() { return mxSheetConditionalEntries; }
+ css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() const { return mxSheetConditionalEntries; }
// XFormatConditions
virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaoutline.cxx b/sc/source/ui/vba/vbaoutline.cxx
index b42d81052d15..caf506cdf73b 100644
--- a/sc/source/ui/vba/vbaoutline.cxx
+++ b/sc/source/ui/vba/vbaoutline.cxx
@@ -32,9 +32,9 @@ using namespace ::ooo::vba;
void
ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevels ) throw (uno::RuntimeException)
{
- sal_Int16 nLevel = 0;
if (mxOutline.is())
{
+ sal_Int16 nLevel = 0;
if (RowLevels >>= nLevel)
{
mxOutline->showLevel(nLevel, table::TableOrientation_ROWS);
diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx
index 27a9c3529545..1590ace30b81 100644
--- a/sc/source/ui/vba/vbapane.hxx
+++ b/sc/source/ui/vba/vbapane.hxx
@@ -44,7 +44,7 @@ public:
const css::uno::Reference< css::frame::XModel >& xModel,
const css::uno::Reference< css::sheet::XViewPane > xViewPane ) throw (css::uno::RuntimeException);
- css::uno::Reference< css::sheet::XViewPane > getViewPane() { return m_xViewPane; }
+ css::uno::Reference< css::sheet::XViewPane > getViewPane() const { return m_xViewPane; }
// XPane attributes
virtual sal_Int32 SAL_CALL getScrollColumn() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 445a08b7ee4d..dd746eb57aec 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -5394,10 +5394,10 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
// default to include the number of Rows in the source range;
SCCOLROW nSourceCount = ( sourceRange.aEnd.Row() - sourceRange.aStart.Row() ) + 1;
- SCCOLROW nCount = 0;
if ( sourceRange != destRange )
{
+ SCCOLROW nCount = 0;
// Find direction of fill, vertical or horizontal
if ( sourceRange.aStart == destRange.aStart )
{
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index fe59cc5034f2..778713ce9910 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -197,8 +197,8 @@ public:
virtual void SAL_CALL setShowDetail(const css::uno::Any& aShowDetail) throw (css::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::ooo::vba::excel::XQueryTable > SAL_CALL getQueryTable() throw (::com::sun::star::uno::RuntimeException); //09-09-16 add by limingl
// Methods
- sal_Bool IsRows() { return mbIsRows; }
- sal_Bool IsColumns() { return mbIsColumns; }
+ sal_Bool IsRows() const { return mbIsRows; }
+ sal_Bool IsColumns() const { return mbIsColumns; }
virtual css::uno::Reference< ov::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Clear() throw (css::uno::RuntimeException);
virtual void SAL_CALL ClearComments() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index 83d72dd99c05..c32b0ed7ff09 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -133,7 +133,7 @@ ScVbaStyle::getNameLocal() throw (script::BasicErrorException, uno::RuntimeExcep
{
mxPropertySet->getPropertyValue(DISPLAYNAME) >>= sName;
}
- catch (uno::Exception e)
+ catch (uno::Exception &e)
{
DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() );
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index e744023568da..07ba413a4c2d 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -193,6 +193,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
eAttrOrient ( SVX_ORIENTATION_STANDARD ),
eAttrHorJust( SVX_HOR_JUSTIFY_STANDARD ),
eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ),
+ nAscentPixel(0),
eAttrHorJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
eAttrVerJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
pMargin ( NULL ),