[Libreoffice-commits] core.git: 22 commits - canvas/source dbaccess/source desktop/source extensions/source filter/source framework/source include/filter include/toolkit linguistic/source oox/source sc/AllLangResTarget_sc.mk sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk sfx2/source svl/source svx/uiconfig sw/inc sw/source
Caolán McNamara
caolanm at redhat.com
Tue Feb 11 12:22:18 PST 2014
canvas/source/simplecanvas/simplecanvasimpl.cxx | 6
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 13
desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 12
desktop/source/migration/services/oo3extensionmigration.cxx | 10
extensions/source/propctrlr/formcomponenthandler.cxx | 25 -
filter/source/msfilter/msdffimp.cxx | 5
framework/source/layoutmanager/layoutmanager.cxx | 8
include/filter/msfilter/msdffimp.hxx | 1
include/toolkit/controls/unocontrolcontainermodel.hxx | 1
linguistic/source/hyphdsp.cxx | 3
linguistic/source/spelldsp.cxx | 3
linguistic/source/thesdsp.cxx | 3
oox/source/drawingml/diagram/diagram.cxx | 2
sc/AllLangResTarget_sc.mk | 1
sc/UIConfig_scalc.mk | 1
sc/inc/sc.hrc | 1
sc/inc/scabstdlg.hxx | 1
sc/source/core/tool/scmatrix.cxx | 2
sc/source/ui/attrdlg/scdlgfact.cxx | 16 -
sc/source/ui/attrdlg/scdlgfact.hxx | 1
sc/source/ui/docshell/docsh4.cxx | 2
sc/source/ui/inc/corodlg.hxx | 49 +--
sc/source/ui/src/miscdlgs.src | 68 ----
sc/uiconfig/scalc/ui/changesourcedialog.ui | 149 ++++++++++
sfx2/source/bastyp/sfxhtml.cxx | 2
svl/source/items/poolio.cxx | 156 ++++-------
svx/uiconfig/ui/sidebarparagraph.ui | 3
sw/inc/expfld.hxx | 3
sw/inc/txtfld.hxx | 4
sw/source/core/fields/expfld.cxx | 32 ++
sw/source/core/fields/usrfld.cxx | 8
sw/source/core/txtnode/atrfld.cxx | 24 +
sw/source/filter/html/htmlform.cxx | 10
sw/source/filter/html/htmlgrin.cxx | 3
34 files changed, 339 insertions(+), 289 deletions(-)
New commits:
commit 927ef371a788d94a002dcf30a30274599832ef32
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 17:00:21 2014 +0000
Related: fdo#74681 add tooltips to indenters
Change-Id: If19f115c1374236ffc1022062154778157524548
diff --git a/svx/uiconfig/ui/sidebarparagraph.ui b/svx/uiconfig/ui/sidebarparagraph.ui
index 9c3125a..97b87b1 100644
--- a/svx/uiconfig/ui/sidebarparagraph.ui
+++ b/svx/uiconfig/ui/sidebarparagraph.ui
@@ -423,6 +423,7 @@
<object class="svxlo-SvxRelativeField" id="beforetextindent">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Before Text Indent</property>
<property name="hexpand">True</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustment1</property>
@@ -462,6 +463,7 @@
<object class="svxlo-SvxRelativeField" id="aftertextindent">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">After Text Indent</property>
<property name="hexpand">True</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustment1</property>
@@ -501,6 +503,7 @@
<object class="svxlo-SvxRelativeField" id="firstlineindent">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">First Line Indent</property>
<property name="hexpand">True</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustment1</property>
commit 604426cc41770a4af56e1fa8ac1337db34ef32cc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 16:42:17 2014 +0000
convert change chart data source dialog to .ui
Change-Id: Iecccfbcd6b1eaec9d14c594812293c3e2acfda46
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 7625aef..6d0c2a8 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -41,7 +41,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/sc.src \
sc/source/ui/src/hdrcont.src \
sc/source/ui/src/scerrors.src \
- sc/source/ui/src/miscdlgs.src \
sc/source/ui/src/scstring.src \
sc/source/ui/src/filter.src \
sc/source/ui/src/condformatdlg.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 28709b5..f68519b 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/allheaderfooterdialog \
sc/uiconfig/scalc/ui/analysisofvariancedialog \
sc/uiconfig/scalc/ui/cellprotectionpage \
+ sc/uiconfig/scalc/ui/changesourcedialog \
sc/uiconfig/scalc/ui/chardialog \
sc/uiconfig/scalc/ui/colorrowdialog \
sc/uiconfig/scalc/ui/colwidthdialog \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index c0a35e0..1c4a370 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1043,7 +1043,6 @@
#define RID_SCDLG_CONTACTS (SC_DIALOGS_START + 78)
#define RID_SCPAGE_STAT (SC_DIALOGS_START + 79)
-#define RID_SCDLG_CHARTCOLROW (SC_DIALOGS_START + 80)
#define RID_SCDLG_AREAS (SC_DIALOGS_START + 81)
// popup for drop-mode in navigator
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 39fd50c..4df250c 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -338,7 +338,6 @@ public:
ScDocument* pDoc,
int nId) = 0;
virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent,
- int nId,
sal_Bool bCol = false,
sal_Bool bRow = false) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 381e868..ba419fe 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -638,23 +638,11 @@ AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( W
}
AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent,
- int nId,
sal_Bool bCol ,
sal_Bool bRow)
{
- ScColRowLabelDlg* pDlg=NULL;
- switch ( nId )
- {
- case RID_SCDLG_CHARTCOLROW :
- pDlg = new ScColRowLabelDlg( pParent, bCol,bRow );
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new AbstractScColRowLabelDlg_Impl( pDlg );
- return 0;
+ ScColRowLabelDlg* pDlg = new ScColRowLabelDlg( pParent, bCol,bRow );
+ return new AbstractScColRowLabelDlg_Impl( pDlg );
}
AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const OUString& rExtendText, const OUString& rCurrentText )
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 141fd5e..c58bf4f 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -407,7 +407,6 @@ public:
ScDocument* pDoc,
int nId);
virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent,
- int nId,
sal_Bool bCol = false,
sal_Bool bRow = false);
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 6cbd08b..b0d4d30 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -332,7 +332,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScColRowLabelDlg* pDlg = pFact->CreateScColRowLabelDlg( pParent, RID_SCDLG_CHARTCOLROW, bRowHeaders, bColHeaders);
+ AbstractScColRowLabelDlg* pDlg = pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders);
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
index a59edfe..2b9f812 100644
--- a/sc/source/ui/inc/corodlg.hxx
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -22,47 +22,30 @@
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-
-#include "sc.hrc"
-#include "scresid.hxx"
-
-//------------------------------------------------------------------------
class ScColRowLabelDlg : public ModalDialog
{
public:
- ScColRowLabelDlg( Window* pParent,
- sal_Bool bCol = false,
- sal_Bool bRow = false )
- : ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ),
- aFlColRow ( this, ScResId(6) ),
- aBtnRow ( this, ScResId(2) ),
- aBtnCol ( this, ScResId(1) ),
- aBtnOk ( this, ScResId(3) ),
- aBtnCancel ( this, ScResId(4) ),
- aBtnHelp ( this, ScResId(5) )
- {
- FreeResource();
- aBtnCol.Check( bCol );
- aBtnRow.Check( bRow );
- }
-
- sal_Bool IsCol() { return aBtnCol.IsChecked(); }
- sal_Bool IsRow() { return aBtnRow.IsChecked(); }
+ ScColRowLabelDlg(Window* pParent,
+ bool bCol = false,
+ bool bRow = false)
+ : ModalDialog(pParent, "ChangeSourceDialog",
+ "modules/scalc/ui/changesourcedialog.ui")
+ {
+ get(m_pBtnRow, "row");
+ get(m_pBtnCol, "col");
+ m_pBtnCol->Check(bCol);
+ m_pBtnRow->Check(bRow);
+ }
+
+ bool IsCol() const { return m_pBtnCol->IsChecked(); }
+ bool IsRow() const { return m_pBtnRow->IsChecked(); }
private:
- FixedLine aFlColRow;
- CheckBox aBtnRow;
- CheckBox aBtnCol;
- OKButton aBtnOk;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
+ CheckBox* m_pBtnRow;
+ CheckBox* m_pBtnCol;
};
-
#endif
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
deleted file mode 100644
index 20206df..0000000
--- a/sc/source/ui/src/miscdlgs.src
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "miscdlgs.hrc"
-
-ModalDialog RID_SCDLG_CHARTCOLROW
-{
- HelpID = "sc:ModalDialog:RID_SCDLG_CHARTCOLROW";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 191 , 63 ) ;
- Moveable = TRUE ;
- CheckBox 1
- {
- HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:1";
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 114 , 10 ) ;
- Text [ en-US ] = "First ~column as label" ;
- };
- CheckBox 2
- {
- HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:2";
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 114 , 10 ) ;
- Text [ en-US ] = "First ~row as label" ;
- };
- FixedLine 6
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 123 , 8 ) ;
- Text [ en-US ] = "Labels" ;
- };
- OKButton 3
- {
- Pos = MAP_APPFONT ( 135 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
- };
- CancelButton 4
- {
- Pos = MAP_APPFONT ( 135 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- HelpButton 5
- {
- Pos = MAP_APPFONT ( 135 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- Text [ en-US ] = "Change Source Data Range" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/changesourcedialog.ui b/sc/uiconfig/scalc/ui/changesourcedialog.ui
new file mode 100644
index 0000000..a6c370d
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/changesourcedialog.ui
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="ChangeSourceDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Change Source Data Range</property>
+ <property name="type_hint">normal</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="col">
+ <property name="label" translatable="yes">First _column as label</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="row">
+ <property name="label" translatable="yes">First _row as label</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Labels</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit 0b9aa86ec7896775f026ee1a117a014fa8c95581
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 16:06:48 2014 +0000
coverity#738614 Uninitialized pointer field
Change-Id: I368137f202b0247e0df4f12c2b09be145086ce00
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 6021ee0..468d928 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -90,13 +90,14 @@ namespace dbaui
OConnectionHelper::OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs)
- :OGenericAdministrationPage(pParent, _rId, _rCoreAttrs)
- ,m_aFT_Connection ( this, ResId( FT_AUTOBROWSEURL, *_rId.GetResMgr() ) )
- ,m_aConnectionURL ( this, ResId( ET_AUTOBROWSEURL, *_rId.GetResMgr() ) )
- ,m_aPB_Connection ( this, ResId( PB_AUTOBROWSEURL, *_rId.GetResMgr() ) )
- ,m_aPB_CreateDB ( this, ResId( PB_CREATEDB, *_rId.GetResMgr() ) )
+ : OGenericAdministrationPage(pParent, _rId, _rCoreAttrs)
+ , m_bUserGrabFocus(false)
+ , m_aFT_Connection(this, ResId(FT_AUTOBROWSEURL, *_rId.GetResMgr()))
+ , m_aConnectionURL(this, ResId(ET_AUTOBROWSEURL, *_rId.GetResMgr()))
+ , m_aPB_Connection(this, ResId(PB_AUTOBROWSEURL, *_rId.GetResMgr()))
+ , m_aPB_CreateDB(this, ResId(PB_CREATEDB, *_rId.GetResMgr()))
+ , m_pCollection(NULL)
{
-
// extract the datasource type collection from the item set
DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rCoreAttrs.GetItem(DSID_TYPECOLLECTION));
if (pCollectionItem)
commit c30677731c55688c764a669ecea1b1c4d17ae57d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:57:56 2014 +0000
coverity#706253 Uncaught exception
Change-Id: Id55f2ae36c03db59011ce11538fd45d9e909d5c0
diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx
index 6f734b0..803de05 100644
--- a/canvas/source/simplecanvas/simplecanvasimpl.cxx
+++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx
@@ -256,7 +256,8 @@ namespace
createStrokingRenderState());
}
- virtual void SAL_CALL drawPolyPolygon( const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon ) throw (uno::RuntimeException)
+ virtual void SAL_CALL drawPolyPolygon( const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon )
+ throw (uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
commit 3671f9f30cc21187d85f077d96f753a3d4ebac8a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:57:20 2014 +0000
coverity#706250 Uncaught exception
Change-Id: I862f30149c46869ad8cb973442a1818af8e9031f
diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx
index 9380436..6f734b0 100644
--- a/canvas/source/simplecanvas/simplecanvasimpl.cxx
+++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx
@@ -287,7 +287,8 @@ namespace
}
virtual void SAL_CALL drawBitmap( const uno::Reference< rendering::XBitmap >& xBitmap,
- const geometry::RealPoint2D& aLeftTop ) throw (uno::RuntimeException)
+ const geometry::RealPoint2D& aLeftTop )
+ throw (uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
const basegfx::B2DHomMatrix offsetTransform(basegfx::tools::createTranslateB2DHomMatrix(aLeftTop.X,aLeftTop.Y));
commit 50759b9f68652314cec63d55e7e23e0b4f1f770a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:54:28 2014 +0000
coverity#1130402 Missing break in switch
Change-Id: Ifd86d24bb6a7957d4da392bed3f5ebda8d0fa690
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 9ad03eb..8e95e56 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -151,12 +151,14 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase
case HTML_O_ONMOUSEOVER:
eScrpType = JAVASCRIPT;
+ //fallthrough
case HTML_O_SDONMOUSEOVER:
nEvent = nEventMouseOver;
goto IMAPOBJ_SETEVENT;
case HTML_O_ONMOUSEOUT:
eScrpType = JAVASCRIPT;
+ //fallthrough
case HTML_O_SDONMOUSEOUT:
nEvent = nEventMouseOut;
goto IMAPOBJ_SETEVENT;
commit f9d13d6e3c18ec7214861a57d92389ed646a562b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:53:28 2014 +0000
coverity#1130400 Missing break in switch
Change-Id: I4f70ffd8fad4034409c8826e7924f5900ff81232
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 6a81d55..9cd60ca 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1546,6 +1546,7 @@ void SwHTMLParser::InsertInput()
case HTML_O_SDONFOCUS:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONFOCUS:
nEvent = HTML_ET_ONGETFOCUS;
bSetEvent = sal_True;
@@ -1553,6 +1554,7 @@ void SwHTMLParser::InsertInput()
case HTML_O_SDONBLUR: // eigtl. nur EDIT
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONBLUR:
nEvent = HTML_ET_ONLOSEFOCUS;
bSetEvent = sal_True;
@@ -1560,6 +1562,7 @@ void SwHTMLParser::InsertInput()
case HTML_O_SDONCLICK:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONCLICK:
nEvent = HTML_ET_ONCLICK;
bSetEvent = sal_True;
@@ -1567,6 +1570,7 @@ void SwHTMLParser::InsertInput()
case HTML_O_SDONCHANGE: // eigtl. nur EDIT
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONCHANGE:
nEvent = HTML_ET_ONCHANGE;
bSetEvent = sal_True;
@@ -1574,6 +1578,7 @@ void SwHTMLParser::InsertInput()
case HTML_O_SDONSELECT: // eigtl. nur EDIT
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONSELECT:
nEvent = HTML_ET_ONSELECT;
bSetEvent = sal_True;
commit 7508574a10b1a082770b12b4279acadc22dedfc0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:50:52 2014 +0000
coverity#1130381 Missing break in switch
Change-Id: Ida8cdec56a667e46666a0f560ad196d61247fb49
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 090cada..0121854 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -541,8 +541,8 @@ svl::SharedString ScMatrixImpl::GetString(SCSIZE nC, SCSIZE nR) const
return svl::SharedString::getEmptyString();
case mdds::mtm::element_numeric:
case mdds::mtm::element_boolean:
- OSL_FAIL("ScMatrixImpl::GetString: access error, no string");
fErr = maMat.get_numeric(aPos);
+ //fallthrough
default:
OSL_FAIL("ScMatrixImpl::GetString: access error, no string");
}
commit 01ed55a47ab323d2cbf98398e65a00b509053269
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:49:18 2014 +0000
coverity#1130384 Missing break in switch
Change-Id: I0c73bd07a96ae45ee59669633d6b98cd5861c2b6
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 68bbbdd..9d82944 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -394,18 +394,21 @@ void SwHTMLParser::InsertImage()
case HTML_O_SDONLOAD:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONLOAD:
nEvent = SVX_EVENT_IMAGE_LOAD;
goto IMAGE_SETEVENT;
case HTML_O_SDONABORT:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONABORT:
nEvent = SVX_EVENT_IMAGE_ABORT;
goto IMAGE_SETEVENT;
case HTML_O_SDONERROR:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONERROR:
nEvent = SVX_EVENT_IMAGE_ERROR;
goto IMAGE_SETEVENT;
commit 44bfdc408eb65bc357adb8404c0451c89293dea7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:48:05 2014 +0000
coverity#1130385 Missing break in switch
Change-Id: I1a7903b296d368af5f071ae29810c615c986c351
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 002a1d9..6a81d55 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -2011,6 +2011,7 @@ void SwHTMLParser::NewTextArea()
case HTML_O_SDONFOCUS:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONFOCUS:
nEvent = HTML_ET_ONGETFOCUS;
bSetEvent = sal_True;
@@ -2018,6 +2019,7 @@ void SwHTMLParser::NewTextArea()
case HTML_O_SDONBLUR:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONBLUR:
nEvent = HTML_ET_ONLOSEFOCUS;
bSetEvent = sal_True;
@@ -2025,6 +2027,7 @@ void SwHTMLParser::NewTextArea()
case HTML_O_SDONCLICK:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONCLICK:
nEvent = HTML_ET_ONCLICK;
bSetEvent = sal_True;
@@ -2032,6 +2035,7 @@ void SwHTMLParser::NewTextArea()
case HTML_O_SDONCHANGE:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONCHANGE:
nEvent = HTML_ET_ONCHANGE;
bSetEvent = sal_True;
@@ -2039,6 +2043,7 @@ void SwHTMLParser::NewTextArea()
case HTML_O_SDONSELECT:
eScriptType2 = STARBASIC;
+ //fallthrough
case HTML_O_ONSELECT:
nEvent = HTML_ET_ONSELECT;
bSetEvent = sal_True;
commit c23e213264168af27226dd8d13fc34d63c068e43
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:39:28 2014 +0000
coverity#440944 Logically dead code
Change-Id: Ie01738985311c915ca9f2d8dd47ca6cb96d1b26c
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 9c19a4f..055698e 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -546,7 +546,6 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
}
// Einzel-Header
- bool bOwnPool = true;
OUString aExternName;
{
// Header-Record suchen
@@ -560,7 +559,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// Header-lesen
rStream >> pImp->nLoadingVersion;
aExternName = SfxPoolItem::readByteString(rStream);
- bOwnPool = aExternName == pImp->aName;
+ bool bOwnPool = aExternName == pImp->aName;
//! solange wir keine fremden Pools laden k"onnen
if ( !bOwnPool )
@@ -730,12 +729,11 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
rStream >> pImp->nMajorVer >> pImp->nMinorVer;
}
sal_uInt32 nAttribSize(0);
- bool bOwnPool = true;
OUString aExternName;
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 )
rStream >> pImp->nLoadingVersion;
aExternName = SfxPoolItem::readByteString(rStream);
- bOwnPool = aExternName == pImp->aName;
+ bool bOwnPool = aExternName == pImp->aName;
pImp->bStreaming = true;
//! solange wir keine fremden laden k"onnen
@@ -819,32 +817,21 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = GetNewWhich( nWhich );
rStream >> nSlot;
- sal_uInt16 nMappedWhich = GetWhich(nSlot, sal_False);
- bool bKnownItem = bOwnPool || IsWhich(nMappedWhich);
sal_uInt16 nRef(0), nCount(0), nVersion(0);
sal_uInt32 nAttrSize(0);
rStream >> nVersion >> nCount;
- std::vector<SfxPoolItemArray_Impl*>::iterator ppArr;
- SfxPoolItemArray_Impl *pNewArr = 0;
- SfxPoolItem *pDefItem = 0;
- if ( bKnownItem )
- {
- if ( !bOwnPool )
- nWhich = nMappedWhich;
+ //!SFX_ASSERTWARNING( !nSlot || !HasMap() ||
+ //! ( nSlot == GetSlotId( nWhich, sal_False ) ) ||
+ //! !GetSlotId( nWhich, sal_False ),
+ //! nWhich, "Slot/Which mismatch" );
- //!SFX_ASSERTWARNING( !nSlot || !HasMap() ||
- //! ( nSlot == GetSlotId( nWhich, sal_False ) ) ||
- //! !GetSlotId( nWhich, sal_False ),
- //! nWhich, "Slot/Which mismatch" );
-
- sal_uInt16 nIndex = GetIndex_Impl(nWhich);
- ppArr = pImp->maPoolItems.begin();
- std::advance(ppArr, nIndex);
- pNewArr = new SfxPoolItemArray_Impl();
- pDefItem = *(pImp->ppStaticDefaults + nIndex);
- }
+ sal_uInt16 nIndex = GetIndex_Impl(nWhich);
+ std::vector<SfxPoolItemArray_Impl*>::iterator ppArr = pImp->maPoolItems.begin();
+ std::advance(ppArr, nIndex);
+ SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl();
+ SfxPoolItem *pDefItem = *(pImp->ppStaticDefaults + nIndex);
// Position vor ersten Item merken
sal_uLong nLastPos = rStream.Tell();
@@ -872,87 +859,81 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
sal_uLong nPos = nLastPos;
rStream >> nRef;
- if ( bKnownItem )
+ SfxPoolItem *pItem = 0;
+ if ( nRef )
{
- SfxPoolItem *pItem = 0;
- if ( nRef )
- {
- pItem = pDefItem->Create(rStream, nVersion);
+ pItem = pDefItem->Create(rStream, nVersion);
- if ( !pImp->mbPersistentRefCounts )
- // bis <SfxItemPool::LoadCompleted()> festhalten
- AddRef(*pItem, 1);
+ if ( !pImp->mbPersistentRefCounts )
+ // bis <SfxItemPool::LoadCompleted()> festhalten
+ AddRef(*pItem, 1);
+ else
+ {
+ if ( nRef > SFX_ITEMS_OLD_MAXREF )
+ pItem->SetKind( nRef );
else
- {
- if ( nRef > SFX_ITEMS_OLD_MAXREF )
- pItem->SetKind( nRef );
- else
- AddRef(*pItem, nRef);
- }
+ AddRef(*pItem, nRef);
}
- //pNewArr->insert( pItem, j );
- pNewArr->push_back( (SfxPoolItem*) pItem );
-
- // restliche gespeicherte Laenge skippen (neueres Format)
- nLastPos = rStream.Tell();
}
+ //pNewArr->insert( pItem, j );
+ pNewArr->push_back( (SfxPoolItem*) pItem );
+
+ // restliche gespeicherte Laenge skippen (neueres Format)
+ nLastPos = rStream.Tell();
aSizeTable >> nAttrSize;
- SFX_ASSERT( !bKnownItem || ( nPos + nAttrSize) >= nLastPos,
+ SFX_ASSERT( ( nPos + nAttrSize) >= nLastPos,
nPos,
"too many bytes read - version mismatch?" );
- if ( !bKnownItem || ( nLastPos < (nPos + nAttrSize) ) )
+ if (nLastPos < (nPos + nAttrSize))
{
nLastPos = nPos + nAttrSize;
rStream.Seek( nLastPos );
}
}
- if ( bKnownItem )
+ SfxPoolItemArray_Impl *pOldArr = *ppArr;
+ *ppArr = pNewArr;
+
+ // die Items merken, die schon im Pool sind
+ bool bEmpty = true;
+ if ( 0 != pOldArr )
+ for ( size_t n = 0; bEmpty && n < pOldArr->size(); ++n )
+ bEmpty = pOldArr->operator[](n) == 0;
+ DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
+ if ( !bEmpty )
{
- SfxPoolItemArray_Impl *pOldArr = *ppArr;
- *ppArr = pNewArr;
-
- // die Items merken, die schon im Pool sind
- bool bEmpty = true;
- if ( 0 != pOldArr )
- for ( size_t n = 0; bEmpty && n < pOldArr->size(); ++n )
- bEmpty = pOldArr->operator[](n) == 0;
- DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
- if ( !bEmpty )
+ // f"ur alle alten suchen, ob ein gleiches neues existiert
+ for ( size_t nOld = 0; nOld < pOldArr->size(); ++nOld )
{
- // f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( size_t nOld = 0; nOld < pOldArr->size(); ++nOld )
+ SfxPoolItem *pOldItem = (*pOldArr)[nOld];
+ if ( pOldItem )
{
- SfxPoolItem *pOldItem = (*pOldArr)[nOld];
- if ( pOldItem )
+ bool bFound = false;
+ for ( size_t nNew = 0;
+ nNew < (*ppArr)->size(); ++nNew )
{
- bool bFound = false;
- for ( size_t nNew = 0;
- nNew < (*ppArr)->size(); ++nNew )
- {
- SfxPoolItem *&rpNewItem =
- (SfxPoolItem*&)(*ppArr)->operator[](nNew);
+ SfxPoolItem *&rpNewItem =
+ (SfxPoolItem*&)(*ppArr)->operator[](nNew);
- if ( rpNewItem && *rpNewItem == *pOldItem )
- {
- AddRef( *pOldItem, rpNewItem->GetRefCount() );
- SetRefCount( *rpNewItem, 0 );
- delete rpNewItem;
- rpNewItem = pOldItem;
- bFound = true;
- SAL_INFO("svl", "reusing item" << pOldItem);
- break;
- }
+ if ( rpNewItem && *rpNewItem == *pOldItem )
+ {
+ AddRef( *pOldItem, rpNewItem->GetRefCount() );
+ SetRefCount( *rpNewItem, 0 );
+ delete rpNewItem;
+ rpNewItem = pOldItem;
+ bFound = true;
+ SAL_INFO("svl", "reusing item" << pOldItem);
+ break;
}
- SAL_INFO_IF(
- !bFound, "svl", "item not found: " << pOldItem);
}
+ SAL_INFO_IF(
+ !bFound, "svl", "item not found: " << pOldItem);
}
}
- delete pOldArr; /* @@@ */
}
+ delete pOldArr; /* @@@ */
}
// Pool-Defaults lesen
@@ -967,24 +948,17 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = GetNewWhich( nWhich );
rStream >> nSlot;
- sal_uInt16 nMappedWhich = GetWhich(nSlot, sal_False);
- bool bKnownItem = bOwnPool || IsWhich(nMappedWhich);
sal_uLong nPos = nLastPos;
sal_uInt32 nSize(0);
sal_uInt16 nVersion(0);
rStream >> nVersion;
- if ( bKnownItem )
- {
- if ( !bOwnPool )
- nWhich = nMappedWhich;
- SfxPoolItem *pItem =
- ( *( pImp->ppStaticDefaults + GetIndex_Impl(nWhich) ) )
- ->Create( rStream, nVersion );
- pItem->SetKind( SFX_ITEMS_POOLDEFAULT );
- *( pImp->ppPoolDefaults + GetIndex_Impl(nWhich) ) = pItem;
- }
+ SfxPoolItem *pItem =
+ ( *( pImp->ppStaticDefaults + GetIndex_Impl(nWhich) ) )
+ ->Create( rStream, nVersion );
+ pItem->SetKind( SFX_ITEMS_POOLDEFAULT );
+ *( pImp->ppPoolDefaults + GetIndex_Impl(nWhich) ) = pItem;
nLastPos = rStream.Tell();
aSizeTable >> nSize;
commit 1f22e2f954baeec825190ded03510cb6c8069d93
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:33:45 2014 +0000
coverity#735424 Logically dead code
Change-Id: Ibd58c1660edca27141c27f7607f426f9df8d6b79
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index e42efd8..e4a8771 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2765,7 +2765,6 @@ namespace pcr
//------------------------------------------------------------------------
bool FormComponentPropertyHandler::impl_browseForImage_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
- bool bIsLink = true;// reflect the legacy behavior
OUString aStrTrans = m_pInfoService->getPropertyTranslation( PROPERTY_ID_IMAGE_URL );
::sfx2::FileDialogHelper aFileDlg(
@@ -2776,7 +2775,6 @@ namespace pcr
// non-linked images ( e.g. those located in the document
// stream ) only if document is available
Reference< XModel > xModel( impl_getContextDocument_nothrow() );
- bool bHandleNonLink = false;
Reference< XFilePickerControlAccess > xController(aFileDlg.GetFilePicker(), UNO_QUERY);
DBG_ASSERT(xController.is(), "FormComponentPropertyHandler::impl_browseForImage_nothrow: missing the controller interface on the file picker!");
@@ -2785,8 +2783,8 @@ namespace pcr
// do a preview by default
xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True));
- xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(bIsLink));
- xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, bHandleNonLink );
+ xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(sal_True));
+ xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, false);
}
@@ -2802,24 +2800,7 @@ namespace pcr
bool bSuccess = ( 0 == aFileDlg.Execute() );
if ( bSuccess )
{
- if ( bHandleNonLink && xController.is() )
- {
- xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink;
- }
- if ( !bIsLink )
- {
- Graphic aGraphic;
- aFileDlg.GetGraphic( aGraphic );
-
- Reference< graphic::XGraphicObject > xGrfObj = graphic::GraphicObject::create( m_xContext );
- xGrfObj->setGraphic( aGraphic.GetXGraphic() );
-
-
- _out_rNewValue <<= xGrfObj;
-
- }
- else
- _out_rNewValue <<= (OUString)aFileDlg.GetPath();
+ _out_rNewValue <<= (OUString)aFileDlg.GetPath();
}
return bSuccess;
}
commit 3c1cc16bb7b03e087781ae83262b217a2d23a693
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:27:51 2014 +0000
coverity#704234 Logically dead code
Change-Id: I9a1010e6a7d830853a79cafa71a867f16fcceabc
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index b5ce84c..ca60d0a 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -1562,7 +1562,6 @@ throw (RuntimeException)
WriteGuard aWriteLock( m_aLock );
bool bMustBeLayouted( false );
- bool bMustBeDestroyed( false );
bool bNotify( false );
OUString aElementType;
OUString aElementName;
@@ -1616,13 +1615,6 @@ throw (RuntimeException)
aWriteLock.unlock();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- if ( bMustBeDestroyed )
- {
- if ( xComponent.is() )
- xComponent->dispose();
- bNotify = true;
- }
-
if ( bMustBeLayouted )
doLayout();
commit 7c586c41329b57ff31dac1a452a5015b6f9c4432
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:25:19 2014 +0000
coverity#704224 Logically dead code
Change-Id: Ic113260ff969f3bb670cb8ecaf5d6068dea5dbdd
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 1846529..5d03d22 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -442,7 +442,6 @@ void TmpRepositoryCommandEnv::handle(
OSL_ASSERT( xRequest->getRequest().getValueTypeClass() == uno::TypeClass_EXCEPTION );
bool approve = true;
- bool abort = false;
// select:
uno::Sequence< Reference< task::XInteractionContinuation > > conts(
@@ -461,15 +460,6 @@ void TmpRepositoryCommandEnv::handle(
approve = false;
}
}
- else if (abort) {
- uno::Reference< task::XInteractionAbort > xInteractionAbort(
- pConts[ pos ], uno::UNO_QUERY );
- if (xInteractionAbort.is()) {
- xInteractionAbort->select();
- // don't query again for ongoing continuations:
- abort = false;
- }
- }
}
}
commit d63170c4c0e0aac6a4ee2163ae052d0cb5bcb435
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:24:29 2014 +0000
coverity#704223 Logically dead code
Change-Id: I4d5380f7c60ff10d1e1c2560e1e1288eb79cd056
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 1a715b6..05aa792 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -661,7 +661,6 @@ void UpdateCommandEnv::handle(
css::deployment::VersionException verExc;
bool approve = false;
- bool abort = false;
if (request >>= verExc)
{ //We must catch the version exception during the update,
@@ -672,7 +671,7 @@ void UpdateCommandEnv::handle(
approve = true;
}
- if (approve == false && abort == false)
+ if (approve == false)
{
//forward to interaction handler for main dialog.
handleInteractionRequest( m_xContext, xRequest );
@@ -696,15 +695,6 @@ void UpdateCommandEnv::handle(
approve = false;
}
}
- else if (abort) {
- cssu::Reference< css::task::XInteractionAbort > xInteractionAbort(
- pConts[ pos ], cssu::UNO_QUERY );
- if (xInteractionAbort.is()) {
- xInteractionAbort->select();
- // don't query again for ongoing continuations:
- abort = false;
- }
- }
}
}
}
commit c6ea43e7ff99b3c008f9c297310bcf3c1d8b9764
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:17:55 2014 +0000
coverity#736026 Invalid iterator comparison
Change-Id: If0a501cd19955d472c85341772385afbfe8768ca
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 4a6a656..e0ca0cc 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -156,7 +156,7 @@ void Diagram::build( )
#endif
dgm::Points::iterator aCurrPoint( getData()->getPoints( ).begin() );
- const dgm::Points::iterator aEndPoint( getData()->getPoints( ).end() );
+ dgm::Points::iterator aEndPoint( getData()->getPoints( ).end() );
while( aCurrPoint != aEndPoint )
{
#if OSL_DEBUG_LEVEL > 1
commit 9d7cba2f91225fa19703ba6f1d884bbe12596071
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:16:25 2014 +0000
coverity#705125 Invalid iterator comparison
Change-Id: Ifa84db9cc6bd3622a562c31f7624aee6fa157807
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 9d96fc4..44f5fa9 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -243,8 +243,7 @@ Sequence< OUString >
// search for entry with that language and use data from that
sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale );
- ThesaurusDispatcher *pThis = (ThesaurusDispatcher *) this;
- const ThesSvcByLangMap_t::iterator aIt( pThis->aSvcMap.find( nLanguage ) );
+ const ThesSvcByLangMap_t::const_iterator aIt( aSvcMap.find( nLanguage ) );
const LangSvcEntries_Thes *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (pEntry)
aRes = pEntry->aSvcImplNames;
commit 8130e18b8ca859853c2b69622d4f41954f8e7cef
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:15:55 2014 +0000
coverity#705124 Invalid iterator comparison
Change-Id: I3066e838c13cd6a937c7dd37da23310ddfb014c4
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 9438bcb..6435832 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -797,8 +797,7 @@ Sequence< OUString >
// search for entry with that language and use data from that
sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale );
- SpellCheckerDispatcher *pThis = (SpellCheckerDispatcher *) this;
- const SpellSvcByLangMap_t::iterator aIt( pThis->aSvcMap.find( nLanguage ) );
+ const SpellSvcByLangMap_t::const_iterator aIt( aSvcMap.find( nLanguage ) );
const LangSvcEntries_Spell *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (pEntry)
aRes = pEntry->aSvcImplNames;
commit 9e422a0d757eb88a976a3b1aeeae936ba6211571
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:14:44 2014 +0000
coverity#705123 Invalid iterator comparison
Change-Id: I0b055ba0a4c19f6cb6e7b929baee8aee8ca0dc78
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 52f55f1..01d49a2 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -699,8 +699,7 @@ Sequence< OUString >
// search for entry with that language and use data from that
sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale );
- HyphenatorDispatcher *pThis = (HyphenatorDispatcher *) this;
- const HyphSvcByLangMap_t::iterator aIt( pThis->aSvcMap.find( nLanguage ) );
+ const HyphSvcByLangMap_t::const_iterator aIt( aSvcMap.find( nLanguage ) );
const LangSvcEntries_Hyph *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (pEntry)
{
commit d613a0e5875e25a7c217d8f490618b1da9aa9b1d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 15:07:06 2014 +0000
coverity#703895 Failed to override method
Change-Id: I5bbd748b40a01a8906945d0363a11e967c45b5c0
diff --git a/include/toolkit/controls/unocontrolcontainermodel.hxx b/include/toolkit/controls/unocontrolcontainermodel.hxx
index 609d9bd..f7ca093 100644
--- a/include/toolkit/controls/unocontrolcontainermodel.hxx
+++ b/include/toolkit/controls/unocontrolcontainermodel.hxx
@@ -33,7 +33,6 @@ class UnoControlContainerModel : public UnoControlModel
{
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
commit ed5cf167c695cbf45f3b6150eb8bd36b992963e1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 11 14:57:10 2014 +0000
coverity#708947 Empty virtual destructor
Change-Id: I3f660aff0c53b1cd35c7ae57bde612daf0950349
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index eb9ab38..f3a98ef 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2868,11 +2868,6 @@ DffRecordManager::DffRecordManager( SvStream& rIn ) :
Consume( rIn );
}
-DffRecordManager::~DffRecordManager()
-{
-};
-
-
void DffRecordManager::Consume( SvStream& rIn, sal_Bool bAppend, sal_uInt32 nStOfs )
{
if ( !bAppend )
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 0460830..1554bb0 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -390,7 +390,6 @@ public :
DffRecordManager();
explicit DffRecordManager( SvStream& rIn );
- ~DffRecordManager();
DffRecordHeader* Current();
DffRecordHeader* First();
commit 50f0bb85b7e18001886fdf8bb03eb1d138838b90
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Tue Feb 11 13:25:08 2014 +0000
Resolves: #i124179# trigger update User Fields...
and related Input Fields when user directly edits a User Field Input Field
- assure that no recursive updates occur
(cherry picked from commit 3c2b5242e81575ec4b6c110afd88894670bd2283)
Conflicts:
sw/inc/txtfld.hxx
sw/source/core/fields/expfld.cxx
sw/source/core/fields/usrfld.cxx
Change-Id: I36af4d5e8008f16737e3ec14c1ec737a5f43d3b1
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index af25a11..c9fbebd 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -308,6 +308,9 @@ class SW_DLLPUBLIC SwInputField : public SwField
// Accessing Input Field's content
const OUString& getContent() const;
+ void LockNotifyContentChange();
+ void UnlockNotifyContentChange();
+
public:
/// Direct input via dialog; delete old value.
SwInputField(
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index cfab932..b973aaa 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -83,6 +83,8 @@ public:
virtual sal_Int32* GetEnd();
+ void LockNotifyContentChange();
+ void UnlockNotifyContentChange();
virtual void NotifyContentChange( SwFmtFld& rFmtFld );
void UpdateTextNodeContent( const OUString& rNewContent );
@@ -92,6 +94,8 @@ public:
private:
sal_Int32 m_nEnd;
+
+ bool m_bLockNotifyContentChange;
};
#endif
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index c7d2507..07a3ee8 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1145,12 +1145,35 @@ SwFmtFld* SwInputField::GetFmtFld()
return mpFmtFld;
}
-
const OUString& SwInputField::getContent() const
{
return aContent;
}
+void SwInputField::LockNotifyContentChange()
+{
+ if ( GetFmtFld() != NULL )
+ {
+ SwTxtInputFld* pTxtInputFld = dynamic_cast< SwTxtInputFld* >(GetFmtFld()->GetTxtFld());
+ if ( pTxtInputFld != NULL )
+ {
+ pTxtInputFld->LockNotifyContentChange();
+ }
+ }
+}
+
+void SwInputField::UnlockNotifyContentChange()
+{
+ if ( GetFmtFld() != NULL )
+ {
+ SwTxtInputFld* pTxtInputFld = dynamic_cast< SwTxtInputFld* >(GetFmtFld()->GetTxtFld());
+ if ( pTxtInputFld != NULL )
+ {
+ pTxtInputFld->UnlockNotifyContentChange();
+ }
+ }
+}
+
void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
{
if ( (nSubType & 0x00ff) == INP_TXT )
@@ -1164,6 +1187,13 @@ void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
if( pUserTyp )
{
pUserTyp->SetContent( rNewFieldContent );
+
+ // trigger update of the corresponding User Fields and other related Input Fields
+ {
+ LockNotifyContentChange();
+ pUserTyp->UpdateFlds();
+ UnlockNotifyContentChange();
+ }
}
}
}
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 453db79..008035e 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -202,8 +202,14 @@ void SwUserFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
ChgValid( false );
NotifyClients( pOld, pNew );
+
// update input fields that might be connected to the user field
- GetDoc()->GetSysFldType( RES_INPUTFLD )->UpdateFlds();
+ if ( !IsModifyLocked() )
+ {
+ LockModify();
+ GetDoc()->GetSysFldType( RES_INPUTFLD )->UpdateFlds();
+ UnlockModify();
+ }
}
double SwUserFieldType::GetValue( SwCalc& rCalc )
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 32e400d..eb5833e 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -453,6 +453,7 @@ SwTxtInputFld::SwTxtInputFld(
: SwTxtFld( rAttr, nStart, bInClipboard )
, m_nEnd( nEnd )
+ , m_bLockNotifyContentChange( false )
{
SetHasDummyChar( false );
SetHasContent( true );
@@ -473,11 +474,30 @@ sal_Int32* SwTxtInputFld::GetEnd()
return &m_nEnd;
}
+
+void SwTxtInputFld::LockNotifyContentChange()
+{
+ m_bLockNotifyContentChange = true;
+}
+
+
+void SwTxtInputFld::UnlockNotifyContentChange()
+{
+ m_bLockNotifyContentChange = false;
+}
+
+
void SwTxtInputFld::NotifyContentChange( SwFmtFld& rFmtFld )
{
- SwTxtFld::NotifyContentChange( rFmtFld );
+ if ( !m_bLockNotifyContentChange )
+ {
+ LockNotifyContentChange();
+
+ SwTxtFld::NotifyContentChange( rFmtFld );
+ UpdateTextNodeContent( GetFieldContent() );
- UpdateTextNodeContent( GetFieldContent() );
+ UnlockNotifyContentChange();
+ }
}
const OUString SwTxtInputFld::GetFieldContent() const
More information about the Libreoffice-commits
mailing list