You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/08/20 13:46:47 UTC
svn commit: r1374979 [15/29] - in /incubator/ooo/branches/writer001: ./
ext_libraries/apr-util/ ext_libraries/apr-util/prj/ ext_libraries/apr/
ext_libraries/coinmp/ ext_libraries/hunspell/ ext_libraries/serf/
ext_libraries/serf/prj/ ext_sources/ extras...
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_memchrt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_memchrt.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_memchrt.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_memchrt.cxx Mon Aug 20 11:46:19 2012
@@ -49,6 +49,7 @@
#include <functional>
#include <algorithm>
+
namespace binfilter {
// ========================================
@@ -162,14 +163,14 @@ namespace binfilter {
/*N*/ {
/*N*/ nRowCnt = nRows;
/*N*/ nColCnt = nCols;
-/*N*/ pData = new double[nColCnt * nRowCnt];
-/*N*/
-/*N*/ pRowNumFmtId= new sal_Int32 [nRowCnt];
-/*N*/ pColNumFmtId= new sal_Int32 [nColCnt];
+ pData = ArrayHelper< double >::create_short_size( nColCnt, nRowCnt );
+
+ pRowNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nRowCnt );
+ pColNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nColCnt );
/*N*/ InitNumFmt();
-/*N*/
-/*N*/ pRowTable = new sal_Int32 [nRowCnt];
-/*N*/ pColTable = new sal_Int32 [nColCnt];
+
+ pRowTable = ArrayHelper< sal_Int32 >::create_short_size( nRowCnt );
+ pColTable = ArrayHelper< sal_Int32 >::create_short_size( nColCnt );
/*N*/ ResetTranslation(pRowTable,nRowCnt);
/*N*/ ResetTranslation(pColTable,nColCnt);
/*N*/
@@ -182,8 +183,29 @@ namespace binfilter {
/*N*/ *(pFill ++) = 0.0;
/*N*/ }
/*N*/
-/*N*/ pColText = new String[nColCnt];
-/*N*/ pRowText = new String[nRowCnt];
+ pColText = ArrayHelper< String >::create_short_size( nColCnt );
+ pRowText = ArrayHelper< String >::create_short_size( nRowCnt );
+
+ if ( !pData || !pRowNumFmtId || !pColNumFmtId || !pRowTable || !pColTable || !pColText || !pRowText )
+ {
+ delete[] pData;
+ pData = 0;
+ delete[] pRowNumFmtId;
+ pRowNumFmtId = 0;
+ delete[] pColNumFmtId;
+ pColNumFmtId = 0;
+ delete[] pRowTable;
+ pRowTable = 0;
+ delete[] pColTable;
+ pColTable = 0;
+ delete[] pColText;
+ pColText = 0;
+ delete[] pRowText;
+ pRowText = 0;
+
+ nRowCnt = 0;
+ nColCnt = 0;
+ }
/*N*/ }
/*************************************************************************
|*
@@ -207,10 +229,20 @@ namespace binfilter {
/*N*/ long nRows=MIN(nRowCnt,rMemChart.nRowCnt);
/*N*/
/*N*/ short i;
-/*N*/ for (i = 0; i < nCols; i++)
-/*N*/ pColText[i] = rMemChart.pColText[i];
-/*N*/ for (i = 0; i < nRows; i++)
-/*N*/ pRowText[i] = rMemChart.pRowText[i];
+ if ( pColText )
+ {
+ for ( i = 0; i < nCols; i++ )
+ {
+ pColText[i] = rMemChart.pColText[i];
+ }
+ }
+ if ( pRowText )
+ {
+ for ( i = 0; i < nRows; i++ )
+ {
+ pRowText[i] = rMemChart.pRowText[i];
+ }
+ }
/*N*/
/*N*/ // copy chart range
/*N*/ SetChartRange( rMemChart.GetChartRange());
@@ -245,28 +277,34 @@ namespace binfilter {
/*N*/ aSomeData2 = ((SchMemChart&) rMemChart).SomeData2 ();
/*N*/ aSomeData3 = ((SchMemChart&) rMemChart).SomeData3 ();
/*N*/ aSomeData4 = ((SchMemChart&) rMemChart).SomeData4 ();
-/*N*/ pData = new double[nColCnt * nRowCnt];
-/*N*/
-/*N*/ pRowNumFmtId= new sal_Int32 [nRowCnt];
-/*N*/ pColNumFmtId= new sal_Int32 [nColCnt];
-/*N*/ pRowTable = new sal_Int32 [nRowCnt];
-/*N*/ pColTable = new sal_Int32 [nColCnt];
+ pData = ArrayHelper< double >::create_short_size( nColCnt, nRowCnt );
+
+ pRowNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nRowCnt );
+ pColNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nColCnt );
+ pRowTable = ArrayHelper< sal_Int32 >::create_short_size( nRowCnt );
+ pColTable = ArrayHelper< sal_Int32 >::create_short_size( nColCnt );
/*N*/
/*N*/ aAppLink = rMemChart.aAppLink;
/*N*/ nLastSelInfoReturn = rMemChart.nLastSelInfoReturn;
/*N*/
/*N*/ nTranslated = rMemChart.nTranslated;
/*N*/ long i;
-/*N*/ for(i=0;i<nColCnt;i++)
-/*N*/ {
-/*N*/ pColTable[i] = rMemChart.pColTable[i];
-/*N*/ pColNumFmtId[i] = rMemChart.pColNumFmtId[i];
-/*N*/ }
-/*N*/ for(i=0;i<nRowCnt;i++)
-/*N*/ {
-/*N*/ pRowTable[i] = rMemChart.pRowTable[i];
-/*N*/ pRowNumFmtId[i] = rMemChart.pRowNumFmtId[i];
-/*N*/ }
+ if ( pColTable && pColNumFmtId )
+ {
+ for ( i = 0; i < nColCnt; i++ )
+ {
+ pColTable[i] = rMemChart.pColTable[i];
+ pColNumFmtId[i] = rMemChart.pColNumFmtId[i];
+ }
+ }
+ if ( pRowTable && pRowNumFmtId )
+ {
+ for ( i = 0; i < nRowCnt; i++ )
+ {
+ pRowTable[i] = rMemChart.pRowTable[i];
+ pRowNumFmtId[i] = rMemChart.pRowNumFmtId[i];
+ }
+ }
/*N*/ mpNumFormatter=rMemChart.mpNumFormatter;
/*N*/
/*N*/ if (pData)
@@ -279,15 +317,23 @@ namespace binfilter {
/*N*/ *(pDest ++) = *(pSource ++);
/*N*/ }
/*N*/
-/*N*/ pColText = new String[nColCnt];
-/*N*/
-/*N*/ for (i = 0; i < nColCnt; i++)
-/*N*/ pColText[i] = rMemChart.pColText[i];
-/*N*/
-/*N*/ pRowText = new String[nRowCnt];
-/*N*/
-/*N*/ for (i = 0; i < nRowCnt; i++)
-/*N*/ pRowText[i] = rMemChart.pRowText[i];
+ pColText = ArrayHelper< String >::create_short_size( nColCnt );
+ if ( pColText )
+ {
+ for ( i = 0; i < nColCnt; i++ )
+ {
+ pColText[i] = rMemChart.pColText[i];
+ }
+ }
+
+ pRowText = ArrayHelper< String >::create_short_size( nRowCnt );
+ if ( pRowText )
+ {
+ for ( i = 0; i < nRowCnt; i++ )
+ {
+ pRowText[i] = rMemChart.pRowText[i];
+ }
+ }
/*N*/
/*N*/ bReadOnly = rMemChart.bReadOnly; // bm #69410#
/*N*/
@@ -297,6 +343,27 @@ namespace binfilter {
/*N*/
/*N*/ // copy chart range
/*N*/ SetChartRange( rMemChart.GetChartRange());
+
+ if ( !pData || !pRowNumFmtId || !pColNumFmtId || !pRowTable || !pColTable || !pColText || !pRowText )
+ {
+ delete[] pData;
+ pData = 0;
+ delete[] pRowNumFmtId;
+ pRowNumFmtId = 0;
+ delete[] pColNumFmtId;
+ pColNumFmtId = 0;
+ delete[] pRowTable;
+ pRowTable = 0;
+ delete[] pColTable;
+ pColTable = 0;
+ delete[] pColText;
+ pColText = 0;
+ delete[] pRowText;
+ pRowText = 0;
+
+ nRowCnt = 0;
+ nColCnt = 0;
+ }
/*N*/ }
//Überprüft, ob die Umordnung/Translation OK ist, Fehlerfall, wenn :
@@ -311,7 +378,7 @@ namespace binfilter {
/*N*/ BOOL SchMemChart::VerifyTranslation()
/*N*/ {
/*N*/ //Fehler ?
-/*N*/ if(nTranslated!=TRANS_COL)
+/*N*/ if(nTranslated!=TRANS_COL && pColTable)
/*N*/ {
/*N*/ for(long nCol=0;nCol<nColCnt;nCol++)
/*N*/ {
@@ -331,7 +398,7 @@ namespace binfilter {
/*N*/ }
/*N*/ }
/*N*/ }
-/*N*/ if(nTranslated!=TRANS_ROW)
+/*N*/ if(nTranslated!=TRANS_ROW && pRowTable)
/*N*/ {
/*N*/ for(long nRow=0;nRow<nRowCnt;nRow++)
/*N*/ {
@@ -353,7 +420,7 @@ namespace binfilter {
/*N*/ }
/*N*/
/*N*/ // Sortierung besteht noch ?
-/*N*/ if(nTranslated==TRANS_ROW)
+/*N*/ if(nTranslated==TRANS_ROW && pRowTable)
/*N*/ {
/*?*/ for(long nRow=0;nRow<nRowCnt;nRow++)
/*?*/ {
@@ -361,7 +428,7 @@ namespace binfilter {
/*?*/ return TRUE;
/*?*/ }
/*N*/ }
-/*N*/ if(nTranslated==TRANS_COL)
+/*N*/ if(nTranslated==TRANS_COL && pColTable)
/*N*/ {
/*?*/ for(long nCol=0;nCol<nColCnt;nCol++)
/*?*/ {
@@ -383,32 +450,84 @@ namespace binfilter {
/*N*/ double SchMemChart::GetTransData(long nCol,long nRow)
/*N*/ {
/*N*/ DBG_ASSERT(VerifyTranslation(), "Translation table corrupted in MemChart");
+ if ( !pColTable || !pRowTable || !IsValidColumn( nCol ) || !IsValidRow( nRow ) )
+ {
+ return DBL_MIN;
+ }
/*N*/ return GetData( (short)pColTable[nCol], (short)pRowTable[nRow]);
/*N*/ }
/*N*/ double SchMemChart::GetTransDataInPercent(long nCol, long nRow, BOOL bRowData) const
/*N*/ {
/*N*/ DBG_ASSERT(((SchMemChart*)this)->VerifyTranslation(), "Translation table corrupted in MemChart");
+ if ( !pColTable || !pRowTable || !IsValidColumn( nCol ) || !IsValidRow( nRow ) )
+ {
+ return DBL_MIN;
+ }
/*N*/ return GetDataInPercent( (short)pColTable[nCol], (short)pRowTable[nRow], bRowData);
/*N*/ }
/*N*/ const String& SchMemChart::GetTransColText(long nCol) const
/*N*/ {
/*N*/ DBG_ASSERT(((SchMemChart*)this)->VerifyTranslation(), "Translation table corrupted in MemChart");
+ if ( !pColTable || !IsValidColumn( nCol ) )
+ {
+ return String::EmptyString();
+ }
/*N*/ return GetColText( (short)pColTable[nCol] );
/*N*/ }
/*N*/ const String& SchMemChart::GetTransRowText(long nRow) const
/*N*/ {
/*N*/ DBG_ASSERT(((SchMemChart*)this)->VerifyTranslation(), "Translation table corrupted in MemChart");
+ if ( !pRowTable || !IsValidRow( nRow ) )
+ {
+ return String::EmptyString();
+ }
/*N*/ return GetRowText( (short)pRowTable[nRow] );
/*N*/ }
/*N*/ long SchMemChart::GetTransNumFormatIdRow(const long nRow) const
/*N*/ {
/*N*/ DBG_ASSERT(((SchMemChart*)this)->VerifyTranslation(), "Translation table corrupted in MemChart");
-/*N*/ return ( nTranslated == TRANS_ROW )? pRowNumFmtId[ pRowTable[ nRow ]]: pRowNumFmtId[ nRow ];
+ if ( pRowNumFmtId && IsValidRow( nRow ) )
+ {
+ if ( nTranslated == TRANS_ROW )
+ {
+ if ( pRowTable )
+ {
+ long nTransRow = pRowTable[ nRow ];
+ if ( IsValidRow( nTransRow ) )
+ {
+ return pRowNumFmtId[ nTransRow ];
+ }
+ }
+ }
+ else
+ {
+ return pRowNumFmtId[ nRow ];
+ }
+ }
+ return NUMBERFORMAT_UNDEFINED;
/*N*/ }
/*N*/ long SchMemChart::GetTransNumFormatIdCol(const long nCol) const
/*N*/ {
/*N*/ DBG_ASSERT(((SchMemChart*)this)->VerifyTranslation(), "Translation table corrupted in MemChart");
-/*N*/ return ( nTranslated == TRANS_COL ) ? pColNumFmtId[ pColTable[ nCol ]]: pColNumFmtId[ nCol ];
+ if ( pColNumFmtId && IsValidColumn( nCol ) )
+ {
+ if ( nTranslated == TRANS_COL )
+ {
+ if ( pColTable )
+ {
+ long nTransCol = pColTable[ nCol ];
+ if ( IsValidColumn( nTransCol ) )
+ {
+ return pColNumFmtId[ nTransCol ];
+ }
+ }
+ }
+ else
+ {
+ return pColNumFmtId[ nCol ];
+ }
+ }
+ return NUMBERFORMAT_UNDEFINED;
/*N*/ }
@@ -470,9 +589,16 @@ namespace binfilter {
/*N*/ double *pOut = rMemChart.pData;
/*N*/
/*N*/ short i;
-/*N*/ for (i = 0; i < rMemChart.nColCnt; i++)
-/*N*/ for (short j = 0; j < rMemChart.nRowCnt; j++)
-/*N*/ rOut << *(pOut ++);
+ if ( pOut )
+ {
+ for ( i = 0; i < rMemChart.nColCnt; i++ )
+ {
+ for ( short j = 0; j < rMemChart.nRowCnt; j++ )
+ {
+ rOut << *(pOut ++);
+ }
+ }
+ }
/*N*/
/*N*/ rOut << (INT16)aSysCharSet;
/*N*/ rOut.WriteByteString( rMemChart.aMainTitle );
@@ -481,21 +607,41 @@ namespace binfilter {
/*N*/ rOut.WriteByteString( rMemChart.aYAxisTitle );
/*N*/ rOut.WriteByteString( rMemChart.aZAxisTitle );
/*N*/
-/*N*/ for (i = 0; i < rMemChart.nColCnt; i++)
-/*N*/ rOut.WriteByteString( rMemChart.pColText[ i ] );
-/*N*/
-/*N*/ for (i = 0; i < rMemChart.nRowCnt; i++)
-/*N*/ rOut.WriteByteString( rMemChart.pRowText[ i ] );
+ if ( rMemChart.pColText )
+ {
+ for ( i = 0; i < rMemChart.nColCnt; i++ )
+ {
+ rOut.WriteByteString( rMemChart.pColText[ i ] );
+ }
+ }
+
+ if ( rMemChart.pRowText )
+ {
+ for ( i = 0; i < rMemChart.nRowCnt; i++ )
+ {
+ rOut.WriteByteString( rMemChart.pRowText[ i ] );
+ }
+ }
/*N*/
/*N*/ rOut << (INT16)rMemChart.eDataType;
/*N*/
/*N*/ //IOVersion = 1
/*N*/ long nIndex;
-/*N*/ for (nIndex = 0; nIndex < rMemChart.nColCnt; nIndex++)
-/*N*/ rOut << rMemChart.pColTable[nIndex];
-/*N*/
-/*N*/ for (nIndex = 0; nIndex < rMemChart.nRowCnt; nIndex++)
-/*N*/ rOut << rMemChart.pRowTable[nIndex];
+ if ( rMemChart.pColTable )
+ {
+ for ( nIndex = 0; nIndex < rMemChart.nColCnt; nIndex++ )
+ {
+ rOut << rMemChart.pColTable[nIndex];
+ }
+ }
+
+ if ( rMemChart.pRowTable )
+ {
+ for ( nIndex = 0; nIndex < rMemChart.nRowCnt; nIndex++ )
+ {
+ rOut << rMemChart.pRowTable[nIndex];
+ }
+ }
/*N*/
/*N*/ //IOVersion = 2
/*N*/ rOut << rMemChart.nTranslated;
@@ -516,17 +662,36 @@ namespace binfilter {
/*N*/
/*N*/ SchIOCompat aIO(rIn, STREAM_READ);
/*N*/
-/*N*/ rIn >> nInt16; rMemChart.nColCnt = (short)nInt16;
-/*N*/ rIn >> nInt16; rMemChart.nRowCnt = (short)nInt16;
-/*N*/
-/*N*/ rMemChart.pData = new double[rMemChart.nColCnt * rMemChart.nRowCnt];
-/*N*/
-/*N*/ double *pIn = rMemChart.pData;
-/*N*/
-/*N*/ short i;
-/*N*/ for (i = 0; i < rMemChart.nColCnt; i++)
-/*N*/ for (short j = 0; j < rMemChart.nRowCnt; j++)
-/*N*/ rIn >> *(pIn ++);
+ short nCols=0;
+ short nRows=0;
+/*N*/ rIn >> nInt16; nCols = static_cast<short>(nInt16);
+/*N*/ rIn >> nInt16; nRows = static_cast<short>(nInt16);
+/*N*/
+ double* pTmpData = ArrayHelper< double >::create_short_size( nCols, nRows );
+ if ( !pTmpData )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
+
+ rMemChart.nColCnt = nCols;
+ rMemChart.nRowCnt = nRows;
+
+ delete[] rMemChart.pData;
+ rMemChart.pData = pTmpData;
+
+ short i;
+ double *pIn = rMemChart.pData;
+ if ( pIn )
+ {
+ for ( i = 0; i < rMemChart.nColCnt; i++ )
+ {
+ for ( short j = 0; j < rMemChart.nRowCnt; j++ )
+ {
+ rIn >> *(pIn ++);
+ }
+ }
+ }
/*N*/
/*N*/ INT16 nCharSet;
/*N*/ rIn >> nCharSet;
@@ -541,35 +706,75 @@ namespace binfilter {
/*N*/ rIn.ReadByteString( rMemChart.aYAxisTitle );
/*N*/ rIn.ReadByteString( rMemChart.aZAxisTitle );
/*N*/
-/*N*/ rMemChart.pColText = new String[rMemChart.nColCnt];
-/*N*/
-/*N*/ for (i = 0; i < rMemChart.nColCnt; i++)
-/*N*/ {
-/*N*/ rIn.ReadByteString( rMemChart.pColText[ i ] );
-/*N*/ }
-/*N*/
-/*N*/ rMemChart.pRowText = new String[rMemChart.nRowCnt];
-/*N*/
-/*N*/ for (i = 0; i < rMemChart.nRowCnt; i++)
-/*N*/ {
-/*N*/ rIn.ReadByteString( rMemChart.pRowText[ i ] );
-/*N*/ }
+ delete[] rMemChart.pColText;
+ rMemChart.pColText = ArrayHelper< String >::create_short_size( rMemChart.nColCnt );
+ if ( !rMemChart.pColText )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
+ for ( i = 0; i < rMemChart.nColCnt; i++ )
+ {
+ rIn.ReadByteString( rMemChart.pColText[ i ] );
+ }
+
+ delete[] rMemChart.pRowText;
+ rMemChart.pRowText = ArrayHelper< String >::create_short_size( rMemChart.nRowCnt );
+ if ( !rMemChart.pRowText )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
+ for ( i = 0; i < rMemChart.nRowCnt; i++ )
+ {
+ rIn.ReadByteString( rMemChart.pRowText[ i ] );
+ }
/*N*/
/*N*/ rIn >> nInt16; rMemChart.eDataType = (short)nInt16;
/*N*/
-/*N*/ rMemChart.pRowNumFmtId = new sal_Int32 [rMemChart.nRowCnt];
-/*N*/ rMemChart.pColNumFmtId = new sal_Int32 [rMemChart.nColCnt];
-/*N*/ rMemChart.pRowTable = new sal_Int32 [rMemChart.nRowCnt];
-/*N*/ rMemChart.pColTable = new sal_Int32 [rMemChart.nColCnt];
+ delete[] rMemChart.pRowNumFmtId;
+ rMemChart.pRowNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( rMemChart.nRowCnt );
+ if ( !rMemChart.pRowNumFmtId )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
+
+ delete[] rMemChart.pColNumFmtId;
+ rMemChart.pColNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( rMemChart.nColCnt );
+ if ( !rMemChart.pColNumFmtId )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
+
+ delete[] rMemChart.pRowTable;
+ rMemChart.pRowTable = ArrayHelper< sal_Int32 >::create_short_size( rMemChart.nRowCnt );
+ if ( !rMemChart.pRowTable )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
+
+ delete[] rMemChart.pColTable;
+ rMemChart.pColTable = ArrayHelper< sal_Int32 >::create_short_size( rMemChart.nColCnt );
+ if ( !rMemChart.pColTable )
+ {
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return rIn;
+ }
/*N*/
/*N*/ if(aIO.GetVersion()>=1)
/*N*/ {
/*N*/ long i;
-/*N*/ for (i = 0; i < rMemChart.nColCnt; i++)
-/*N*/ rIn >> rMemChart.pColTable[i];
-/*N*/
-/*N*/ for (i = 0; i < rMemChart.nRowCnt; i++)
-/*N*/ rIn >> rMemChart.pRowTable[i];
+ for ( i = 0; i < rMemChart.nColCnt; i++ )
+ {
+ rIn >> rMemChart.pColTable[i];
+ }
+ for ( i = 0; i < rMemChart.nRowCnt; i++ )
+ {
+ rIn >> rMemChart.pRowTable[i];
+ }
/*N*/
/*N*/ if(aIO.GetVersion()>=2)
/*N*/ rIn >> rMemChart.nTranslated;
@@ -603,11 +808,21 @@ namespace binfilter {
/*N*/ void SchMemChart::InitNumFmt()
/*N*/ {
/*N*/ long i;
-/*N*/ for(i=0;i<nColCnt;i++)
-/*N*/ pColNumFmtId[i]=-1; //uninitialised!
-/*N*/
-/*N*/ for(i=0;i<nRowCnt;i++)
-/*N*/ pRowNumFmtId[i]=-1;
+ if ( pColNumFmtId )
+ {
+ for ( i = 0; i < nColCnt; i++ )
+ {
+ pColNumFmtId[i] = -1; //uninitialised!
+ }
+ }
+
+ if ( pRowNumFmtId )
+ {
+ for ( i = 0; i < nRowCnt; i++ )
+ {
+ pRowNumFmtId[i] = -1;
+ }
+ }
/*N*/ }
/*************************************************************************
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sd/util/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sd/util/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sd/util/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sd/util/makefile.mk Mon Aug 20 11:46:19 2012
@@ -140,7 +140,6 @@ $(MISC)$/$(SHL1TARGET).def:
@echo ------------------------------
@echo Making: $@
@echo LIBRARY $(SHL1TARGET8) INITINSTANCE TERMINSTANCE >$@
- @echo DESCRIPTION 'SDRAW3 DLL' >>$@
@echo DATA MULTIPLE >>$@
@echo EXPORTS >>$@
@echo _CreateSdDrawDocShellDll >>$@
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_starmath/source/starmath_parse.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_starmath/source/starmath_parse.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_starmath/source/starmath_parse.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_starmath/source/starmath_parse.cxx Mon Aug 20 11:46:19 2012
@@ -1636,7 +1636,7 @@ const sal_Int32 coNumContFlags =
/*N*/ BOOL bIsPostfix = eType == TFACT;
/*N*/
/*N*/ SmStructureNode *pSNode;
-/*N*/ SmNode *pOper,
+/*N*/ SmNode *pOper = 0,
/*N*/ *pExtra = 0,
/*N*/ *pArg;
/*N*/
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx Mon Aug 20 11:46:19 2012
@@ -381,18 +381,26 @@ BOOL EnhWMFReader::ReadEnhWMF()
*pWMF >> nPoints;
pnPoints[ i ] = (UINT16)nPoints;
}
- // Polygonpunkte holen:
- pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
-
- for ( i = 0; i < nGesPoints; i++ )
- {
- *pWMF >> nX32 >> nY32;
- pPtAry[ i ] = Point( nX32, nY32 );
- }
- // PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+
+ PolyPolygon aPolyPoly((UINT16)nPoly, (UINT16)nPoly);
+
+ for ( i = 0; i < nPoly; i++ )
+ {
+ const sal_uInt16 nPointCount(pnPoints[i]);
+ pPtAry = new Point[nPointCount];
+
+ for(sal_uInt16 j(0); j < nPointCount; j++)
+ {
+ *pWMF >> nX32 >> nY32;
+ pPtAry[j] = Point( nX32, nY32 );
+ }
+
+ aPolyPoly.Insert(Polygon(nPointCount, pPtAry));
+ delete[] pPtAry;
+ }
+
+ // PolyPolygon Actions erzeugen
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
- delete[] (char*) pPtAry;
delete[] pnPoints;
}
}
@@ -1116,18 +1124,26 @@ BOOL EnhWMFReader::ReadEnhWMF()
*pWMF >> nPoints;
pnPoints[ i ] = (UINT16)nPoints;
}
- // Polygonpunkte holen:
- pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
- for ( i = 0; i < nGesPoints; i++ )
+
+ PolyPolygon aPolyPoly((UINT16)nPoly, (UINT16)nPoly);
+
+ for ( i = 0; i < nPoly; i++ )
{
- *pWMF >> nX16 >> nY16;
- pPtAry[ i ] = Point( nX16, nY16 );
- }
+ const sal_uInt16 nPointCount(pnPoints[i]);
+ pPtAry = new Point[nPointCount];
+
+ for(sal_uInt16 j(0); j < nPointCount; j++)
+ {
+ *pWMF >> nX16 >> nY16;
+ pPtAry[j] = Point( nX16, nY16 );
+ }
+
+ aPolyPoly.Insert(Polygon(nPointCount, pPtAry));
+ delete[] pPtAry;
+ }
// PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
- delete[] (char*) pPtAry;
delete[] pnPoints;
}
}
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx Mon Aug 20 11:46:19 2012
@@ -346,14 +346,25 @@ void WMFReader::ReadRecordParams( USHORT
*pWMF >> pnPoints[i];
nPoints = nPoints + pnPoints[i];
}
- // Polygonpunkte holen:
- pPtAry = (Point*) new char[ nPoints * sizeof(Point) ];
- for ( i = 0; i < nPoints; i++ )
- pPtAry[ i ] = ReadPoint();
+
+ PolyPolygon aPolyPoly(nPoly, nPoly);
+
+ for( i = 0; i < nPoly; i++ )
+ {
+ const sal_uInt16 nPointCount(pnPoints[i]);
+ pPtAry = new Point[nPointCount];
+
+ for(sal_uInt16 j(0); j < nPointCount; j++)
+ {
+ pPtAry[j] = ReadPoint();
+ }
+
+ aPolyPoly.Insert(Polygon(nPointCount, pPtAry));
+ delete[] pPtAry;
+ }
+
// PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly );
- delete[] (char*) pPtAry;
delete[] pnPoints;
}
break;
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx Mon Aug 20 11:46:19 2012
@@ -193,7 +193,7 @@ namespace binfilter {
/*N*/ Matrix4D aRotMat;
/*N*/
/*N*/ // Skalierung vorbereiten
-/*N*/ double fScalePerStep;
+/*N*/ double fScalePerStep(0.0);
/*N*/ if(GetBackScale() != 100)
/*N*/ fScalePerStep = (((double)GetBackScale() - 100.0) / 100.0) / (double)GetHorizontalSegments();
/*N*/
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx Mon Aug 20 11:46:19 2012
@@ -21,6 +21,8 @@
+#include <memory>
+
#ifndef _COM_SUN_STAR_XML_ATTRIBUTEDATA_HPP_
#include <com/sun/star/xml/AttributeData.hpp>
#endif
@@ -108,7 +110,7 @@ using namespace ::com::sun::star::xml;
/*NBFF*/ }
/*NBFF*/ else
/*NBFF*/ {
-/*NBFF*/ SvXMLAttrContainerData* pNewImpl = new SvXMLAttrContainerData;
+/*NBFF*/ ::std::auto_ptr<SvXMLAttrContainerData> pNewImpl(new SvXMLAttrContainerData);
/*NBFF*/
/*NBFF*/ try
/*NBFF*/ {
@@ -158,17 +160,15 @@ using namespace ::com::sun::star::xml;
/*NBFF*/ if( nAttr == nCount )
/*NBFF*/ {
/*NBFF*/ delete pImpl;
-/*NBFF*/ pImpl = pNewImpl;
-/*NBFF*/ return FALSE;
+/*NBFF*/ pImpl = pNewImpl.release();
/*NBFF*/ }
/*NBFF*/ else
/*NBFF*/ {
-/*NBFF*/ delete pNewImpl;
+/*NBFF*/ return FALSE;
/*NBFF*/ }
/*NBFF*/ }
/*NBFF*/ catch(...)
/*NBFF*/ {
-/*NBFF*/ delete pNewImpl;
/*NBFF*/ return FALSE;
/*NBFF*/ }
/*NBFF*/ }
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx Mon Aug 20 11:46:19 2012
@@ -353,7 +353,7 @@ const struct SwTableEntry NumRuleProgNam
/*N*/ }
/*N*/ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlags, sal_Bool bProgName )
/*N*/ {
-/*N*/ NameToIdHash *pHash;
+/*N*/ NameToIdHash *pHash(0);
/*N*/ const SvStringsDtor *pStrings;
/*N*/
/*N*/ switch ( eFlags )
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/layout/sw_frmtool.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/layout/sw_frmtool.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/layout/sw_frmtool.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/layout/sw_frmtool.cxx Mon Aug 20 11:46:19 2012
@@ -1650,7 +1650,7 @@ void MakeFrms( SwDoc *pDoc, const SwNode
}
else
{
- BOOL bSplit;
+ BOOL bSplit(false);
SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev();
// Wenn in einen SectionFrm ein anderer eingefuegt wird,
// muss dieser aufgebrochen werden
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/swg/sw_rdnum.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/swg/sw_rdnum.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/swg/sw_rdnum.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/swg/sw_rdnum.cxx Mon Aug 20 11:46:19 2012
@@ -158,13 +158,16 @@ SwNumRule* SwSwgReader::InNumRule()
SwNumFmt aFmt;
if( r.cur() != SWG_NUMFMT )
{
- Error(); delete pRule; return NULL;
+ Error();
+ delete pRule;
+ return NULL;
}
aFmt.SetBulletFont( NULL );
InNumFmt( aFmt );
if( !r )
{
- delete pRule; return NULL;
+ delete pRule;
+ return NULL;
}
pRule->Set( (USHORT) cFmt[ i ], aFmt );
}
@@ -181,8 +184,8 @@ SwNumRule* SwSwgReader::InNumRule()
{
SwNumFmt aFmt( pRule->Get( i ) );
aFmt.SetIncludeUpperLevels( MAXLEVEL );
- aFmt.SetAbsLSpace( aOldLft[ i ] );
- aFmt.SetFirstLineOffset( aOldFI[ i ] );
+ aFmt.SetAbsLSpace( aOldLft[ (i < 5) ? i : 4 ] );
+ aFmt.SetFirstLineOffset( aOldFI[ (i < 5) ? i : 4 ] );
aFmt.SetNumberingType(SVX_NUM_ARABIC);
if( i )
aFmt.SetSuffix( aEmptyStr );
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_porfly.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_porfly.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_porfly.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_porfly.cxx Mon Aug 20 11:46:19 2012
@@ -354,7 +354,7 @@ namespace binfilter {
/*N*/ //Die vertikale Position wird berechnet, die relative horizontale
/*N*/ //Position ist stets 0.
/*N*/
-/*N*/ SdrObject *pSdrObj;
+/*N*/ SdrObject *pSdrObj(0);
/*N*/ SwRect aBoundRect;
/*N*/ long nOldWidth;
/*N*/ if( bDraw )
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_widorp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_widorp.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_widorp.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/text/sw_widorp.cxx Mon Aug 20 11:46:19 2012
@@ -141,7 +141,7 @@ namespace binfilter {
/*N*/ SWRECTFN( pFrm )
/*N*/ // nOrigin is an absolut value, rLine referes to the swapped situation.
/*N*/
-/*N*/ SwTwips nTmpY;
+/*N*/ SwTwips nTmpY(0);
/*N*/ if ( pFrm->IsVertical() )
{DBG_BF_ASSERT(0, "STRIP");} //STRIP001 /*?*/ nTmpY = pFrm->SwitchHorizontalToVertical( rLine.Y() + rLine.GetLineHeight() );
/*N*/ else
@@ -391,7 +391,7 @@ sal_Bool SwTxtFrmBreak::WouldFit( SwTxtM
/*N*/ SWRECTFN( pFrm )
/*N*/
/*N*/ const SwTwips nDocPrtTop = (pFrm->*fnRect->fnGetPrtTop)();
-/*N*/ SwTwips nOldHeight;
+/*N*/ SwTwips nOldHeight(0);
/*N*/ SwTwips nTmpY = rLine.Y() + rLine.GetLineHeight();
/*N*/
/*N*/ if ( bVert )
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx Mon Aug 20 11:46:19 2012
@@ -462,7 +462,7 @@ void SwXDocumentIndex::setPropertyValue(
if ( pMap->nFlags & PropertyAttribute::READONLY)
throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- SwTOXBase* pTOXBase;
+ SwTOXBase* pTOXBase(0);
if(GetFmt())
pTOXBase = (SwTOXBaseSection*)GetFmt()->GetSection();
else if(bIsDescriptor)
@@ -749,7 +749,7 @@ uno::Any SwXDocumentIndex::getPropertyVa
_pMap, rPropertyName);
if (!pMap)
throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- SwTOXBase* pTOXBase;
+ SwTOXBase* pTOXBase(0);
if(GetFmt())
pTOXBase = (SwTOXBaseSection*)GetFmt()->GetSection();
else if(bIsDescriptor)
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx Mon Aug 20 11:46:19 2012
@@ -1377,7 +1377,7 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyl
Reference < XNameAccess > xFamilies = xFamilySupplier->getStyleFamilies();
Any aAny;
- sal_uInt16 nMapId;
+ sal_uInt16 nMapId(PROPERTY_MAP_CHAR_STYLE);
switch( eFamily )
{
case SFX_STYLE_FAMILY_CHAR:
@@ -1415,6 +1415,11 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyl
nMapId = PROPERTY_MAP_NUM_STYLE;
}
break;
+ default:
+ {
+ OSL_ASSERT(false);
+ }
+ break;
}
pPropImpl = new SwStyleProperties_Impl(aSwMapProvider.GetPropertyMap(nMapId));
}
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx Mon Aug 20 11:46:19 2012
@@ -1208,7 +1208,7 @@ BYTE SwW4WParser::GetDeciByte( BYTE& rBy
register BOOL Ok = FALSE;
BYTE nCode;
- while( this )
+ while (true)
{
n = ReadChar();
if ( '0' > n || '9' < n ) // eof durch 0 abgedeckt
@@ -1260,6 +1260,7 @@ BYTE SwW4WParser::GetHexByte( BYTE& rHex
if( c1 >= '0' && c1 <= '9' ) nRet = (c1 - '0');
else if( c1 >= 'A' && c1 <= 'F' ) nRet = (c1 - 'A' + 10);
else if( c1 >= 'a' && c1 <= 'f' ) nRet = (c1 - 'a' + 10);
+ else { return 0; }
if( W4WR_RED == c2 || W4WR_TXTERM == c2 ){
rHexVal = (BYTE)nRet;
@@ -2483,7 +2484,8 @@ void SwW4WParser::Read_NewTabTable() //
BYTE nType = aTabTypesArr[ nTabPos / 2 ];
nTmp = nTabPos & 1 ? nType & 0x0f : (nType & 0xf0) >> 4;
- if (nTmp <= 4){ // no virtual Tab
+ if (nTmp < (sizeof(aAdjustArr)/sizeof(aAdjustArr[0])))
+ { // no virtual Tab
aTabStop.GetAdjustment() = aAdjustArr[nTmp];
if( bTabLeadings && aTabLeadingArr[ nTabPos ] )
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlimpit.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlimpit.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlimpit.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlimpit.cxx Mon Aug 20 11:46:19 2012
@@ -576,7 +576,8 @@ sal_Bool SvXMLImportItemMapper::PutXMLVa
DEF_LINE_WIDTH_4 ) )
return sal_False;
- sal_uInt16 nSize = sizeof( aDBorderWidths );
+ sal_uInt16 const nSize =
+ sizeof(aDBorderWidths)/sizeof(aDBorderWidths[0]);
sal_uInt16 i=0;
for( i=0; i < nSize; i += 4 )
{
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlithlp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlithlp.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlithlp.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/sw_xmlithlp.cxx Mon Aug 20 11:46:19 2012
@@ -158,7 +158,7 @@ const sal_uInt16 aSBorderWidths[] =
SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
};
-const sal_uInt16 aDBorderWidths[5*11] =
+const sal_uInt16 aDBorderWidths[4*11] =
{
DBORDER_ENTRY( 0 ),
DBORDER_ENTRY( 7 ),
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/xmlithlp.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/xmlithlp.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/xmlithlp.hxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/filter/xml/xmlithlp.hxx Mon Aug 20 11:46:19 2012
@@ -94,7 +94,7 @@ void lcl_frmitems_MergeXMLVertPos( SvxGr
SvxGraphicPosition eVert );
extern const sal_uInt16 aSBorderWidths[];
-extern const sal_uInt16 aDBorderWidths[5*11];
+extern const sal_uInt16 aDBorderWidths[4*11];
extern const struct SvXMLEnumMapEntry psXML_BorderStyles[];
extern const struct SvXMLEnumMapEntry psXML_NamedBorderWidths[];
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_fontcfg.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_fontcfg.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_fontcfg.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_fontcfg.cxx Mon Aug 20 11:46:19 2012
@@ -140,7 +140,7 @@ using namespace ::com::sun::star::uno;
--------------------------------------------------*/
/*M*/ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
/*M*/ {
-/*M*/ BOOL bSame;
+/*M*/ BOOL bSame(false);
/*M*/ SvtLinguOptions aLinguOpt;
/*N*/
/*N*/ // #107253# Replaced SvtLinguConfig with SwLinguConfig wrapper with UsageCount
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_usrpref.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_usrpref.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_usrpref.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/config/sw_usrpref.cxx Mon Aug 20 11:46:19 2012
@@ -99,7 +99,7 @@ using namespace ::com::sun::star::uno;
/*N*/ "Display/DrawingControl", // 2
/*N*/ "Display/FieldCode", // 3
/*N*/ "Display/Note", // 4
-/*N*/ "Display/PreventTips", // 5
+/*N*/ "Display/ShowContentTips", // 5
/*N*/ "NonprintingCharacter/MetaCharacters", // 6
/*N*/ "NonprintingCharacter/ParagraphEnd", // 7
/*N*/ "NonprintingCharacter/OptionalHyphen", // 8
@@ -166,7 +166,7 @@ using namespace ::com::sun::star::uno;
/*N*/ case 2: rParent.SetDraw(bSet); break;// "Display/DrawingControl",
/*N*/ case 3: rParent.SetFldName(bSet); break;// "Display/FieldCode",
/*N*/ case 4: rParent.SetPostIts(bSet); break;// "Display/Note",
-/*N*/ case 5: rParent.SetPreventTips(bSet); break;// "Display/PreventTips",
+/*N*/ case 5: rParent.SetShowContentTips(bSet); break;// "Display/ShowContentTips",
/*N*/ case 6: rParent.SetViewMetaChars(bSet); break; //"NonprintingCharacter/MetaCharacters"
/*N*/ case 7: rParent.SetParagraph(bSet); break;// "NonprintingCharacter/ParagraphEnd",
/*N*/ case 8: rParent.SetSoftHyph(bSet); break;// "NonprintingCharacter/OptionalHyphen",
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx Mon Aug 20 11:46:19 2012
@@ -144,7 +144,7 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_SOLID_MARK_HANDLES,
HANDLE_VIEWSET_ZOOM_TYPE,
HANDLE_VIEWSET_ZOOM,
- HANDLE_VIEWSET_PREVENT_TIPS,
+ HANDLE_VIEWSET_SHOW_CONTENT_TIPS,
HANDLE_VIEWSET_HELP_URL,
HANDLE_VIEWSET_VRULER_RIGHT,
HANDLE_VIEWSET_SHOW_RULER
@@ -173,7 +173,7 @@ static ChainablePropertySetInfo * lcl_cr
{
{ RTL_CONSTASCII_STRINGPARAM ( "HelpURL" ), HANDLE_VIEWSET_HELP_URL , CPPUTYPE_OUSTRING, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
- { RTL_CONSTASCII_STRINGPARAM ( "PreventHelpTips" ), HANDLE_VIEWSET_PREVENT_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM ( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowAnnotations" ), HANDLE_VIEWSET_ANNOTATIONS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowBreaks"), HANDLE_VIEWSET_BREAKS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowDrawings"), HANDLE_VIEWSET_DRAWINGS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
@@ -681,7 +681,7 @@ void SwXViewSettings::_setSingleValue( c
case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break;
- case HANDLE_VIEWSET_PREVENT_TIPS : mpViewOption->SetPreventTips(bVal); break;
+ case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : mpViewOption->SetShowContentTips(bVal); break;
break;
case HANDLE_VIEWSET_ZOOM :
{
@@ -787,7 +787,7 @@ void SwXViewSettings::_getSingleValue( c
case HANDLE_VIEWSET_TEXT_BOUNDARIES : bBoolVal = SwViewOption::IsDocBoundaries(); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : bBoolVal = mpConstViewOption->IsSmoothScroll(); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : bBoolVal = mpConstViewOption->IsSolidMarkHdl(); break;
- case HANDLE_VIEWSET_PREVENT_TIPS : bBoolVal = mpConstViewOption->IsPreventTips(); break;
+ case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : bBoolVal = mpConstViewOption->IsShowContentTips(); break;
case HANDLE_VIEWSET_ZOOM :
bBool = FALSE;
rValue <<= (sal_Int16)mpConstViewOption->GetZoom();
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sw/util/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sw/util/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sw/util/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sw/util/makefile.mk Mon Aug 20 11:46:19 2012
@@ -181,7 +181,6 @@ $(MISC)$/$(SHL2TARGET).def: makefile.mk
@echo ------------------------------
@echo Making: $@
@echo LIBRARY $(SHL2TARGET8) INITINSTANCE TERMINSTANCE >$@
- @echo DESCRIPTION 'SWriter4 DLL' >>$@
@echo DATA MULTIPLE >>$@
@echo EXPORTS >>$@
@echo _CreateSwDocShellDll >>$@
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_XMLTextMarkImportContext.cxx Mon Aug 20 11:46:19 2012
@@ -226,7 +226,7 @@ sal_Bool XMLTextMarkImportContext::FindN
const Reference<XAttributeList> & xAttrList,
OUString& sName)
{
- sal_Bool bNameOK;
+ sal_Bool bNameOK(sal_False);
// find name attribute first
sal_Int16 nLength = xAttrList->getLength();
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx Mon Aug 20 11:46:19 2012
@@ -808,6 +808,8 @@ SvXMLImportContext* XMLVariableDeclsImpo
break;
default:
DBG_ERROR("unknown field type!");
+ eElementName = XML_SEQUENCE_DECL;
+ break;
}
if( IsXMLToken( rLocalName, eElementName ) )
Modified: incubator/ooo/branches/writer001/main/binfilter/filter/source/bf_migrate/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/filter/source/bf_migrate/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/filter/source/bf_migrate/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/binfilter/filter/source/bf_migrate/makefile.mk Mon Aug 20 11:46:19 2012
@@ -51,7 +51,11 @@ SLOFILES= $(SLO)$/bf_migrateexports.obj
# --- Library -----------------------------------
+.IF "$(OS)" == "OS2"
+SHL1TARGET=bf_migra$(DLLPOSTFIX)
+.ELSE
SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
+.ENDIF
SHL1STDLIBS=$(CPPULIB) \
$(CPPUHELPERLIB) \
$(SALLIB) \
Modified: incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/calculat.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/calculat.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/calculat.hxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/calculat.hxx Mon Aug 20 11:46:19 2012
@@ -45,23 +45,6 @@ class XPolyPolygon;
class SchCalculationHelper
{
public:
- /** like Rectangle::IsInside, but the result is FALSE, if
- the Point is on the Border of the Rectangle
- */
-// static BOOL IsPointInsideRectangle( const Point& rPoint, const Rectangle& rRect );
-
- /** @descr The line is clipped at the rectangle. If the line lies completely or partly
- inside the clipping area then TRUE is returned and the line is modified accordingly.
- If the line lies completely outside the clipping area then FALSE is returned and the
- line remains unmodified.
- The line may be degenerate in that both of it's end points have the same
- coordinates.
- @param aLine The line to be clipped. It is modified to a part that lies completely
- inside the clipping area if such a part exists.
- @param rRectangle The clipping area.
- @return TRUE is returned if the line lies completely or partly inside the clipping area.
- */
-
/** @descr The intersection between an open polygon and a rectangle is
calculated and the resulting lines are placed into the poly-polygon aResult.
@param rPolygon The polygon is required to be open, ie. it's start and end point
@@ -73,35 +56,6 @@ public:
static void IntersectPolygonWithRectangle( const XPolygon& rPolygon, const Rectangle& rRectangle,
XPolyPolygon& aResult );
- /** @descr Calculates the intersection between a set of open polygons and a
- rectangle. This function iterates over all polygons contained in
- rPolyPolygon and calls IntersectPolygonWithRectangle() for it.
- The resulting XPolyPolygons are then put together into aResult.
- @param rPolyPolygon A set of polygons that must be open.
- @param rRectangle The clipping region
- @param rOutResult The resulting lines representing rPolyPolygon clipped
- at rRectangle.
- */
-
- /** @descr calculates natural cubic splines for the given set of points.
-
- @param rPoints is a vector of tuples containing x and y coordinate of
- points that are to be interpolated.
- @param nGranularity The number of interpolation points between two
- x-values given in rPoints
-
- @param rOutResult A polygon (split up into more, if the number of points
- is too high as to fit into a single XPolygon) that contains all
- line segments between the interpolated points. It should contain
- (rPoints.size() * nGranularity) points.
-
- @param nDPIX resolution in x-direction to reduce the number of points.
- A value of 0 (default) means do not take into account.
-
- @param nDPIY resolution in y-direction to reduce the number of points.
- A value of 0 (default) means do not take into account.
- */
-
private:
/** @descr The line given by it's two endpoints rP0 and rP1 is clipped at the rectangle
rRectangle. If there is at least a part of it visible then TRUE is returned and
Modified: incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/chtmodel.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/chtmodel.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/chtmodel.hxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/chtmodel.hxx Mon Aug 20 11:46:19 2012
@@ -36,7 +36,6 @@
//STRIP008 class SdrObjGroup;
//STRIP008 class SdrRectObj;
//STRIP008
-//STRIP008 class SchModelData;
#ifndef _E3D_POLYGON3D_HXX //autogen
#include <bf_svx/polygn3d.hxx>
@@ -121,7 +120,6 @@ class SvNumberFormatterIndexTable;
class SdrObjGroup;
class SdrRectObj;
-class SchModelData;
class SchObjectId;
class ChartAxis;
class SchItemPool;
@@ -643,6 +641,8 @@ public:
inline BOOL GetUseRelativePositions() { return bUseRelativePositionsForChartGroups; }
void SetUseRelativePositions( BOOL value );
+ static Point calcRelativePosition( const Point& rStartPoint, const Size& rInitialSize, const Size& rNewSize );
+
void SetAdjustMarginsForLegend( BOOL value ) { bAdjustMarginsForLegend = value; }
BOOL GetAdjustMarginsForLegend() { return bAdjustMarginsForLegend; }
@@ -752,8 +752,6 @@ public:
friend SvStream & operator << ( SvStream & rOut, const ChartModel & rDoc );
friend SvStream & operator >> ( SvStream & rIn, ChartModel & rDoc );
- friend class SchModelData;
-
// protected:
// remark: currently there are no classes that are derived from ChartModel
// and also the distinction between private and protected was not very
Modified: incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/globfunc.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/globfunc.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/globfunc.hxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/globfunc.hxx Mon Aug 20 11:46:19 2012
@@ -85,44 +85,6 @@ SchObjGroup *CreateSimpleGroup (UINT16 n
BOOL bProtect,
BOOL bResize);
-
-void CubicSpline (XPolygon &pKnownPoints,
- int n,
- int splineSize,
- XPolygon &pSplines);
-
-void TVector (int n,
- int k,
- double *t);
-
-double TLeft (double x,
- int i,
- int k,
- double *t);
-
-double TRight (double x,
- int i,
- int k,
- double *t);
-
-void BVector (double x,
- int n,
- int k,
- double *b,
- double *t);
-
-void BSPoint (int n,
- Point &p1,
- Point &p2,
- XPolygon &pKnownPoints,
- double *b);
-
-void approxMesh (int splineSize,
- XPolygon &pSplines,
- XPolygon &pKnownPoints,
- int n,
- int k);
-
double SizeBounds (double,
double,
BOOL);
Modified: incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/memchrt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/memchrt.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/memchrt.hxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/inc/bf_sch/memchrt.hxx Mon Aug 20 11:46:19 2012
@@ -49,6 +49,9 @@
#ifndef _COM_SUN_STAR_CHART_CHARTSERIESADDRESS_HPP_
#include <com/sun/star/chart/ChartSeriesAddress.hpp>
#endif
+
+#include "arrayhelper.hxx"
+
class SvStream;
namespace binfilter {
@@ -295,10 +298,10 @@ public:
void SetNumberFormatter(SvNumberFormatter* pNumFormatter) { mpNumFormatter = pNumFormatter; }
SvNumberFormatter* GetNumberFormatter() const { return mpNumFormatter; }
- void SetNumFormatIdRow( const long nRow, const long nFmtId ) { if( pRowNumFmtId && nRow < nRowCnt ) pRowNumFmtId[ nRow ] = nFmtId; }
- void SetNumFormatIdCol( const long nCol, const long nFmtId ) { if( pColNumFmtId && nCol < nColCnt ) pColNumFmtId[ nCol ] = nFmtId; }
- long GetNumFormatIdRow( const long nRow ) const { return ( pRowNumFmtId && nRow < nRowCnt )? pRowNumFmtId[ nRow ]: -1; }
- long GetNumFormatIdCol( const long nCol ) const { return ( pColNumFmtId && nCol < nColCnt )? pColNumFmtId[ nCol ]: -1; }
+ void SetNumFormatIdRow( const long nRow, const long nFmtId ) { if ( pRowNumFmtId && IsValidRow( nRow ) ) pRowNumFmtId[ nRow ] = nFmtId; }
+ void SetNumFormatIdCol( const long nCol, const long nFmtId ) { if ( pColNumFmtId && IsValidColumn( nCol ) ) pColNumFmtId[ nCol ] = nFmtId; }
+ long GetNumFormatIdRow( const long nRow ) const { return ( pRowNumFmtId && IsValidRow( nRow ) ) ? pRowNumFmtId[ nRow ] : -1; }
+ long GetNumFormatIdCol( const long nCol ) const { return ( pColNumFmtId && IsValidColumn( nCol ) ) ? pColNumFmtId[ nCol ] : -1; }
long GetTransNumFormatIdRow( const long nRow ) const;
long GetTransNumFormatIdCol( const long nCol ) const;
@@ -329,11 +332,11 @@ public:
friend SvStream& operator << (SvStream& rOut, const SchMemChart& rMemChart);
friend SvStream& operator >> (SvStream& rIn, SchMemChart& rMemChart);
- const String& GetColText(short nCol) const { return pColText[nCol]; }
- const String& GetRowText(short nRow) const { return pRowText[nRow]; }
+ const String& GetColText(short nCol) const { return ( pColText && IsValidColumn( nCol ) ) ? pColText[ nCol ] : String::EmptyString(); }
+ const String& GetRowText(short nRow) const { return ( pRowText && IsValidRow( nRow ) ) ? pRowText[ nRow ] : String::EmptyString(); }
ChartDataId GetId() const { return myID; }
- double GetData(short nCol, short nRow) const { return pData[nCol * nRowCnt + nRow]; }
+ double GetData(short nCol, short nRow) const { return ( pData && IsValidColumn( nCol ) && IsValidRow( nRow ) ) ? pData[nCol * nRowCnt + nRow] : DBL_MIN; }
double GetDataInPercent(const short nCol , const short nRow, const BOOL bRowData) const;
inline void InsertCols(short nAtCol, short nCount);
@@ -344,7 +347,7 @@ public:
inline void SwapRows(int nAtRow1, int nAtRow2);
void SetData(short nCol, short nRow, const double& rVal)
- { pData[nCol * nRowCnt + nRow] = rVal; }
+ { if ( pData && IsValidColumn( nCol ) && IsValidRow( nRow ) ) pData[nCol * nRowCnt + nRow] = rVal; }
String& SomeData1() { return aSomeData1; }
String& SomeData2() { return aSomeData2; }
@@ -356,8 +359,8 @@ public:
const String& SomeData3() const { return aSomeData3; }
const String& SomeData4() const { return aSomeData4; }
- void SetColText(short nCol, const String& rText) { pColText[nCol] = rText; }
- void SetRowText(short nRow, const String& rText) { pRowText[nRow] = rText; }
+ void SetColText(short nCol, const String& rText) { if ( pColText && IsValidColumn( nCol ) ) pColText[nCol] = rText; }
+ void SetRowText(short nRow, const String& rText) { if ( pRowText && IsValidRow( nRow ) ) pRowText[nRow] = rText; }
@@ -428,6 +431,9 @@ public:
for all table numbers to fit in
*/
void parseTableNumberList( const ::rtl::OUString& rList );
+
+ bool IsValidColumn( const long nCol ) const { return nCol >= 0 && nCol < nColCnt; }
+ bool IsValidRow( const long nRow ) const { return nRow >= 0 && nRow < nRowCnt; }
};
// ==================== Inline Implementations ====================
@@ -504,11 +510,37 @@ inline void SchMemChart::UpdateTranslati
inline void SchMemChart::InsertCols(short nAtCol, short nCount)
{
- double* pOldData = pData;
-
+ if ( nAtCol < 0 || nAtCol > nColCnt )
+ {
+ return;
+ }
+ if ( nColCnt <= 0 || nCount < 0 ||
+ nCount > ( ::std::numeric_limits< short >::max() - nColCnt ) )
+ {
+ return;
+ }
short nNewColCnt = nColCnt + nCount;
- pData = new double[nNewColCnt * nRowCnt];
+ double* pOldData = pData;
+ String* pOldColText = pColText;
+ sal_Int32* pOldColNumFmtId = pColNumFmtId;
+ sal_Int32* pOldColTable = pColTable;
+ pData = ArrayHelper< double >::create_short_size( nNewColCnt, nRowCnt );
+ pColText = ArrayHelper< String >::create_short_size( nNewColCnt );
+ pColNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nNewColCnt );
+ pColTable = ArrayHelper< sal_Int32 >::create_short_size( nNewColCnt );
+ if ( !pData || !pColText || !pColNumFmtId || !pColTable )
+ {
+ delete[] pData;
+ pData = pOldData;
+ delete[] pColText;
+ pColText = pOldColText;
+ delete[] pColNumFmtId;
+ pColNumFmtId = pOldColNumFmtId;
+ delete[] pColTable;
+ pColTable = pOldColTable;
+ return;
+ }
short i, j, nOld, nMax;
@@ -539,14 +571,6 @@ inline void SchMemChart::InsertCols(shor
}
delete[] pOldData;
- String *pOldColText = pColText;
- sal_Int32 *pOldColNumFmtId = pColNumFmtId;
- sal_Int32 *pOldColTable = pColTable;
-
- pColNumFmtId = new sal_Int32 [nNewColCnt];
- pColTable = new sal_Int32 [nNewColCnt];
- pColText = new String[nNewColCnt];
-
long nC=nNewColCnt;
while(nC--)
{
@@ -579,21 +603,40 @@ inline void SchMemChart::RemoveCols(shor
{
DBG_ASSERT( nAtCol < nColCnt, "column index overflow");
+ if ( nAtCol < 0 || nAtCol >= nColCnt )
+ {
+ return;
+ }
+ if ( nColCnt <= 0 || nCount < 0 ||
+ nCount > ( ::std::numeric_limits< short >::max() - nAtCol ) )
+ {
+ return;
+ }
if (nAtCol + nCount > nColCnt)
nCount = nColCnt - nAtCol;
short nNewColCnt = nColCnt - nCount;
- double* pOldData = pData;
- pData = new double[nNewColCnt * nRowCnt];
-
- String* pOldColText = pColText;
- sal_Int32* pOldColNumFmtId = pColNumFmtId;
- sal_Int32* pOldColTable = pColTable;
-
- pColText = new String[nNewColCnt];
- pColNumFmtId = new sal_Int32 [nNewColCnt];
- pColTable = new sal_Int32 [nNewColCnt];
+ double* pOldData = pData;
+ String* pOldColText = pColText;
+ sal_Int32* pOldColNumFmtId = pColNumFmtId;
+ sal_Int32* pOldColTable = pColTable;
+ pData = ArrayHelper< double >::create_short_size( nNewColCnt, nRowCnt );
+ pColText = ArrayHelper< String >::create_short_size( nNewColCnt );
+ pColNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nNewColCnt );
+ pColTable = ArrayHelper< sal_Int32 >::create_short_size( nNewColCnt );
+ if ( !pData || !pColText || !pColNumFmtId || !pColTable )
+ {
+ delete[] pData;
+ pData = pOldData;
+ delete[] pColText;
+ pColText = pOldColText;
+ delete[] pColNumFmtId;
+ pColNumFmtId = pOldColNumFmtId;
+ delete[] pColTable;
+ pColTable = pOldColTable;
+ return;
+ }
short i, j, nOld;
@@ -624,11 +667,37 @@ inline void SchMemChart::RemoveCols(shor
inline void SchMemChart::InsertRows(short nAtRow, short nCount)
{
- double* pOldData = pData;
-
+ if ( nAtRow < 0 || nAtRow > nRowCnt )
+ {
+ return;
+ }
+ if ( nRowCnt <= 0 || nCount < 0 ||
+ nCount > ( ::std::numeric_limits< short >::max() - nRowCnt ) )
+ {
+ return;
+ }
short nNewRowCnt = nRowCnt + nCount;
- pData = new double[nColCnt * nNewRowCnt];
+ double* pOldData = pData;
+ String* pOldRowText = pRowText;
+ sal_Int32* pOldRowNumFmtId = pRowNumFmtId;
+ sal_Int32* pOldRowTable = pRowTable;
+ pData = ArrayHelper< double >::create_short_size( nColCnt, nNewRowCnt );
+ pRowText = ArrayHelper< String >::create_short_size( nNewRowCnt );
+ pRowNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nNewRowCnt );
+ pRowTable = ArrayHelper< sal_Int32 >::create_short_size( nNewRowCnt );
+ if ( !pData || !pRowText || !pRowNumFmtId || !pRowTable )
+ {
+ delete[] pData;
+ pData = pOldData;
+ delete[] pRowText;
+ pRowText = pOldRowText;
+ delete[] pRowNumFmtId;
+ pRowNumFmtId = pOldRowNumFmtId;
+ delete[] pRowTable;
+ pRowTable = pOldRowTable;
+ return;
+ }
short i, j, nOld, nMax, nGapEnd;
@@ -661,14 +730,6 @@ inline void SchMemChart::InsertRows(shor
}
delete[] pOldData;
- String *pOldRowText =pRowText;
- sal_Int32 *pOldRowNumFmtId =pRowNumFmtId;
- sal_Int32 *pOldRowTable =pRowTable;
-
- pRowNumFmtId = new sal_Int32 [nNewRowCnt];
- pRowTable = new sal_Int32 [nNewRowCnt];
- pRowText = new String[nNewRowCnt];
-
long nC=nNewRowCnt;
while(nC--) //init
{
@@ -701,13 +762,40 @@ inline void SchMemChart::RemoveRows(shor
{
DBG_ASSERT( nAtRow < nRowCnt, "row index overflow" );
+ if ( nAtRow < 0 || nAtRow >= nRowCnt )
+ {
+ return;
+ }
+ if ( nRowCnt <= 0 || nCount < 0 ||
+ nCount > ( ::std::numeric_limits< short >::max() - nAtRow ) )
+ {
+ return;
+ }
if (nAtRow + nCount > nRowCnt)
nCount = nRowCnt - nAtRow;
short nNewRowCnt = nRowCnt - nCount;
double* pOldData = pData;
- pData = new double[nColCnt * nNewRowCnt];
+ String* pOldRowText = pRowText;
+ sal_Int32* pOldRowNumFmtId = pRowNumFmtId;
+ sal_Int32* pOldRowTable = pRowTable;
+ pData = ArrayHelper< double >::create_short_size( nColCnt, nNewRowCnt );
+ pRowText = ArrayHelper< String >::create_short_size( nNewRowCnt );
+ pRowNumFmtId = ArrayHelper< sal_Int32 >::create_short_size( nNewRowCnt );
+ pRowTable = ArrayHelper< sal_Int32 >::create_short_size( nNewRowCnt );
+ if ( !pData || !pRowText || !pRowNumFmtId || !pRowTable )
+ {
+ delete[] pData;
+ pData = pOldData;
+ delete[] pRowText;
+ pRowText = pOldRowText;
+ delete[] pRowNumFmtId;
+ pRowNumFmtId = pOldRowNumFmtId;
+ delete[] pRowTable;
+ pRowTable = pOldRowTable;
+ return;
+ }
short i, j, nOld;
@@ -724,14 +812,6 @@ inline void SchMemChart::RemoveRows(shor
delete[] pOldData;
- String* pOldRowText = pRowText;
- sal_Int32* pOldRowNumFmtId = pRowNumFmtId;
- sal_Int32* pOldRowTable = pRowTable;
-
- pRowText = new String[nNewRowCnt];
- pRowNumFmtId = new sal_Int32 [nNewRowCnt];
- pRowTable = new sal_Int32 [nNewRowCnt];
-
for (i = 0, nOld = 0;; i++, nOld++)
{
if (nOld == nAtRow)
Modified: incubator/ooo/branches/writer001/main/binfilter/inc/bf_sw/viewopt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/inc/bf_sw/viewopt.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/inc/bf_sw/viewopt.hxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/inc/bf_sw/viewopt.hxx Mon Aug 20 11:46:19 2012
@@ -98,7 +98,7 @@ class SwDocShell;
#define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L
#define VIEWOPT_2_GRFKEEPZOOM 0x00040000L
#define VIEWOPT_2_EXECHYPERLINKS 0x00080000L
-#define VIEWOPT_2_PREVENT_TIPS 0x00100000L
+#define VIEWOPT_2_CONTENT_TIPS 0x00100000L
#define VIEWOPT_2_RESERVED3 0x00200000L
#define VIEWOPT_2_RESERVED4 0x00400000L
#define VIEWOPT_2_PRTFORMAT 0x00800000L
@@ -446,8 +446,8 @@ public:
{ return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; }
BOOL IsExecHyperlinks() const
{ return nUIOptions & VIEWOPT_2_EXECHYPERLINKS ? TRUE : FALSE; }
- BOOL IsPreventTips() const
- { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? TRUE : FALSE; }
+ BOOL IsShowContentTips() const
+ { return nUIOptions & VIEWOPT_2_CONTENT_TIPS ? TRUE : FALSE; }
BOOL IsPrtFormat() const
{ return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; }
@@ -465,8 +465,8 @@ public:
{ b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
void SetExecHyperlinks( BOOL b)
{ b ? (nUIOptions |= VIEWOPT_2_EXECHYPERLINKS) : (nUIOptions &= ~VIEWOPT_2_EXECHYPERLINKS); }
- void SetPreventTips( BOOL b)
- { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
+ void SetShowContentTips( BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_CONTENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_CONTENT_TIPS); }
void SetPrtFormat( BOOL b)
{ b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
Modified: incubator/ooo/branches/writer001/main/bridges/source/jni_uno/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/bridges/source/jni_uno/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/bridges/source/jni_uno/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/bridges/source/jni_uno/makefile.mk Mon Aug 20 11:46:19 2012
@@ -61,9 +61,7 @@ SHL1STDLIBS= \
$(SALLIB) \
$(SALHELPERLIB)
-.IF "$(GUI)" != "OS2"
SHL1VERSIONMAP=$(TARGET).map
-.ENDIF
SHL1CREATEJNILIB=TRUE
SHL1IMPLIB=i$(TARGET)
Modified: incubator/ooo/branches/writer001/main/chart2/source/model/main/Diagram.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/chart2/source/model/main/Diagram.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/chart2/source/model/main/Diagram.cxx (original)
+++ incubator/ooo/branches/writer001/main/chart2/source/model/main/Diagram.cxx Mon Aug 20 11:46:19 2012
@@ -79,7 +79,8 @@ enum
PROP_DIAGRAM_PERSPECTIVE,
PROP_DIAGRAM_ROTATION_HORIZONTAL,
PROP_DIAGRAM_ROTATION_VERTICAL,
- PROP_DIAGRAM_MISSING_VALUE_TREATMENT
+ PROP_DIAGRAM_MISSING_VALUE_TREATMENT,
+ PROP_DIAGRAM_3DRELATIVEHEIGHT
};
void lcl_AddPropertiesToVector(
@@ -172,6 +173,11 @@ void lcl_AddPropertiesToVector(
::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEVOID ));
+ rOutProperties.push_back(
+ Property( C2U("3DRelativeHeight"),
+ PROP_DIAGRAM_3DRELATIVEHEIGHT,
+ ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
+ beans::PropertyAttribute::MAYBEVOID ));
}
struct StaticDiagramDefaults_Initializer
@@ -192,7 +198,8 @@ private:
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
- ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 );
+ ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
}
};
Modified: incubator/ooo/branches/writer001/main/chart2/source/model/template/PieChartType.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/chart2/source/model/template/PieChartType.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/chart2/source/model/template/PieChartType.cxx (original)
+++ incubator/ooo/branches/writer001/main/chart2/source/model/template/PieChartType.cxx Mon Aug 20 11:46:19 2012
@@ -49,7 +49,8 @@ namespace
enum
{
- PROP_PIECHARTTYPE_USE_RINGS
+ PROP_PIECHARTTYPE_USE_RINGS,
+ PROP_PIECHARTTYPE_3DRELATIVEHEIGHT
};
void lcl_AddPropertiesToVector(
@@ -61,6 +62,11 @@ void lcl_AddPropertiesToVector(
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+ rOutProperties.push_back(
+ Property( C2U("3DRelativeHeight"),
+ PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
+ ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
+ beans::PropertyAttribute::MAYBEVOID ));
}
struct StaticPieChartTypeDefaults_Initializer
@@ -75,6 +81,7 @@ private:
void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
{
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, 100 );
}
};
Modified: incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/PieChart.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/PieChart.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/PieChart.cxx (original)
+++ incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/PieChart.cxx Mon Aug 20 11:46:19 2012
@@ -365,6 +365,17 @@ void PieChart::createShapes()
m_aLabelInfoList.clear();
::rtl::math::setNan(&m_fMaxOffset);
+ sal_Int32 n3DRelativeHeight = 100;
+ uno::Reference< beans::XPropertySet > xPropertySet( m_xChartTypeModel, uno::UNO_QUERY );
+ if ( (m_nDimension==3) && xPropertySet.is())
+ {
+ try
+ {
+ uno::Any aAny = xPropertySet->getPropertyValue( C2U("3DRelativeHeight") );
+ aAny >>= n3DRelativeHeight;
+ }
+ catch(const uno::Exception& e) {}
+ }
//=============================================================================
for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 )
@@ -406,7 +417,7 @@ void PieChart::createShapes()
continue;
double fLogicZ = -1.0;//as defined
- double fDepth = this->getTransformedDepth();
+ double fDepth = this->getTransformedDepth() * (n3DRelativeHeight / 100.0);
//=============================================================================
uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
Modified: incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/VSeriesPlotter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/VSeriesPlotter.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/VSeriesPlotter.cxx (original)
+++ incubator/ooo/branches/writer001/main/chart2/source/view/charttypes/VSeriesPlotter.cxx Mon Aug 20 11:46:19 2012
@@ -1537,12 +1537,23 @@ void VDataSeriesGroup::getMinimumAndMaxi
if( fX < fMinX || fX > fMaxX )
continue;
double fY = (*aSeriesIter)->getYValue( nN );
+
if( ::rtl::math::isNan(fY) )
continue;
if(rfMaxY<fY)
rfMaxY=fY;
if(rfMinY>fY)
rfMinY=fY;
+ ////for stockchart with candlestick start
+ //todo:stockchart with candlestick has no values-y but values-min,values-max,values-first and values-last
+ //also check values-min,values-max for max and min value
+ double fYmax = (*aSeriesIter)->getY_Max( nN );
+ double fYmin = (*aSeriesIter)->getY_Min( nN );
+ if(!::rtl::math::isNan(fYmax))
+ if( rfMaxY<fYmax) rfMaxY=fYmax;
+ if(!::rtl::math::isNan(fYmin))
+ if( rfMinY>fYmin) rfMinY=fYmin;
+ ////for stockchart with candlestick end
}
}
if(::rtl::math::isInf(rfMinY))
Modified: incubator/ooo/branches/writer001/main/chart2/source/view/main/ChartView.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/chart2/source/view/main/ChartView.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/chart2/source/view/main/ChartView.cxx (original)
+++ incubator/ooo/branches/writer001/main/chart2/source/view/main/ChartView.cxx Mon Aug 20 11:46:19 2012
@@ -102,6 +102,7 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <svl/languageoptions.hxx>
#include <sot/clsids.hxx>
+#include "servicenames_charttypes.hxx"
//.............................................................................
namespace chart
@@ -642,6 +643,7 @@ void SeriesPlotterContainer::initializeC
sal_Bool bGroupBarsPerAxis = sal_True;
sal_Bool bIncludeHiddenCells = sal_True;
sal_Int32 nStartingAngle = 90;
+ sal_Int32 n3DRelativeHeight = 100;
try
{
uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
@@ -650,6 +652,11 @@ void SeriesPlotterContainer::initializeC
xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells;
xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
+
+ if (nDimensionCount == 3)
+ {
+ xDiaProp->getPropertyValue( C2U( "3DRelativeHeight" ) ) >>= n3DRelativeHeight;
+ }
}
catch( const uno::Exception & ex )
{
@@ -684,6 +691,22 @@ void SeriesPlotterContainer::initializeC
for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
{
uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
+ if(3 == nDimensionCount && xChartType->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE))
+ {
+ uno::Reference< beans::XPropertySet > xPropertySet( xChartType, uno::UNO_QUERY );
+ if (xPropertySet.is())
+ {
+ try
+ {
+ sal_Int32 n3DRelativeHeightOldValue(100);
+ uno::Any aAny = xPropertySet->getPropertyValue( C2U("3DRelativeHeight") );
+ aAny >>= n3DRelativeHeightOldValue;
+ if (n3DRelativeHeightOldValue != n3DRelativeHeight)
+ xPropertySet->setPropertyValue( C2U("3DRelativeHeight"), uno::makeAny(n3DRelativeHeight) );
+ }
+ catch(const uno::Exception& e){}
+ }
+ }
if(nT==0)
m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
Modified: incubator/ooo/branches/writer001/main/comphelper/Package_inc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/comphelper/Package_inc.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/comphelper/Package_inc.mk (original)
+++ incubator/ooo/branches/writer001/main/comphelper/Package_inc.mk Mon Aug 20 11:46:19 2012
@@ -131,3 +131,4 @@ $(eval $(call gb_Package_add_file,comphe
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/processfactory.hxx,comphelper/processfactory.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceashashmap.hxx,comphelper/sequenceashashmap.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configurationhelper.hxx,comphelper/configurationhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/newarray.hxx,comphelper/newarray.hxx))
Modified: incubator/ooo/branches/writer001/main/comphelper/source/container/embeddedobjectcontainer.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/comphelper/source/container/embeddedobjectcontainer.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/comphelper/source/container/embeddedobjectcontainer.cxx (original)
+++ incubator/ooo/branches/writer001/main/comphelper/source/container/embeddedobjectcontainer.cxx Mon Aug 20 11:46:19 2012
@@ -1536,7 +1536,29 @@ sal_Bool EmbeddedObjectContainer::StoreC
try
{
//TODO/LATER: only storing if changed!
- xPersist->storeOwn();
+ //xPersist->storeOwn(); //commented, i120168
+
+ // begin:all charts will be persited as xml format on disk when saving, which is time consuming.
+ // '_bObjectsOnly' mean we are storing to alien formats.
+ // 'isStorageElement' mean current object is NOT an MS OLE format. (may also include in future), i120168
+ if (_bObjectsOnly && (nCurState == embed::EmbedStates::LOADED || nCurState == embed::EmbedStates::RUNNING)
+ && (pImpl->mxStorage->isStorageElement( *pIter ) ))
+ {
+ uno::Reference< util::XModifiable > xModifiable( xObj->getComponent(), uno::UNO_QUERY );
+ if ( xModifiable.is() && xModifiable->isModified())
+ {
+ xPersist->storeOwn();
+ }
+ else
+ {
+ //do nothing.embeded model is not modified, no need to persist.
+ }
+ }
+ else //the embeded object is in active status, always store back it.
+ {
+ xPersist->storeOwn();
+ }
+ //end i120168
}
catch( uno::Exception& )
{
Modified: incubator/ooo/branches/writer001/main/configure.cmd
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/configure.cmd?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/configure.cmd (original)
+++ incubator/ooo/branches/writer001/main/configure.cmd Mon Aug 20 11:46:19 2012
@@ -27,5 +27,5 @@ SET PATH=%JAVA_HOME%\bin;%PATH%;%MY_ANT_
set config_shell=sh
set perl_sh_dir=/usr/bin
-sh ./configure --prefix=/@unixroot/usr --disable-binfilter --with-system-zlib --with-system-jpeg --without-stlport --with-system-icu --with-system-curl --with-system-python --with-system-openssl --with-system-libxml --with-system-libxslt --disable-werror --disable-mozilla --disable-odk --with-x=no --disable-fontconfig --disable-gnome-vfs --disable-gtk --with-java=yes --disable-gcjaot --without-fonts --with-ant-home=%MY_ANT_HOME% --without-junit | tee configure.log
+sh ./configure --prefix=/@unixroot/usr --disable-binfilter --with-system-zlib --with-system-jpeg --without-stlport --with-system-icu --with-system-curl --with-system-python --with-system-openssl --with-system-libxml --with-system-libxslt --disable-werror --disable-mozilla --disable-odk --with-x=no --disable-fontconfig --disable-gnome-vfs --disable-gtk --with-java=yes --disable-gcjaot --without-fonts --with-ant-home=%MY_ANT_HOME% --without-junit --with-system-apr --with-system-apr-util --with-system-serf --with-system-coinmp | tee configure.log
endlocal