[Libreoffice-commits] core.git: 10 commits - include/svx include/unotools sc/source svx/source sw/source unotools/source xmlreader/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 30 07:26:43 PDT 2014
include/svx/svdpoev.hxx | 6 +++---
include/unotools/ucbhelper.hxx | 2 +-
sc/source/ui/view/tabvwsh2.cxx | 6 ++----
svx/source/svdraw/svddrgmt.cxx | 6 +++---
svx/source/svdraw/svdpoev.cxx | 16 +++-------------
sw/source/core/uibase/shells/annotsh.cxx | 4 ++--
sw/source/ui/fldui/fldfunc.cxx | 2 +-
sw/source/ui/frmdlg/frmpage.cxx | 1 +
sw/source/ui/frmdlg/wrap.cxx | 6 +++++-
unotools/source/ucbhelper/ucbhelper.cxx | 22 ++++++++++++++--------
xmlreader/source/xmlreader.cxx | 5 +++--
11 files changed, 38 insertions(+), 38 deletions(-)
New commits:
commit 9b79e515e73b93601a7771ce6366c4312c07b25a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:35:34 2014 +0100
coverity#738904 Uninitialized scalar field
Change-Id: I6b6955036d2bb98b19eafdb273df886708ec6ab3
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index ab4ea04..400b500 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -40,6 +40,7 @@ using namespace ::com::sun::star;
SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet)
: SwFldPage(pParent, "FldFuncPage",
"modules/swriter/ui/fldfuncpage.ui", rCoreSet)
+ , nOldFormat(0)
, bDropDownLBChanged(false)
{
get(m_pTypeLB, "type");
@@ -86,7 +87,6 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet)
m_pCond1ED->ShowBrackets(false);
m_pCond2ED->ShowBrackets(false);
-
}
SwFldFuncPage::~SwFldFuncPage()
commit 4c9879922d0c77ecc79e6e321ecf9df9e7511218
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:34:43 2014 +0100
coverity#738907 Uninitialized scalar field
Change-Id: I2c82911f47aa6c0fff489e5a4cfd4d171981c722
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 03d6384..cdf91ac 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -64,14 +64,18 @@ SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bD
SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "WrapPage" , "modules/swriter/ui/wrappage.ui", rSet)
+ , nOldLeftMargin(0)
+ , nOldRightMargin(0)
+ , nOldUpperMargin(0)
+ , nOldLowerMargin(0)
, nAnchorId(FLY_AT_PARA)
, nHtmlMode(0)
, pWrtSh(0)
, bFormat(false)
, bNew(true)
, bHtmlMode(false)
+ , bDrawMode(false)
, bContourImage(false)
-
{
get(m_pNoWrapRB, "none");
get(m_pWrapLeftRB, "before");
commit 9ea63828211294bfdea4fda340466ddb5d0c48b3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:32:22 2014 +0100
coverity#738906 Uninitialized scalar field
Change-Id: I9fabb1236011bc04238af0e6952d3ff0f07c9463
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 2775966..8242c6d 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2351,6 +2351,7 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "PicturePage",
"modules/swriter/ui/picturepage.ui", rSet)
, pGrfDlg(0)
+ , bHtmlMode(false)
{
get(m_pMirror, "flipframe");
get(m_pMirrorVertBox, "vert");
commit ca03d495a0d8847366ab041ca8a3ac8f6de93c4e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:30:34 2014 +0100
coverity#708727 Uninitialized pointer field
Change-Id: I816f7e239f83c35666101aac057912dd7e65ecff
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 81e7a38..0d49c42 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -70,8 +70,9 @@ XmlReader::XmlReader(char const *sStr, size_t nLength)
XmlReader::XmlReader(OUString const & fileUrl)
SAL_THROW((
- css::container::NoSuchElementException, css::uno::RuntimeException)):
- fileUrl_(fileUrl)
+ css::container::NoSuchElementException, css::uno::RuntimeException))
+ : fileUrl_(fileUrl)
+ , fileHandle_(0)
{
oslFileError e = osl_openFile(
fileUrl_.pData, &fileHandle_, osl_File_OpenFlag_Read);
commit ac7f1147b7d2c9ddb2b2cf12ef0ea9f45c315e8a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:24:40 2014 +0100
coverity#705024 Dereference after null check
Change-Id: Ida523e52df6ec2c5e62e9a63cd1857650f84234b
diff --git a/sw/source/core/uibase/shells/annotsh.cxx b/sw/source/core/uibase/shells/annotsh.cxx
index f8524be..32b0e77 100644
--- a/sw/source/core/uibase/shells/annotsh.cxx
+++ b/sw/source/core/uibase/shells/annotsh.cxx
@@ -1529,7 +1529,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
case SID_UNDO:
{
- sal_uInt16 nCount = pUndoManager->GetUndoActionCount();
+ sal_uInt16 nCount = pUndoManager ? pUndoManager->GetUndoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
else if (rSh.GetLastUndoInfo(0, 0))
@@ -1542,7 +1542,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
}
case SID_REDO:
{
- sal_uInt16 nCount = pUndoManager->GetRedoActionCount();
+ sal_uInt16 nCount = pUndoManager ? pUndoManager->GetRedoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
else if (rSh.GetFirstRedoInfo(0))
commit 9ebedb7eedfeb7e622038f3c1ca35c439adcf3ae
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:22:26 2014 +0100
coverity#704340 Logically dead code
Change-Id: I785b3faa2a9e3a540c3d09a37686f9ef26643094
diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx
index 8e4f577..ef73aa4 100644
--- a/include/svx/svdpoev.hxx
+++ b/include/svx/svdpoev.hxx
@@ -65,7 +65,7 @@ public:
void MoveMarkedPoints(const Size& rSiz);
void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
- void RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy=false);
+ void RotateMarkedPoints(const Point& rRef, long nWink);
// Hierbei entstehen eventuell beliebig viele neue Objekte:
void RipUpAtMarkedPoints() SAL_OVERRIDE;
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 34be0e1..6b04091 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1741,7 +1741,7 @@ bool SdrDragMove::EndSdrDrag(bool bCopy)
if (IsDraggingPoints())
{
- getSdrDragView().MoveMarkedPoints(Size(DragStat().GetDX(),DragStat().GetDY()),bCopy);
+ getSdrDragView().MoveMarkedPoints(Size(DragStat().GetDX(),DragStat().GetDY()));
}
else if (IsDraggingGluePoints())
{
@@ -2078,7 +2078,7 @@ bool SdrDragResize::EndSdrDrag(bool bCopy)
if (IsDraggingPoints())
{
- getSdrDragView().ResizeMarkedPoints(DragStat().Ref1(),aXFact,aYFact,bCopy);
+ getSdrDragView().ResizeMarkedPoints(DragStat().Ref1(),aXFact,aYFact);
}
else if (IsDraggingGluePoints())
{
@@ -2222,7 +2222,7 @@ bool SdrDragRotate::EndSdrDrag(bool bCopy)
{
if (IsDraggingPoints())
{
- getSdrDragView().RotateMarkedPoints(DragStat().GetRef1(),nWink,bCopy);
+ getSdrDragView().RotateMarkedPoints(DragStat().GetRef1(),nWink);
}
else if (IsDraggingGluePoints())
{
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index ea5f509..1f16166 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -694,12 +694,10 @@ static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const
if (pC2!=NULL) RotatePoint(*pC2,*(const Point*)p1,*(const double*)p3,*(const double*)p4);
}
-void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy)
+void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nWink)
{
- bCopy=false; // TODO: not yet implemented
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditResize));
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_ROTATE);
double nSin=sin(nWink*nPi180);
double nCos=cos(nWink*nPi180);
commit 2742d8421b18f2d00bcc5147b79202973f3c11fb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:21:40 2014 +0100
coverity#704339 Logically dead code
Change-Id: I944368eff5bf24bbdefd485f34bfd3a51fb1114e
diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx
index 198cd9c..8e4f577 100644
--- a/include/svx/svdpoev.hxx
+++ b/include/svx/svdpoev.hxx
@@ -64,7 +64,7 @@ public:
bool IsDeleteMarkedPointsPossible() const SAL_OVERRIDE;
void MoveMarkedPoints(const Size& rSiz);
- void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
+ void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
void RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy=false);
// Hierbei entstehen eventuell beliebig viele neue Objekte:
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index c6720cd..ea5f509 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -670,8 +670,6 @@ void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz)
AdjustMarkHdl();
}
-
-
static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* /*p4*/, const void* /*p5*/)
{
ResizePoint(rPt,*(const Point*)p1,*(const Fraction*)p2,*(const Fraction*)p3);
@@ -679,20 +677,16 @@ static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const
if (pC2!=NULL) ResizePoint(*pC2,*(const Point*)p1,*(const Fraction*)p2,*(const Fraction*)p3);
}
-void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy)
+void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
{
- bCopy=false; // TODO: not yet implemented
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditResize));
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_RESIZE);
ImpTransformMarkedPoints(ImpResize,&rRef,&xFact,&yFact);
EndUndo();
AdjustMarkHdl();
}
-
-
static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* /*p2*/, const void* p3, const void* p4, const void* /*p5*/)
{
RotatePoint(rPt,*(const Point*)p1,*(const double*)p3,*(const double*)p4);
commit 0389ecdb4b0c3f928f5a23712cfe3572da404fde
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:20:24 2014 +0100
coverity#704338 Logically dead code
Change-Id: I031530ebd419c038e757c7ba01b387d28b56580d
diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx
index 568b7f4..198cd9c 100644
--- a/include/svx/svdpoev.hxx
+++ b/include/svx/svdpoev.hxx
@@ -63,7 +63,7 @@ public:
void DeleteMarkedPoints() SAL_OVERRIDE;
bool IsDeleteMarkedPointsPossible() const SAL_OVERRIDE;
- void MoveMarkedPoints(const Size& rSiz, bool bCopy=false);
+ void MoveMarkedPoints(const Size& rSiz);
void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
void RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy=false);
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 50f9f50..c6720cd 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -660,12 +660,10 @@ static void ImpMove(Point& rPt, Point* pC1, Point* pC2, const void* p1, const vo
if (pC2!=NULL) MovePoint(*pC2,*(const Size*)p1);
}
-void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz, bool bCopy)
+void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz)
{
- bCopy=false; // TODO: not yet implemented
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditMove));
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_MOVE);
ImpTransformMarkedPoints(ImpMove,&rSiz);
EndUndo();
commit e1cb7a25660325fc2fee960401ff35f019a3e6fb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:19:00 2014 +0100
coverity#704283 Logically dead code
Change-Id: Ic0cab9b6093ceff654eb1ad2fe70a0720506b149
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 76ea68e..e24091c 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -249,6 +249,8 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
SfxRequest aNewReq(rReq);
aNewReq.SetSlot(nDrawSfxId);
+ assert(nNewId != SID_DRAW_CHART); //#i71254# handled already above
+
switch (nNewId)
{
case SID_OBJECT_SELECT:
@@ -296,10 +298,6 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
nFormSfxId = nNewFormId;
break;
- case SID_DRAW_CHART:
- pTabView->SetDrawFuncPtr(new FuMarkRect(this, pWin, pView, pDoc, aNewReq));
- break;
-
case SID_DRAWTBX_CS_BASIC :
case SID_DRAWTBX_CS_SYMBOL :
case SID_DRAWTBX_CS_ARROW :
commit 402fffb74e36cab6a2a4f5da64154713d9ddc235
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 30 12:01:49 2014 +0100
coverity#1209935 Uncaught exception
and hopefully a million more
Change-Id: Ib1326cae3ec93855b311a8cf4e9e6f9def199d44
diff --git a/include/unotools/ucbhelper.hxx b/include/unotools/ucbhelper.hxx
index ee291b6..6234e8e 100644
--- a/include/unotools/ucbhelper.hxx
+++ b/include/unotools/ucbhelper.hxx
@@ -63,7 +63,7 @@ UNOTOOLS_DLLPUBLIC bool MakeFolder(
UNOTOOLS_DLLPUBLIC bool ensureFolder(
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xCtx,
com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > xEnv,
- const OUString& rFolder, ucbhelper::Content & result);
+ const OUString& rFolder, ucbhelper::Content & result) throw();
/// @return the value of the "Size" property of the given content, or zero if
/// obtaining the property yields a void value or raises a
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index f20aaee..45c6fdb 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -457,17 +457,23 @@ bool utl::UCBContentHelper::EqualURLs(
bool utl::UCBContentHelper::ensureFolder(
css::uno::Reference< css::uno::XComponentContext > xCtx,
css::uno::Reference< css::ucb::XCommandEnvironment > xEnv,
- const OUString& rFolder, ucbhelper::Content & result)
+ const OUString& rFolder, ucbhelper::Content & result) throw()
{
- INetURLObject aURL( rFolder );
- OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- aURL.removeSegment();
- ::ucbhelper::Content aParent;
+ try
+ {
+ INetURLObject aURL( rFolder );
+ OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ aURL.removeSegment();
+ ::ucbhelper::Content aParent;
- if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::NO_DECODE ),
- xEnv, xCtx, aParent ) )
+ if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::NO_DECODE ),
+ xEnv, xCtx, aParent ) )
+ {
+ return ::utl::UCBContentHelper::MakeFolder(aParent, aTitle, result);
+ }
+ }
+ catch (...)
{
- return ::utl::UCBContentHelper::MakeFolder(aParent, aTitle, result);
}
return false;
More information about the Libreoffice-commits
mailing list