diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 09:15:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 10:26:50 +0100 |
commit | 67820a90370513cd65cd7f042c1d0dea6fb0965f (patch) | |
tree | 7d53cf940b8e4457af578e25e7a4a6fb0b012bf7 /sw | |
parent | 9191f44fed1e1ede6a5efcaac6bc92bbe74305ec (diff) |
coverity#705037 Unchecked dynamic_cast
Change-Id: I9f6c8ceafd09b4a5d4e951e01e1a06b2b5265181
Diffstat (limited to 'sw')
42 files changed, 60 insertions, 23 deletions
diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx index 4c76292bc3cb..ad8415a4b91b 100644 --- a/sw/inc/IDocumentDrawModelAccess.hxx +++ b/sw/inc/IDocumentDrawModelAccess.hxx @@ -22,7 +22,7 @@ #include <svx/svdtypes.hxx> -class SdrModel; +class SwDrawDocument; class SdrPageView; class IDocumentDrawModelAccess @@ -31,10 +31,10 @@ public: /** Draw Model and id accessors */ - virtual const SdrModel* GetDrawModel() const = 0; - virtual SdrModel* GetDrawModel() = 0; - virtual SdrModel* _MakeDrawModel() = 0; - virtual SdrModel* GetOrCreateDrawModel() = 0; + virtual const SwDrawDocument* GetDrawModel() const = 0; + virtual SwDrawDocument* GetDrawModel() = 0; + virtual SwDrawDocument* _MakeDrawModel() = 0; + virtual SwDrawDocument* GetOrCreateDrawModel() = 0; virtual SdrLayerID GetHeavenId() const = 0; virtual SdrLayerID GetHellId() const = 0; virtual SdrLayerID GetControlsId() const = 0; diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 33ebb321435f..ae46e24ecc12 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -65,6 +65,7 @@ #include <svx/unoapi.hxx> #include <svx/svdmark.hxx> #include <doc.hxx> +#include <drawdoc.hxx> #include <pam.hxx> #include <ndtxt.hxx> #include <dflyobj.hxx> diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index aabfd966d135..f1b76a4b5506 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -32,6 +32,7 @@ #include <svl/itemset.hxx> #include <svx/svdmodel.hxx> #include <cmdid.h> +#include <drawdoc.hxx> #include <wdocsh.hxx> #include <prtopt.hxx> #include <viewsh.hxx> diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index e87ae39e9b23..7dc30f947837 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -98,7 +98,7 @@ void DocumentDrawModelManager::InitDrawModel() m_rSwdoc.GetAttrPool().SetPoolDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT )); SAL_INFO( "sw.doc", "before create DrawDocument" ); - // The document owns the SdrModel. We always have two layers and one page. + // The document owns the SwDrawDocument. We always have two layers and one page. mpDrawModel = new SwDrawDocument( &m_rSwdoc ); mpDrawModel->EnableUndo( m_rSwdoc.GetIDocumentUndoRedo().DoesUndo() ); @@ -196,17 +196,17 @@ void DocumentDrawModelManager::ReleaseDrawModel() -const SdrModel* DocumentDrawModelManager::GetDrawModel() const +const SwDrawDocument* DocumentDrawModelManager::GetDrawModel() const { return mpDrawModel; } -SdrModel* DocumentDrawModelManager::GetDrawModel() +SwDrawDocument* DocumentDrawModelManager::GetDrawModel() { return mpDrawModel; } -SdrModel* DocumentDrawModelManager::_MakeDrawModel() +SwDrawDocument* DocumentDrawModelManager::_MakeDrawModel() { OSL_ENSURE( !mpDrawModel, "_MakeDrawModel: Why?" ); InitDrawModel(); @@ -229,7 +229,7 @@ SdrModel* DocumentDrawModelManager::_MakeDrawModel() return mpDrawModel; } -SdrModel* DocumentDrawModelManager::GetOrCreateDrawModel() +SwDrawDocument* DocumentDrawModelManager::GetOrCreateDrawModel() { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); } diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 85f605b932fd..6886d8674b83 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -24,6 +24,7 @@ #include <editeng/forbiddencharacterstable.hxx> #include <svx/svdmodel.hxx> #include <unotools/compatibility.hxx> +#include <drawdoc.hxx> #include <swmodule.hxx> #include <linkenum.hxx> #include <rootfrm.hxx> diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 8418a998c520..d3982f14791c 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -35,6 +35,7 @@ #include <IDocumentDrawModelAccess.hxx> #include <ndindex.hxx> #include <docary.hxx> +#include <drawdoc.hxx> #include <fmtcntnt.hxx> #include <fmtanchr.hxx> #include <txtflcnt.hxx> diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 965af9a8dee7..9db67c3ba8cd 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -42,6 +42,7 @@ #include <modcfg.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <SwStyleNameMapper.hxx> +#include <drawdoc.hxx> #include <fchrfmt.hxx> #include <frmatr.hxx> #include <txatbase.hxx> diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index adc9a1b8d19e..743d749dae32 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -8,6 +8,7 @@ */ #include "doc.hxx" +#include "drawdoc.hxx" #include <IDocumentDrawModelAccess.hxx> #include "ndtxt.hxx" #include "MarkManager.hxx" diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 2f6dba71aca5..4377594104e5 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -34,6 +34,7 @@ #include <svx/shapepropertynotifier.hxx> #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx> #include <svx/sdr/contact/displayinfo.hxx> +#include <drawdoc.hxx> #include <fmtornt.hxx> #include <viewimp.hxx> #include <fmtsrnd.hxx> diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 25a76bd6b9b6..904f901f0a21 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -39,6 +39,7 @@ #include <IDocumentSettingAccess.hxx> #include <DocumentSettingManager.hxx> #include <cmdid.h> +#include <drawdoc.hxx> #include <poolfmt.hrc> #include <frmfmt.hxx> #include <frmatr.hxx> diff --git a/sw/source/core/inc/DocumentDrawModelManager.hxx b/sw/source/core/inc/DocumentDrawModelManager.hxx index 596ee831b8e5..d142c719bb0d 100644 --- a/sw/source/core/inc/DocumentDrawModelManager.hxx +++ b/sw/source/core/inc/DocumentDrawModelManager.hxx @@ -25,7 +25,7 @@ #include <boost/utility.hpp> #include <svx/svdtypes.hxx> -class SdrModel; +class SwDrawDocument; class SdrPageView; class SwDoc; @@ -44,10 +44,10 @@ public: void DrawNotifyUndoHdl(); //IDocumentDrawModelAccess - virtual const SdrModel* GetDrawModel() const SAL_OVERRIDE; - virtual SdrModel* GetDrawModel() SAL_OVERRIDE; - virtual SdrModel* _MakeDrawModel() SAL_OVERRIDE; - virtual SdrModel* GetOrCreateDrawModel() SAL_OVERRIDE; + virtual const SwDrawDocument* GetDrawModel() const SAL_OVERRIDE; + virtual SwDrawDocument* GetDrawModel() SAL_OVERRIDE; + virtual SwDrawDocument* _MakeDrawModel() SAL_OVERRIDE; + virtual SwDrawDocument* GetOrCreateDrawModel() SAL_OVERRIDE; virtual SdrLayerID GetHeavenId() const SAL_OVERRIDE; virtual SdrLayerID GetHellId() const SAL_OVERRIDE; virtual SdrLayerID GetControlsId() const SAL_OVERRIDE; @@ -70,7 +70,7 @@ private: SwDoc& m_rSwdoc; - SdrModel* mpDrawModel; + SwDrawDocument* mpDrawModel; /** Draw Model Layer IDs * LayerIds, Heaven == above document diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index dfb2d410d6fe..306875bc1053 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -24,6 +24,7 @@ #include <editeng/opaqitem.hxx> #include <editeng/ulspitem.hxx> #include <editeng/frmdiritem.hxx> +#include <drawdoc.hxx> #include <fmtfsize.hxx> #include <fmtclds.hxx> #include <fmtcntnt.hxx> diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 37f6ddafe143..daa1205d2d5f 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -25,6 +25,7 @@ #include <editeng/boxitem.hxx> #include <editeng/lspcitem.hxx> +#include <drawdoc.hxx> #include <fmtornt.hxx> #include <fmthdft.hxx> #include <fmtfsize.hxx> diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index ee10a0d1ed54..4aaa767a9b2a 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -19,6 +19,7 @@ #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> +#include <drawdoc.hxx> #include <fmtpdsc.hxx> #include <swtable.hxx> #include <rootfrm.hxx> diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index e5c8604557af..35634f431bec 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -28,6 +28,7 @@ #include <editeng/shaditem.hxx> #include <svx/framelink.hxx> #include <svx/xflgrit.hxx> +#include <drawdoc.hxx> #include <tgrditem.hxx> #include <switerator.hxx> #include <fmtsrnd.hxx> diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 9f6c49848b4f..845dfb764ef0 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -25,6 +25,7 @@ #include <swmodule.hxx> #include <doc.hxx> +#include <drawdoc.hxx> #include <ndarr.hxx> #include <pam.hxx> #include <ndtxt.hxx> diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 5401023c6797..2f482e38a24d 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -22,6 +22,7 @@ #include <editeng/tstpitem.hxx> #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> +#include <drawdoc.hxx> #include <hintids.hxx> #include <fmtflcnt.hxx> #include <txtftn.hxx> diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index f4924b94f079..8bcc0ca3322e 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -21,6 +21,7 @@ #include <cmdid.h> +#include <drawdoc.hxx> #include <unodraw.hxx> #include <unocoll.hxx> #include <unoframe.hxx> diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 58e46f323f0f..e02024cf7d98 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -42,6 +42,7 @@ #include <memory> #include <hints.hxx> #include <doc.hxx> +#include <drawdoc.hxx> #include <IDocumentUndoRedo.hxx> #include <IDocumentDrawModelAccess.hxx> #include <docsh.hxx> diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index 99519e81ad6a..e8a8bdb89726 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -28,6 +28,7 @@ #include <svx/svdoutl.hxx> +#include "drawdoc.hxx" #include "fesh.hxx" #include "pagefrm.hxx" #include "rootfrm.hxx" diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 707370bda483..34e15aab44bd 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -18,6 +18,7 @@ */ #include "crsrsh.hxx" +#include "drawdoc.hxx" #include "rootfrm.hxx" #include "pagefrm.hxx" #include "viewimp.hxx" diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 766a8ac8d587..ea111dd0308e 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -27,6 +27,7 @@ #include <svx/srchdlg.hxx> #include <svx/svdobj.hxx> #include <sfx2/viewsh.hxx> +#include <drawdoc.hxx> #include <swwait.hxx> #include <swmodule.hxx> #include <fesh.hxx> diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index a3670faa4a98..a50926e589d0 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -39,6 +39,7 @@ #include <svx/svdpool.hxx> #include "charatr.hxx" +#include "drawdoc.hxx" #include <frmfmt.hxx> #include <fmtanchr.hxx> #include <fmtsrnd.hxx> diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 6323ec9cfd45..435dc2bec407 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -39,6 +39,7 @@ #include <fmtautofmt.hxx> #include <fmtfsize.hxx> +#include <drawdoc.hxx> #include <docxsdrexport.hxx> #include <docxexport.hxx> #include <docxexportfilter.hxx> diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 130edf14f9b6..969e0e2f893d 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -75,6 +75,7 @@ #include <sfx2/sfxbasemodel.hxx> #include <svx/xflgrit.hxx> +#include <drawdoc.hxx> #include <docufld.hxx> #include <fmtclds.hxx> #include <fmtinfmt.hxx> diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 0bc4ea88aaba..b2e33e6efe7c 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -62,6 +62,7 @@ #include <fmtcntnt.hxx> #include <ndindex.hxx> #include <doc.hxx> +#include <drawdoc.hxx> #include <IDocumentSettingAccess.hxx> #include <IDocumentDrawModelAccess.hxx> #include <docary.hxx> diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index db37d41b60ff..368422fbcf4f 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -33,6 +33,7 @@ #include <string.h> #include <osl/endian.h> #include <docsh.hxx> +#include <drawdoc.hxx> #include <unotools/fltrcfg.hxx> #include <vcl/salbtype.hxx> diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index ca60186d53d4..6a235e780046 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -65,6 +65,7 @@ #include <fmtanchr.hxx> #include <pam.hxx> #include <doc.hxx> +#include <drawdoc.hxx> #include <IDocumentDrawModelAccess.hxx> #include <docary.hxx> #include <ndgrf.hxx> diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 193e767fcc51..ff47693a9e0c 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -48,6 +48,7 @@ #include <unotools/ucbstreamhelper.hxx> #include <swerror.h> #include <fltini.hxx> +#include <drawdoc.hxx> #include <doc.hxx> #include <IDocumentSettingAccess.hxx> #include <IDocumentDrawModelAccess.hxx> diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index bf4812c23812..090c675d65f3 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -39,6 +39,7 @@ #include <xmloff/ProgressBarHelper.hxx> #include <xmloff/xmluconv.hxx> #include <xmloff/xformsexport.hxx> +#include <drawdoc.hxx> #include <pam.hxx> #include <unofreg.hxx> #include <doc.hxx> diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index c2a5e90920a5..2e7d37038eb6 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -34,6 +34,7 @@ #include <xmloff/XMLFontStylesContext.hxx> #include <xmloff/ProgressBarHelper.hxx> #include <doc.hxx> +#include <drawdoc.hxx> #include <IDocumentSettingAccess.hxx> #include <IDocumentDeviceAccess.hxx> #include <IDocumentDrawModelAccess.hxx> 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> |