[Libreoffice-commits] core.git: 28 commits - basctl/source basic/source connectivity/source cui/source sd/source svx/source sw/inc sw/source vbahelper/source vcl/generic vcl/inc
Caolán McNamara
caolanm at redhat.com
Mon Oct 7 01:16:55 PDT 2013
basctl/source/basicide/bastype2.cxx | 6
basctl/source/basicide/moduldl2.cxx | 11 -
basctl/source/dlged/dlged.cxx | 23 +--
basctl/source/dlged/dlgedpage.cxx | 5
basic/source/basmgr/basmgr.cxx | 6
basic/source/classes/image.cxx | 4
basic/source/classes/sbintern.cxx | 4
basic/source/classes/sbunoobj.cxx | 1
connectivity/source/drivers/mork/MResultSet.cxx | 3
cui/source/customize/macropg.cxx | 3
sd/source/ui/view/sdview.cxx | 2
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 2
sw/inc/calc.hxx | 4
sw/source/core/bastyp/calc.cxx | 70 +++++-----
sw/source/core/doc/docglbl.cxx | 11 -
sw/source/filter/ww8/WW8TableInfo.cxx | 1
sw/source/filter/ww8/ww8scan.cxx | 10 -
sw/source/filter/ww8/ww8scan.hxx | 7 -
sw/source/filter/ww8/ww8toolbar.cxx | 14 +-
vbahelper/source/vbahelper/vbapagesetupbase.cxx | 5
vcl/generic/fontmanager/fontmanager.cxx | 33 ++++
vcl/generic/fontmanager/parseAFM.cxx | 2
vcl/generic/glyphs/gcach_ftyp.cxx | 1
vcl/inc/impoct.hxx | 24 ++-
24 files changed, 159 insertions(+), 93 deletions(-)
New commits:
commit 77df4f8943c8e7bf0a308197b032a841fe3e365a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 20:33:53 2013 +0100
CID#736510 mem leaks in early error return cases
Change-Id: I85dff67d5d92e1024e9b449f1298678e7f5ff9e6
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 94bc975..6effd06 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -43,6 +43,7 @@
#include <doctxm.hxx>
#include <poolfmt.hxx>
#include <switerator.hxx>
+#include <boost/scoped_ptr.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
@@ -157,6 +158,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c
sal_uInt16 nOutl = 0;
SwOutlineNodes* pOutlNds = (SwOutlineNodes*)&GetNodes().GetOutLineNds();
+ boost::scoped_ptr<SwOutlineNodes> xTmpOutlNds;
SwNodePtr pStartNd;
if ( !bOutline) {
@@ -165,17 +167,15 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c
// If it isn't a OutlineNumbering, then use an own array and collect the Nodes.
if( pSplitColl->GetAttrOutlineLevel() == 0 )
{
- pOutlNds = new SwOutlineNodes;
+ xTmpOutlNds.reset(new SwOutlineNodes);
+ pOutlNds = xTmpOutlNds.get();
SwIterator<SwTxtNode,SwFmtColl> aIter( *pSplitColl );
for( SwTxtNode* pTNd = aIter.First(); pTNd; pTNd = aIter.Next() )
if( pTNd->GetNodes().IsDocNodes() )
pOutlNds->insert( pTNd );
if( pOutlNds->empty() )
- {
- delete pOutlNds;
return false;
- }
}
}
else
@@ -482,8 +482,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c
}
} while( pStartNd );
- if( pOutlNds != &GetNodes().GetOutLineNds() )
- delete pOutlNds;
+ xTmpOutlNds.reset();
switch( eDocType )
{
commit 362304cbd8ab2a209dbce7377b2742aa7e430729
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 20:21:59 2013 +0100
CID#1028072 leak undo in corner case
Change-Id: If2371a25c9030c13617df692e82729090280d8f0
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 9b165c6..5483746 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -1408,6 +1408,8 @@ void View::ChangeMarkedObjectsBulletsNumbering(
pSdrModel->AddUndo(pUndoGroup);
pSdrModel->EndUndo();
}
+ else
+ delete pUndoGroup;
delete pOutliner;
delete pOutlinerView;
commit b86343eaac52c1508cc651998b23b31c9180c8a7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 20:17:45 2013 +0100
CID#708782 unused pointer value
Change-Id: I15c34278a3dca19547c77be7aca670fbbc2d2037
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index acffd83..38b3931 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -493,7 +493,6 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents)
SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
mpImpl->pEventLB->SetUpdateMode( sal_False );
rListBox.Clear();
- SvTreeListEntry* pE = rListBox.GetEntry( 0 );
EventsHash* eventsHash;
Reference< container::XNameReplace> nameReplace;
if(bAppEvents)
@@ -552,7 +551,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents)
rListBox.MakeVisible( _pE );
}
- pE = rListBox.GetEntry(0);
+ SvTreeListEntry* pE = rListBox.GetEntry(0);
if( pE )
{
rListBox.Select( pE );
commit 2a20c95e84998b88056ac462e6d3b488ca97aae2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 20:12:02 2013 +0100
CID#738572 uninitialized members
Change-Id: Ie3614d86e27aab67cfe68bea76de30b775173fb3
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 7561e72..395fba8 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -95,6 +95,7 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< conne
,m_xMetaData(NULL)
,m_nRowPos(0)
,m_nOldRowPos(0)
+ ,m_bWasNull(false)
,m_nFetchSize(0)
,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE)
,m_nFetchDirection(FetchDirection::FORWARD)
@@ -107,12 +108,12 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< conne
,m_nParamIndex(0)
,m_bIsAlwaysFalseQuery(sal_False)
,m_pKeySet(NULL)
+ ,m_pSortIndex(NULL)
,m_nNewRow(0)
,m_nUpdatedRow(0)
,m_RowStates(0)
,m_bIsReadOnly(-1)
{
-
//m_aQuery.setMaxNrOfReturns(pStmt->getOwnConnection()->getMaxResultRecords());
}
// -------------------------------------------------------------------------
commit 1ce668649beacdd091f8d6ae5d7796c4b785e606
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 17:04:16 2013 +0100
CID#738564 uninitialized member
Change-Id: I35a4d3d412b1848fe3ef8aed600471fc1c8a61d2
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e24e7e5..2745641 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3809,6 +3809,7 @@ void clearUnoServiceCtors( void )
SbUnoServiceCtor::SbUnoServiceCtor( const OUString& aName_, Reference< XServiceConstructorDescription > xServiceCtorDesc )
: SbxMethod( aName_, SbxOBJECT )
, m_xServiceCtorDesc( xServiceCtorDesc )
+ , pNext(0)
{
}
commit dbd73b709709fbda781b0b34313f6b70f0e21818
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 16:55:56 2013 +0100
CID#707638 uninitialized members
Change-Id: Ic0757e544e42f7ca07cddec379d2d647822d9923
diff --git a/basic/source/classes/sbintern.cxx b/basic/source/classes/sbintern.cxx
index 6b3fa49..4e2c72d 100644
--- a/basic/source/classes/sbintern.cxx
+++ b/basic/source/classes/sbintern.cxx
@@ -37,11 +37,13 @@ SbiGlobals* GetSbData()
SbiGlobals::SbiGlobals()
{
pInst = NULL;
- pMod = NULL;
pSbFac= NULL;
pUnoFac = NULL;
pTypeFac = NULL;
+ pClassFac = NULL;
pOLEFac = NULL;
+ pFormFac = NULL;
+ pMod = NULL;
pCompMod = NULL; // JSM
nInst = 0;
nCode = 0;
commit 676b3abe1aa9ab3af8efa5835469cbca0d8829ab
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 16:50:45 2013 +0100
CID#704124 wrong operator used, harmless though
Change-Id: I029a8df204ea4faf16e801ff90cd715adfe8e713
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 4b7b303..301acda 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -817,7 +817,7 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, DeleteHdl)
short ChineseDictionaryDialog::Execute()
{
sal_Int32 nTextConversionOptions = m_nTextConversionOptions;
- if(m_nTextConversionOptions | i18n::TextConversionOption::USE_CHARACTER_VARIANTS )
+ if(m_nTextConversionOptions & i18n::TextConversionOption::USE_CHARACTER_VARIANTS )
nTextConversionOptions = nTextConversionOptions^i18n::TextConversionOption::USE_CHARACTER_VARIANTS ;
m_aCT_DictionaryToSimplified.refillFromDictionary( nTextConversionOptions );
commit 43f7217f789478f23d607f40493d0df822cd5988
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 16:47:57 2013 +0100
CID#704127 coverity gold, typo, should be 0x0020 not 0x002
Change-Id: I22895d43efef47850dfb9162f75bf5a9e39f9614
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 40395cb..d339e93 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -7169,7 +7169,7 @@ void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
sal_uInt16 a16Bit = fKerningPunct;
a16Bit |= (iJustification << 1) & 0x0006;
a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
- a16Bit |= (f2on1 << 5) & 0x002;
+ a16Bit |= (f2on1 << 5) & 0x0020;
a16Bit |= (reserved1 << 6) & 0x03C0;
a16Bit |= (reserved2 << 10) & 0xFC00;
Set_UInt16(pData,a16Bit);
commit ece57bd9954643e1131ab5da6db589665193fe3b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 16:44:16 2013 +0100
CID#705101 try and help coverity out re infinite loop
Change-Id: I4a072d4d3bb510b65d213cf3cd1f5e06c519d830
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index d8bdabd..40395cb 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6032,8 +6032,8 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
if( 10 < nRead )
rSt.SeekRel( nRead-10 );
}
- while( !this ); // Trick: obiger Block wird genau einmal durchlaufen
- // und kann vorzeitig per "break" verlassen werden.
+ while( 0 ); // Trick: obiger Block wird genau einmal durchlaufen
+ // und kann vorzeitig per "break" verlassen werden.
if( (0 != rSt.GetError()) || !nRead )
DELETEZ( pStd ); // per NULL den Error melden
commit 9390ff136c89dcf21512c07e7c552294fdbbe83f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 16:42:57 2013 +0100
CID#705102 try and help coverity out re infinite loop
Change-Id: I04fee0ebe13e6f3ab8f517c99929d30ecbc7fd62
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 4356510..d8bdabd 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5956,8 +5956,8 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
if( 20 < nRead )
rSt.SeekRel( nRead-20 );
}
- while( !this ); // Trick: obiger Block wird genau einmal durchlaufen
- // und kann vorzeitig per "break" verlassen werden.
+ while( 0 ); // Trick: obiger Block wird genau einmal durchlaufen
+ // und kann vorzeitig per "break" verlassen werden.
nRemaining -= cbStshi;
commit 80afec77c21a88fc19626d5faf931ac5af5e86f1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 6 16:32:37 2013 +0100
CID#708496 uninitialized member
Change-Id: I9118853324a84fc2e4d3db46d95c6ef3b266667d
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index ce79ae2..9a0b188 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -37,6 +37,7 @@ namespace ww8
WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent)
: mpParent(pParent)
+, mnDepth(0)
, mnCell(0)
, mnRow(0)
, mnShadowsBefore(0)
commit fad9d93ee43f9ab5ed32a0863e8105add4d93740
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 20:18:27 2013 +0100
CID#708574 uninitialized members
Change-Id: I9b004005ac1136861759a33cee08cd945ac7d993
diff --git a/vcl/inc/impoct.hxx b/vcl/inc/impoct.hxx
index 81431c0..860a898 100644
--- a/vcl/inc/impoct.hxx
+++ b/vcl/inc/impoct.hxx
@@ -28,17 +28,25 @@
class ImpErrorQuad
{
- long nRed;
- long nGreen;
- long nBlue;
+ long nRed;
+ long nGreen;
+ long nBlue;
public:
- inline ImpErrorQuad() {}
- inline ImpErrorQuad( const BitmapColor& rColor ) :
- nRed ( (long) rColor.GetRed() << 5L ),
- nGreen ( (long) rColor.GetGreen() << 5L ),
- nBlue ( (long) rColor.GetBlue() << 5L ) {}
+ ImpErrorQuad()
+ : nRed(0)
+ , nGreen(0)
+ , nBlue(0)
+ {
+ }
+
+ ImpErrorQuad( const BitmapColor& rColor )
+ : nRed( (long) rColor.GetRed() << 5L )
+ , nGreen( (long) rColor.GetGreen() << 5L )
+ , nBlue( (long) rColor.GetBlue() << 5L )
+ {
+ }
inline void operator=( const BitmapColor& rColor );
inline ImpErrorQuad& operator-=( const BitmapColor& rColor );
commit 51f6eaec244bb8568f9d1ccdc647f34ca81f55d5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 17:18:49 2013 +0100
CID#708635 uninitialized members
Change-Id: I875f11347c8d73297ef19c7da858b7246ebd44ca
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 2bd1e0f..e037cd7 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -1912,6 +1912,7 @@ PolyArgs::PolyArgs( PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints )
{
mpPointAry = new Point[ mnMaxPoints ];
mpFlagAry = new sal_uInt8 [ mnMaxPoints ];
+ maPosition.x = maPosition.y = 0;
}
// -----------------------------------------------------------------------
commit 6edf8cf6c66dc4a27fae3f15bfa9fc6de7a3f9af
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 17:15:07 2013 +0100
CID#708895 unused variable
Change-Id: I09ff8a9e7c15c45d6d95c6abd750a4f1386a87ac
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 0f29586..2bff647 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -415,7 +415,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
gfi->afmVersion = strdup( keyword );
break;
case COMMENT:
- keyword = linetoken(fp);
+ linetoken(fp);
break;
case FONTNAME:
if ((keyword = token(fp,tokenlen)) != NULL)
commit 12b3dc23907d10023a3ab0a9235a74e4ae4619fe
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 16:44:30 2013 +0100
CID#707636 uninitialized members
Change-Id: I7eba8ac0f676a2a16dc12ed423356539aec7148b
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 162fcd4..c074855 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -30,7 +30,7 @@ SbiImage::SbiImage()
pStringOff = NULL;
pStrings = NULL;
pCode = NULL;
- pLegacyPCode = NULL;
+ pLegacyPCode = NULL;
nFlags = 0;
nStrings = 0;
nStringSize= 0;
@@ -41,6 +41,8 @@ SbiImage::SbiImage()
bError = false;
bFirstInit = true;
eCharSet = osl_getThreadTextEncoding();
+ nStringIdx = 0;
+ nStringOff = 0;
}
SbiImage::~SbiImage()
commit 5d61c4f8bef10a702faa23a7f06508d5e6b35d2e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 16:41:58 2013 +0100
CID#738563 uninitialized member
Change-Id: I5413099beb3b30f92b58f973fa4bb03f29e7f5c3
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 1b31518..96dc434 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -446,8 +446,12 @@ private:
size_t CurrentLib;
public:
+ BasicLibs()
+ : CurrentLib(0)
+ {
+ }
~BasicLibs();
- OUString aBasicLibPath; // TODO: Should be member of manager, but currently not incompatible
+ OUString aBasicLibPath; // TODO: Should be member of manager, but currently not incompatible
BasicLibInfo* GetObject( size_t i );
BasicLibInfo* First();
BasicLibInfo* Next();
commit bb84effbc0e4fe1b718ff8aa101c3811b0c568e4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 16:38:37 2013 +0100
more fix higher debug level build
Change-Id: Ifc76287f330818d87f52af9186caf787471a94a9
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 51dbb32..417d1b9 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -174,7 +174,7 @@ class SwCalc
SwSbxValue nLastLeft;
SwSbxValue nNumberValue;
SwCalcExp aErrExpr;
- xub_StrLen nCommandPos;
+ sal_Int32 nCommandPos;
SwDoc& rDoc;
SvtSysLocale m_aSysLocale;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 096c8ca..9082c04 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -657,7 +657,7 @@ SwCalcOper SwCalc::GetToken()
coContFlags, aEmptyStr );
bool bSetError = true;
- xub_StrLen nRealStt = nCommandPos + (xub_StrLen)aRes.LeadingWhiteSpace;
+ sal_Int32 nRealStt = nCommandPos + aRes.LeadingWhiteSpace;
if( aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) )
{
nNumberValue.PutDouble( aRes.Value );
@@ -675,7 +675,7 @@ SwCalcOper SwCalc::GetToken()
// catch currency symbol
if( sLowerCaseName == sCurrSym )
{
- nCommandPos = (xub_StrLen)aRes.EndPos;
+ nCommandPos = aRes.EndPos;
return GetToken(); // call again
}
@@ -701,7 +701,7 @@ SwCalcOper SwCalc::GetToken()
default:
break;
}
- nCommandPos = (xub_StrLen)aRes.EndPos;
+ nCommandPos = aRes.EndPos;
return eCurrOper;
}
aVarName = aName;
@@ -848,7 +848,7 @@ SwCalcOper SwCalc::GetToken()
eError = CALC_SYNTAX;
eCurrOper = CALC_PRINT;
}
- nCommandPos = (xub_StrLen)aRes.EndPos;
+ nCommandPos = aRes.EndPos;
};
#if OSL_DEBUG_LEVEL > 1
@@ -993,17 +993,17 @@ SwCalcOper SwCalc::GetToken()
case '"':
{
- xub_StrLen nStt = nCommandPos;
+ sal_Int32 nStt = nCommandPos;
while( 0 != ( ch = NextCh( sCommand, nCommandPos ) ) &&
'"' != ch )
{
;
}
- xub_StrLen nLen = nCommandPos - nStt;
+ sal_Int32 nLen = nCommandPos - nStt;
if( '"' == ch )
--nLen;
- nNumberValue.PutString( sCommand.Copy( nStt, nLen ));
+ nNumberValue.PutString( sCommand.copy( nStt, nLen ));
eCurrOper = CALC_NUMBER;
}
break;
@@ -1012,7 +1012,7 @@ SwCalcOper SwCalc::GetToken()
if (ch && (pCharClass->isLetter( sCommand, nCommandPos - 1) ||
'_' == ch))
{
- xub_StrLen nStt = nCommandPos-1;
+ sal_Int32 nStt = nCommandPos-1;
while( 0 != (ch = NextCh( sCommand, nCommandPos )) &&
(pCharClass->isLetterNumeric( sCommand, nCommandPos - 1) ||
ch == '_' || ch == '.' ) )
commit 8bf74a9e51272ea7808286160e27c8642a8bf2b8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 13:11:35 2013 +0100
CID#738562 uninitialized member
Change-Id: I65f64b1604c9c0aa3538d6e9384014fd44e16c0b
diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx
index b2bfb6e..d315227 100644
--- a/basctl/source/dlged/dlgedpage.cxx
+++ b/basctl/source/dlged/dlgedpage.cxx
@@ -29,8 +29,9 @@ TYPEINIT1( DlgEdPage, SdrPage );
//----------------------------------------------------------------------------
-DlgEdPage::DlgEdPage( DlgEdModel& rModel, bool bMasterPage )
- :SdrPage( rModel, bMasterPage )
+DlgEdPage::DlgEdPage(DlgEdModel& rModel, bool bMasterPage)
+ : SdrPage(rModel, bMasterPage)
+ , pDlgEdForm(0)
{
}
commit 78d47adbf23f9d505ecf2f85cb8564ea43c383c8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 13:09:44 2013 +0100
CID#738561 uninitialized member
Change-Id: Icac2ca781f067975746d4b861fcbd60e6577b64e
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 8ee3f9f..058f9c1 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -68,20 +68,21 @@ static OUString aTitlePropName( "Title" );
TYPEINIT1( DlgEdHint, SfxHint );
-DlgEdHint::DlgEdHint (Kind eHint) :
- eKind(eHint)
-{ }
-
-
-DlgEdHint::DlgEdHint (Kind eHint, DlgEdObj* pObj) :
- eKind(eHint),
- pDlgEdObj(pObj)
-{ }
+DlgEdHint::DlgEdHint(Kind eHint)
+ : eKind(eHint)
+ , pDlgEdObj(0)
+{
+}
+DlgEdHint::DlgEdHint(Kind eHint, DlgEdObj* pObj)
+ : eKind(eHint)
+ , pDlgEdObj(pObj)
+{
+}
DlgEdHint::~DlgEdHint()
-{ }
-
+{
+}
//============================================================================
// DlgEditor
commit 2b5caba5d8780ad36a6403d811a5004fd9f84640
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 13:07:53 2013 +0100
CID#738560 uninitialized member
Change-Id: I270455041b73450e6ed1fc5a05e68c88db4310ab
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index c1b76c5..14f2fce 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -477,11 +477,12 @@ IMPL_LINK_NOARG(ExportDialog, OkButtonHandler)
}
ExportDialog::ExportDialog( Window * pParent )
- : ModalDialog( pParent, IDEResId( RID_DLG_EXPORT ) ),
- maExportAsPackageButton( this, IDEResId( RB_EXPORTASPACKAGE ) ),
- maExportAsBasicButton( this, IDEResId( RB_EXPORTASBASIC ) ),
- maOKButton( this, IDEResId( RID_PB_OK ) ),
- maCancelButton( this, IDEResId( RID_PB_CANCEL ) )
+ : ModalDialog( pParent, IDEResId( RID_DLG_EXPORT ) )
+ , maExportAsPackageButton( this, IDEResId( RB_EXPORTASPACKAGE ) )
+ , maExportAsBasicButton( this, IDEResId( RB_EXPORTASBASIC ) )
+ , maOKButton( this, IDEResId( RID_PB_OK ) )
+ , maCancelButton( this, IDEResId( RID_PB_CANCEL ) )
+ , mbExportAsPackage(false)
{
FreeResource();
maExportAsPackageButton.Check();
commit c4597f281e0e865f190669d583a321a28c2e3e35
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 13:05:56 2013 +0100
CID#984418 unused returned pointer
Change-Id: I92864b2491882e0553b87d9d87d126ec30ef3974
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index db27acf..4699117 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -457,7 +457,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
else
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- pLibSubRootEntry = AddEntry(
+ AddEntry(
aEntryName,
Image( IDEResId( RID_IMG_MODLIB ) ),
pLibRootEntry, true,
commit ea8d6dd3dbd19434964a9cda1547ae067a674351
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 13:04:16 2013 +0100
CID#984417 unused returned pointer
Change-Id: I638d7d89b7c1414aac34bcf1c92fdde8eee98e2a
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 4f208f7..db27acf 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -312,7 +312,7 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
else
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- pLibRootEntry = AddEntry(
+ AddEntry(
aLibName,
Image( IDEResId( nId ) ),
pDocumentRootEntry, true,
commit 61d05a58fba979f0259b2814fd599c4ca58e4a56
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 13:03:10 2013 +0100
CID#738954 unused returned pointer
Change-Id: Ieb47b91dd745db400c7ad4756167de758a625a64
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index b797592..4f208f7 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -246,7 +246,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
Image aImage;
GetRootEntryBitmaps( rDocument, aImage );
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- pDocumentRootEntry = AddEntry(
+ AddEntry(
aRootName,
aImage,
0, true,
commit faa63bb99c8f03091b159de594515ff380874186
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 11:20:35 2013 +0100
CID#708571 uninitialized members
Change-Id: I786b81d0982e814a9f9f8d88cb724042de7cfd81
diff --git a/vbahelper/source/vbahelper/vbapagesetupbase.cxx b/vbahelper/source/vbahelper/vbapagesetupbase.cxx
index a47f591..6222de0 100644
--- a/vbahelper/source/vbahelper/vbapagesetupbase.cxx
+++ b/vbahelper/source/vbahelper/vbapagesetupbase.cxx
@@ -22,7 +22,10 @@ using namespace ::com::sun::star;
using namespace ::ooo::vba;
VbaPageSetupBase::VbaPageSetupBase(const uno::Reference< XHelperInterface >& xParent,
- const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException): VbaPageSetupBase_BASE( xParent, xContext )
+ const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
+ : VbaPageSetupBase_BASE( xParent, xContext )
+ , mnOrientLandscape(0)
+ , mnOrientPortrait(0)
{
}
commit 225539ab08043b6937fdd67d9ae308ebd4104646
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 10:32:12 2013 +0100
CID#736943 clamp no of ttc entries to physical max
Change-Id: Ic63defe9c14c6ee2b86bd5b7730a570238ca3981
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 2ab8e6c..6d47ed5 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1175,6 +1175,39 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "ttc: %s contains %d fonts\n", aFullPath.getStr(), nLength );
#endif
+
+ sal_uInt64 fileSize;
+
+ OUString aURL;
+ if (!osl::File::getFileURLFromSystemPath(OStringToOUString(aFullPath, osl_getThreadTextEncoding()),
+ aURL))
+ {
+ fileSize = 0;
+ }
+ else
+ {
+ osl::File aFile(aURL);
+ if (aFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock) != osl::File::E_None)
+ fileSize = 0;
+ else
+ {
+ osl::DirectoryItem aItem;
+ osl::DirectoryItem::get( aURL, aItem );
+ osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileSize );
+ aItem.getFileStatus( aFileStatus );
+ fileSize = aFileStatus.getFileSize();
+ }
+ }
+
+ //Feel free to calc the exact max possible number of fonts a file
+ //could contain given its physical size. But this will clamp it to
+ //a sane starting point
+ //http://processingjs.nihongoresources.com/the_smallest_font/
+ //https://github.com/grzegorzrolek/null-ttf
+ int nMaxFontsPossible = fileSize / 528;
+
+ nLength = std::min(nLength, nMaxFontsPossible);
+
for( int i = 0; i < nLength; i++ )
{
TrueTypeFontFile* pFont = new TrueTypeFontFile();
commit 54250655897009914936f02e04d601eadfddb2c1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 5 10:14:54 2013 +0100
fix higher debug level build
Change-Id: I091a198bc1fac17434ae64c18560dda48d6d5142
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 4227f8f..51dbb32 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -169,7 +169,7 @@ class SwCalc
{
SwHash* VarTable[ TBLSZ ];
String aVarName, sCurrSym;
- String sCommand;
+ OUString sCommand;
std::vector<const SwUserFieldType*> aRekurStk;
SwSbxValue nLastLeft;
SwSbxValue nNumberValue;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index b45ea58..096c8ca 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -646,7 +646,7 @@ SwCalcOper SwCalc::GetToken()
{
#endif
- if( nCommandPos >= sCommand.Len() )
+ if( nCommandPos >= sCommand.getLength() )
return eCurrOper = CALC_ENDCALC;
using namespace ::com::sun::star::i18n;
@@ -666,8 +666,8 @@ SwCalcOper SwCalc::GetToken()
}
else if( aRes.TokenType & KParseType::IDENTNAME )
{
- String aName( sCommand.Copy( nRealStt,
- static_cast<xub_StrLen>(aRes.EndPos) - nRealStt ));
+ String aName( sCommand.copy( nRealStt,
+ aRes.EndPos - nRealStt ) );
//#101436#: The variable may contain a database name. It must not be
// converted to lower case! Instead all further comparisons must be
// done case-insensitive
@@ -716,8 +716,8 @@ SwCalcOper SwCalc::GetToken()
}
else if( aRes.TokenType & KParseType::ONE_SINGLE_CHAR )
{
- String aName( sCommand.Copy( nRealStt,
- static_cast<xub_StrLen>(aRes.EndPos) - nRealStt ));
+ String aName( sCommand.copy( nRealStt,
+ aRes.EndPos - nRealStt ));
if( 1 == aName.Len() )
{
bSetError = false;
@@ -755,8 +755,8 @@ SwCalcOper SwCalc::GetToken()
else
eCurrOper = CALC_NOT, eTmp2 = CALC_NEQ;
- if( aRes.EndPos < sCommand.Len() &&
- '=' == sCommand.GetChar( (xub_StrLen)aRes.EndPos ) )
+ if( aRes.EndPos < sCommand.getLength() &&
+ '=' == sCommand[aRes.EndPos] )
{
eCurrOper = eTmp2;
++aRes.EndPos;
@@ -769,32 +769,32 @@ SwCalcOper SwCalc::GetToken()
break;
case '[':
- if( aRes.EndPos < sCommand.Len() )
+ if( aRes.EndPos < sCommand.getLength() )
{
aVarName.Erase();
- xub_StrLen nFndPos = (xub_StrLen)aRes.EndPos,
+ sal_Int32 nFndPos = aRes.EndPos,
nSttPos = nFndPos;
do {
- if( STRING_NOTFOUND != ( nFndPos =
- sCommand.Search( ']', nFndPos )) )
+ if( -1 != ( nFndPos =
+ sCommand.indexOf( ']', nFndPos )) )
{
// ignore the ]
- if( '\\' == sCommand.GetChar(nFndPos-1))
+ if ('\\' == sCommand[nFndPos-1])
{
- aVarName += sCommand.Copy( nSttPos,
+ aVarName += sCommand.copy( nSttPos,
nFndPos - nSttPos - 1 );
nSttPos = ++nFndPos;
}
else
break;
}
- } while( STRING_NOTFOUND != nFndPos );
+ } while( nFndPos != -1 );
- if( STRING_NOTFOUND != nFndPos )
+ if( nFndPos != -1 )
{
if( nSttPos != nFndPos )
- aVarName += sCommand.Copy( nSttPos,
+ aVarName += sCommand.copy( nSttPos,
nFndPos - nSttPos );
aRes.EndPos = nFndPos + 1;
eCurrOper = CALC_NAME;
@@ -816,8 +816,8 @@ SwCalcOper SwCalc::GetToken()
}
else if( aRes.TokenType & KParseType::BOOLEAN )
{
- String aName( sCommand.Copy( nRealStt,
- static_cast<xub_StrLen>(aRes.EndPos) - nRealStt ));
+ String aName( sCommand.copy( nRealStt,
+ aRes.EndPos - nRealStt ));
if( aName.Len() )
{
sal_Unicode ch = aName.GetChar(0);
@@ -837,7 +837,7 @@ SwCalcOper SwCalc::GetToken()
}
}
}
- else if( nRealStt == sCommand.Len() )
+ else if( nRealStt == sCommand.getLength() )
{
eCurrOper = CALC_ENDCALC;
bSetError = false;
@@ -852,7 +852,7 @@ SwCalcOper SwCalc::GetToken()
};
#if OSL_DEBUG_LEVEL > 1
-#define NextCh( s, n ) (nCommandPos < sCommand.Len() ? sCommand.GetChar( nCommandPos++ ) : 0)
+#define NextCh( s, n ) (nCommandPos < sCommand.getLength() ? sCommand[nCommandPos++] : 0)
}
else
@@ -880,8 +880,8 @@ SwCalcOper SwCalc::GetToken()
case '\n':
{
sal_Unicode c;
- while( nCommandPos < sCommand.Len() &&
- ( ( c = sCommand.GetChar( nCommandPos ) ) == ' ' ||
+ while( nCommandPos < sCommand.getLength() &&
+ ( ( c = sCommand[nCommandPos] ) == ' ' ||
c == '\t' || c == '\x0a' || c == '\x0d' ))
{
++nCommandPos;
@@ -902,7 +902,7 @@ SwCalcOper SwCalc::GetToken()
break;
case '=':
- if( '=' == sCommand.GetChar( nCommandPos ) )
+ if( '=' == sCommand[nCommandPos] )
{
++nCommandPos;
eCurrOper = CALC_EQ;
@@ -914,7 +914,7 @@ SwCalcOper SwCalc::GetToken()
break;
case '!':
- if( '=' == sCommand.GetChar( nCommandPos ) )
+ if( '=' == sCommand[nCommandPos] )
{
++nCommandPos;
eCurrOper = CALC_NEQ;
@@ -928,7 +928,7 @@ SwCalcOper SwCalc::GetToken()
case '>':
case '<':
eCurrOper = '>' == ch ? CALC_GRE : CALC_LES;
- if( '=' == (ch = sCommand.GetChar( nCommandPos ) ) )
+ if( '=' == (ch = sCommand[nCommandPos] ) )
{
++nCommandPos;
eCurrOper = CALC_GRE == eCurrOper ? CALC_GEQ : CALC_LEQ;
@@ -1023,7 +1023,7 @@ SwCalcOper SwCalc::GetToken()
if( ch )
--nCommandPos;
- String aStr( sCommand.Copy( nStt, nCommandPos-nStt ));
+ String aStr( sCommand.copy( nStt, nCommandPos-nStt ));
aStr = pCharClass->lowercase( aStr );
// catch currency symbol
@@ -1481,7 +1481,7 @@ String SwCalc::GetDBName(const String& rName)
SwDBData aData = rDoc.GetDBData();
String sRet = aData.sDataSource;
sRet += DB_DELIM;
- sRet += String(aData.sCommand);
+ sRet += aData.sCommand;
return sRet;
}
commit 4d25561e4e6cd20f36847f6a60434c054437efbb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 4 20:43:39 2013 +0100
CID#708514 uninitialized members
Change-Id: Ib799d3d3ce968bca87d5841d2ecd8cd2f7c51dd0
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index eccc483..6d08eec 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -367,7 +367,12 @@ private:
public:
WW8PLCFx(ww::WordVersion eVersion, bool bSprm)
- : meVer(eVersion), bIsSprm(bSprm), bDirty(false) {}
+ : meVer(eVersion)
+ , bIsSprm(bSprm)
+ , nStartFc(-1)
+ , bDirty(false)
+ {
+ }
virtual ~WW8PLCFx() {}
bool IsSprm() const { return bIsSprm; }
virtual sal_uLong GetIdx() const = 0;
commit a2e5f8d9eecd106c8acf3689981dc8774a71a6a8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 4 20:40:58 2013 +0100
CID#738896 uninitialized members
Change-Id: I69d93000df942d6f4ff6a6bfff4862eb199ea2a0
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 3575f3c..24e6cb7 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -399,12 +399,14 @@ bool Customization::ImportCustomToolBar( SwCTBWrapper& rWrapper, CustomToolBarIm
return true;
}
-TBDelta::TBDelta() : doprfatendFlags(0)
-,ibts(0)
-,cidNext(0)
-,cid(0)
-,fc(0)
-,cbTBC(0)
+TBDelta::TBDelta()
+ : doprfatendFlags(0)
+ , ibts(0)
+ , cidNext(0)
+ , cid(0)
+ , fc(0)
+ , CiTBDE(0)
+ , cbTBC(0)
{
}
More information about the Libreoffice-commits
mailing list