summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-19 09:15:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-19 10:26:50 +0100
commit67820a90370513cd65cd7f042c1d0dea6fb0965f (patch)
tree7d53cf940b8e4457af578e25e7a4a6fb0b012bf7 /sw/source/uibase
parentcoverity#706069 Unintended sign extension (diff)
downloadcore-67820a90370513cd65cd7f042c1d0dea6fb0965f.tar.gz
core-67820a90370513cd65cd7f042c1d0dea6fb0965f.zip
coverity#705037 Unchecked dynamic_cast
Change-Id: I9f6c8ceafd09b4a5d4e951e01e1a06b2b5265181
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docshdrw.cxx1
-rw-r--r--sw/source/uibase/app/docstyle.cxx1
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx1
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx1
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx1
-rw-r--r--sw/source/uibase/shells/frmsh.cxx1
-rw-r--r--sw/source/uibase/shells/grfsh.cxx1
-rw-r--r--sw/source/uibase/shells/grfshex.cxx1
-rw-r--r--sw/source/uibase/uno/unodefaults.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx12
-rw-r--r--sw/source/uibase/utlui/content.cxx1
11 files changed, 16 insertions, 7 deletions
diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx
index 03882285cac3..479aa30709d9 100644
--- a/sw/source/uibase/app/docshdrw.cxx
+++ b/sw/source/uibase/app/docshdrw.cxx
@@ -27,6 +27,7 @@
#include <docsh.hxx>
#include <doc.hxx>
+#include <drawdoc.hxx>
#include <IDocumentDrawModelAccess.hxx>
using namespace ::com::sun::star;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 8cb9c2aab831..aea1897ed552 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -25,6 +25,7 @@
#include <editeng/boxitem.hxx>
#include <editeng/numitem.hxx>
#include <editeng/lrspitem.hxx>
+#include <drawdoc.hxx>
#include <fmtcol.hxx>
#include <uitool.hxx>
#include <swmodule.hxx>
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index c3fcc36c9635..a53cc29cd401 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -41,6 +41,7 @@
#include <IDocumentDrawModelAccess.hxx>
#include <docsh.hxx>
#include <docary.hxx>
+#include <drawdoc.hxx>
#include <frmfmt.hxx>
#include <dcontact.hxx>
#include <edtwin.hxx>
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index fe7bec39757f..9875627404d2 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -32,6 +32,7 @@
#include <svx/svdview.hxx>
#include <editeng/unolingu.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <drawdoc.hxx>
#include <sdrhhcwrap.hxx>
#include <frmfmt.hxx>
#include <docsh.hxx>
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index b17d41b8ba3d..3be552931d23 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -32,6 +32,7 @@
#include <svx/swframevalidation.hxx>
#include <svx/anchorid.hxx>
#include <sfx2/htmlmode.hxx>
+#include <drawdoc.hxx>
#include <uitool.hxx>
#include <fmtornt.hxx>
#include <cmdid.h>
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index e1c59e68d0b7..da54124baf8b 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -44,6 +44,7 @@
#include <tools/diagnose_ex.h>
#include <doc.hxx>
+#include <drawdoc.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <fmturl.hxx>
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index f60b2d494278..ed018dc31be2 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -45,6 +45,7 @@
#include <svx/compressgraphicdialog.hxx>
#include <vcl/GraphicNativeTransform.hxx>
#include <svx/tbxcolor.hxx>
+#include <drawdoc.hxx>
#include <fmturl.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index dd763f0e4fce..0cbca7a24a99 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -28,6 +28,7 @@
#include <caption.hxx>
#include <vcl/graphicfilter.hxx>
#include <sfx2/htmlmode.hxx>
+#include <drawdoc.hxx>
#include <doc.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <docsh.hxx>
diff --git a/sw/source/uibase/uno/unodefaults.cxx b/sw/source/uibase/uno/unodefaults.cxx
index 3529b2f7e146..a1cc59ca1f74 100644
--- a/sw/source/uibase/uno/unodefaults.cxx
+++ b/sw/source/uibase/uno/unodefaults.cxx
@@ -18,8 +18,8 @@
*/
#include <unodefaults.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/unoprov.hxx>
+#include <drawdoc.hxx>
#include <doc.hxx>
#include <IDocumentDrawModelAccess.hxx>
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index c020b75d662a..cc8e06692e1b 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1921,7 +1921,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawDocument * pDrawDoc;
bool bAuto = *(sal_Bool*) aValue.getValue();
- if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * >( pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) ) )
+ if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetAutoControlFocus( bAuto );
else if (bAuto)
{
@@ -1931,7 +1931,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
// SdrModel and we are leaving the default at false,
// we don't need to make an SdrModel and can do nothing
// #i52858# - method name changed
- pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
pDrawDoc->SetAutoControlFocus ( bAuto );
}
}
@@ -1941,7 +1941,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawDocument * pDrawDoc;
bool bMode = *(sal_Bool*)aValue.getValue();
- if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) ) )
+ if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetOpenInDesignMode( bMode );
else if (!bMode)
{
@@ -1952,7 +1952,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
// we don't need to make an SdrModel and can do
// nothing
// #i52858# - method name changed
- pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
pDrawDoc->SetOpenInDesignMode ( bMode );
}
}
@@ -2091,7 +2091,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawDocument * pDrawDoc;
bool bAuto;
- if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) ) )
+ if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bAuto = pDrawDoc->GetAutoControlFocus();
else
bAuto = false;
@@ -2102,7 +2102,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawDocument * pDrawDoc;
bool bMode;
- if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) ) )
+ if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bMode = pDrawDoc->GetOpenInDesignMode();
else
bMode = true;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 0a838e8e13fe..e6a827e98f41 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -34,6 +34,7 @@
#include <wrtsh.hxx>
#include <view.hxx>
#include <docsh.hxx>
+#include <drawdoc.hxx>
#include <content.hxx>
#include <frmfmt.hxx>
#include <fldbas.hxx>