diff options
Diffstat (limited to 'sw/source/ui')
36 files changed, 88 insertions, 293 deletions
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 8f9a6b8eb71d..7fe0d349e8a7 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -57,12 +57,8 @@ #include <svtools/stritem.hxx> #include <svtools/ctloptions.hxx> #include <svtools/useroptions.hxx> -#ifndef _VCL_MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif -#ifndef _VCL_WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif #include <svx/insctrl.hxx> #include <svx/selctrl.hxx> #include <com/sun/star/document/UpdateDocMode.hpp> @@ -73,46 +69,32 @@ #include <sfx2/objface.hxx> #include <sfx2/app.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <pview.hxx> -#ifndef _SRCVIEW_HXX #include <srcview.hxx> -#endif #include <wrtsh.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #ifndef _CMDID_H #include <cmdid.h> // Funktion-Ids #endif #include <initui.hxx> #include <uitool.hxx> #include <swmodule.hxx> -#ifndef _WDOCSH_HXX #include <wdocsh.hxx> -#endif -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <usrpref.hxx> #include <gloslst.hxx> // SwGlossaryList #include <glosdoc.hxx> // SwGlossaryList #include <doc.hxx> #include <cfgitems.hxx> #include <prtopt.hxx> -#ifndef _MODCFG_HXX #include <modcfg.hxx> -#endif #include <globals.h> // globale Konstanten z.B. #ifndef _APP_HRC #include <app.hrc> #endif #include <fontcfg.hxx> -#ifndef _BARCFG_HXX #include <barcfg.hxx> -#endif #include <uinums.hxx> #include <dbconfig.hxx> #include <mmconfigitem.hxx> @@ -155,7 +137,7 @@ using namespace ::com::sun::star; #define PrintSettings #define _ExecAddress ExecOther #define _StateAddress StateOther -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include <svx/svxslots.hxx> #include "swslots.hxx" #include <cfgid.h> diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 837b3e72dc44..d7e2450dbebf 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -30,17 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <rtl/logfile.hxx> -#ifndef _MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> -#endif -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif #include <vcl/jobset.hxx> #include <tools/urlobj.hxx> #include <svtools/whiter.hxx> @@ -53,9 +48,7 @@ #include <sfx2/app.hxx> #include <sfx2/request.hxx> #include <svtools/misccfg.hxx> -#ifndef _PASSWD_HXX #include <sfx2/passwd.hxx> -#endif #include <sfx2/bindings.hxx> #include <sfx2/docfile.hxx> #include <sfx2/evntconf.hxx> @@ -70,9 +63,7 @@ #include <sot/clsids.hxx> #include <basic/basmgr.hxx> #include <basic/sbmod.hxx> -//#ifndef _SB_SBJSMOD_HXX //autogen //#include <basic/sbjsmod.hxx> -//#endif #include <swevent.hxx> #include <fmtpdsc.hxx> #include <fmtfsize.hxx> @@ -81,41 +72,27 @@ #include <swwait.hxx> #include <swprtopt.hxx> #include <frmatr.hxx> -#ifndef _VIEW_HXX #include <view.hxx> // fuer die aktuelle Sicht -#endif #include <edtwin.hxx> #include <PostItMgr.hxx> #include <postit.hxx> #include <wrtsh.hxx> // Verbindung zur Core -#ifndef _DOCSH_HXX #include <docsh.hxx> // Dokumenterzeugung -#endif -#ifndef _BASESH_HXX #include <basesh.hxx> -#endif #include <viewopt.hxx> -#ifndef _WDOCSH_HXX #include <wdocsh.hxx> -#endif #include <swmodule.hxx> -#ifndef _GLOBDOC_HXX #include <globdoc.hxx> -#endif #include <usrpref.hxx> #include <shellio.hxx> // I/O #include <docstyle.hxx> #include <doc.hxx> #include <docstat.hxx> #include <pagedesc.hxx> -#ifndef _PVIEW_HXX #include <pview.hxx> -#endif #include <mdiexp.hxx> #include <swbaslnk.hxx> -#ifndef _SRCVIEW_HXX #include <srcview.hxx> -#endif #include <ndindex.hxx> #include <ndole.hxx> #include <swcli.hxx> @@ -127,18 +104,10 @@ #include <docary.hxx> // <-- #include <swerror.h> // Fehlermeldungen -#ifndef _HELPID_H #include <helpid.h> -#endif -#ifndef _CMDID_H -#include <cmdid.h> // -#endif -#ifndef _GLOBALS_HRC +#include <cmdid.h> #include <globals.hrc> -#endif -#ifndef _APP_HRC #include <app.hrc> -#endif #include "warnpassword.hxx" #include <cfgid.h> @@ -150,12 +119,8 @@ #include <comphelper/storagehelper.hxx> #define SwDocShell -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif #include <com/sun/star/document/UpdateDocMode.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> @@ -163,6 +128,9 @@ #include <unomid.h> +#include <sfx2/Metadatable.hxx> + + using rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -1416,4 +1384,8 @@ BOOL SwTmpPersist::SaveCompleted( SvStorage * pStor ) return FALSE; } */ +const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const +{ + return pDoc ? &pDoc->GetXmlIdRegistry() : 0; +} diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx index 7f1b16c7abc1..2b72b1aec33a 100644 --- a/sw/source/ui/fldui/flddinf.hxx +++ b/sw/source/ui/fldui/flddinf.hxx @@ -45,7 +45,7 @@ /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -class SfxDocumentInfoItem; + class SwFldDokInfPage : public SwFldPage { FixedText aTypeFT; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 24c025fb55d8..b288d51cf520 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -265,7 +265,7 @@ void SwFldRefPage::Reset(const SfxItemSet& ) } // Endnoten: - if( pSh->HasFtns(TRUE) ) + if ( pSh->HasFtns(true) ) { nPos = aTypeLB.InsertEntry(sEndnoteTxt); aTypeLB.SetEntryData(nPos, (void*)REFFLDFLAG_ENDNOTE); @@ -576,7 +576,7 @@ void SwFldRefPage::UpdateSubType() { aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT); SwSeqFldList aArr; - USHORT nCnt = pSh->GetSeqFtnList( aArr, TRUE ); + USHORT nCnt = pSh->GetSeqFtnList( aArr, true ); for( USHORT n = 0; n < nCnt; ++n ) { @@ -936,7 +936,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) nSubType = REF_ENDNOTE; aName.Erase(); - if (pSh->GetSeqFtnList(aArr, TRUE) && aArr.SeekEntry(aElem, &nPos)) + if (pSh->GetSeqFtnList(aArr, true) && aArr.SeekEntry(aElem, &nPos)) { aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo ); diff --git a/sw/source/ui/inc/itemdef.hxx b/sw/source/ui/inc/itemdef.hxx deleted file mode 100644 index c73a429e0fee..000000000000 --- a/sw/source/ui/inc/itemdef.hxx +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: itemdef.hxx,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef ITEMDEF_HXX -#define ITEMDEF_HXX - - -#include <sfx2/msg.hxx> - -SFX_DECL_TYPE(10); //SwElemItem -SFX_DECL_TYPE(13); //SwAddPrinterItem -SFX_DECL_TYPE(16); //SwDocDisplayItem - -#endif diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 4ad5311307c9..a79e67eec31c 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -49,12 +49,8 @@ #include <sfx2/viewfrm.hxx> #include <uitool.hxx> #include <wrtsh.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif -#ifndef _GLSHELL_HXX #include <glshell.hxx> -#endif #include <doc.hxx> #include <glosdoc.hxx> #include <shellio.hxx> @@ -72,12 +68,8 @@ #define SwWebGlosDocShell #define SwGlosDocShell -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif using namespace ::com::sun::star; diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index b4a4491c220d..054220be6707 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -138,7 +138,7 @@ using namespace ::com::sun::star::i18n; #define SwAnnotationShell -#include <itemdef.hxx> +#include <sfx2/msg.hxx> #include <swslots.hxx> SFX_IMPL_INTERFACE(SwAnnotationShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT)) diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 66276be3e4ff..f2f760156d04 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -41,33 +41,22 @@ #include <svx/linkmgr.hxx> #include <svx/htmlmode.hxx> #include <svx/imapdlg.hxx> -#ifndef _SFX_DISPATCH_HXX //autogen #include <sfx2/dispatch.hxx> -#endif #include <sfx2/docfile.hxx> -#ifndef _SFX_VIEWFRM_HXX //autogen #include <sfx2/viewfrm.hxx> -#endif #include <sfx2/request.hxx> #include <svtools/whiter.hxx> #include <svtools/visitem.hxx> #include <sfx2/objitem.hxx> -#ifndef _SFX_DISPATCH_HXX //autogen -#include <sfx2/dispatch.hxx> -#endif #include <svtools/filter.hxx> #include <svx/gallery.hxx> #include <svx/langitem.hxx> #include <svx/clipfmtitem.hxx> #include <svx/contdlg.hxx> -#ifndef _GRAPH_HXX //autogen #include <vcl/graph.hxx> -#endif #include <svx/impgrf.hxx> #include <svtools/slstitm.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/ptitem.hxx> #include <svtools/itemiter.hxx> #include <svtools/stritem.hxx> @@ -86,20 +75,14 @@ #include <fmturl.hxx> #include <fmthdft.hxx> #include <fmtclds.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #include <wrtsh.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <swmodule.hxx> #include <swundo.hxx> #include <fldbas.hxx> #include <uitool.hxx> -#ifndef _BASESH_HXX #include <basesh.hxx> -#endif #include <viewopt.hxx> #include <fontcfg.hxx> #include <docstat.hxx> @@ -171,7 +154,7 @@ static BYTE nFooterPos; #define SwBaseShell #define Shadow -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #define SWCONTOURDLG(rView) ( (SvxContourDlg*) ( rView.GetViewFrame()->GetChildWindow( \ @@ -2082,14 +2065,22 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) if( pArgs ) { - SwTxtFmtColl* pColl; - if( (!(RES_CHRATR_BEGIN <= nWhich && nWhich < RES_CHRATR_END ) || - ( rSh.HasSelection() && rSh.IsSelFullPara() ) ) && - 0 != (pColl = rSh.GetCurTxtFmtColl()) && - pColl->IsAutoUpdateFmt() ) - rSh.AutoUpdatePara( pColl, *pArgs ); - else + bool bAuto = false; + if ( !isCHRATR(nWhich) || + ( rSh.HasSelection() && rSh.IsSelFullPara() ) ) + { + SwTxtFmtColl * pColl = rSh.GetCurTxtFmtColl(); + if ( pColl && pColl->IsAutoUpdateFmt() ) + { + rSh.AutoUpdatePara( pColl, *pArgs ); + bAuto = true; + } + } + + if (!bAuto) + { rSh.SetAttr( *pArgs ); + } } delete pSSetItem; } diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx index b6bc159e7ecd..cc3493fe5120 100644 --- a/sw/source/ui/shells/beziersh.cxx +++ b/sw/source/ui/shells/beziersh.cxx @@ -52,7 +52,7 @@ #include "popup.hrc" #include "shells.hrc" #define SwBezierShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #include <unomid.h> diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index ed7d60e84e6f..4da015e2d586 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -69,7 +69,7 @@ #include "drawsh.hxx" #define SwDrawShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #include "swabstdlg.hxx" //CHINA001 #include "misc.hrc" diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx index 254d01ccb960..97cac7006b98 100644 --- a/sw/source/ui/shells/drformsh.cxx +++ b/sw/source/ui/shells/drformsh.cxx @@ -60,14 +60,12 @@ #include "drwbassh.hxx" #include "drformsh.hxx" #include <svtools/urihelper.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <sfx2/docfile.hxx> #include <docsh.hxx> #define SwDrawFormShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #include <unomid.h> diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index 725d5239e6fe..339c332c9135 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -41,9 +41,7 @@ #include <sfx2/bindings.hxx> #include <svtools/aeitem.hxx> #include <svx/svdview.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svx/srchitem.hxx> #include <svtools/whiter.hxx> #include <svx/swframevalidation.hxx> @@ -56,20 +54,14 @@ #endif #include <swmodule.hxx> #include <wrtsh.hxx> -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <edtwin.hxx> #include <viewopt.hxx> #include <dcontact.hxx> #include <frmfmt.hxx> #include <wrap.hxx> -#ifndef _DRAWBASE_HXX #include <drawbase.hxx> -#endif -#ifndef _DRWBASSH_HXX #include <drwbassh.hxx> -#endif #include <swdtflvr.hxx> #include <svx/svdogrp.hxx> #include <svx/svdpage.hxx> @@ -77,12 +69,8 @@ #include <shells.hrc> #define SwDrawBaseShell -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> #include "swabstdlg.hxx" diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index a0f38300fba2..99a2bf71bca7 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -59,15 +59,11 @@ #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <swtypes.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <wrtsh.hxx> #include <viewopt.hxx> #include <initui.hxx> // fuer SpellPointer -#ifndef _DRWTXTSH_HXX #include <drwtxtsh.hxx> -#endif #include <swundo.hxx> #include <breakit.hxx> @@ -85,19 +81,13 @@ #endif #define SwDrawTextShell -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif #ifndef _POPUP_HRC #include <popup.hrc> #endif #include <uitool.hxx> -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <swmodule.hxx> #include <svx/xtable.hxx> diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 4df31175e1aa..3f61bab9a20e 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -57,9 +57,7 @@ #include <fmtcnct.hxx> #include <swmodule.hxx> #include <wrtsh.hxx> -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <frmatr.hxx> #include <uitool.hxx> #include <frmfmt.hxx> @@ -104,7 +102,7 @@ const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const String& rName) } #define SwFrameShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME)) diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 026e22a228c4..1ecf506d19c2 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -39,9 +39,7 @@ #endif #include <hintids.hxx> #include <tools/urlobj.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/stritem.hxx> #include <svtools/whiter.hxx> #include <svtools/urihelper.hxx> @@ -64,21 +62,15 @@ #include <svx/grfflt.hxx> #include <svx/tbxcolor.hxx> #include <fmturl.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <wrtsh.hxx> #include <viewopt.hxx> #include <swmodule.hxx> #include <frmatr.hxx> #include <swundo.hxx> #include <uitool.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif -#ifndef _GRFSH_HXX #include <grfsh.hxx> -#endif #include <frmmgr.hxx> #include <frmdlg.hxx> #include <frmfmt.hxx> @@ -90,7 +82,7 @@ #include <popup.hrc> #define SwGrfShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #include "swabstdlg.hxx" diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx index c1c8435bd12f..34f349befbc9 100644 --- a/sw/source/ui/shells/listsh.cxx +++ b/sw/source/ui/shells/listsh.cxx @@ -65,7 +65,7 @@ #include "edtwin.hxx" #define SwListShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #include <IDocumentOutlineNodes.hxx> diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx index 933d7254bb8a..ae1ed883cb8b 100644 --- a/sw/source/ui/shells/mediash.cxx +++ b/sw/source/ui/shells/mediash.cxx @@ -39,9 +39,7 @@ #endif #include <hintids.hxx> #include <tools/urlobj.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/stritem.hxx> #include <svtools/whiter.hxx> #include <svtools/urihelper.hxx> @@ -60,21 +58,15 @@ #include <svx/brshitem.hxx> #include <svx/grfflt.hxx> #include <fmturl.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <wrtsh.hxx> #include <viewopt.hxx> #include <swmodule.hxx> #include <frmatr.hxx> #include <swundo.hxx> #include <uitool.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif -#ifndef _MEDIASH_HXX #include <mediash.hxx> -#endif #include <frmmgr.hxx> #include <frmdlg.hxx> #include <frmfmt.hxx> @@ -95,7 +87,7 @@ #include <avmedia/mediaitem.hxx> #define SwMediaShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" #include "swabstdlg.hxx" diff --git a/sw/source/ui/shells/olesh.cxx b/sw/source/ui/shells/olesh.cxx index 6d6f1985e56b..2bf523d27e3b 100644 --- a/sw/source/ui/shells/olesh.cxx +++ b/sw/source/ui/shells/olesh.cxx @@ -37,9 +37,7 @@ #include <sfx2/objface.hxx> #include <sfx2/objitem.hxx> #include <wrtsh.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #ifndef _HELPID_H #include <helpid.h> #endif @@ -63,12 +61,8 @@ #define SwOleShell -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif SFX_IMPL_INTERFACE(SwOleShell, SwFrameShell, SW_RES(STR_SHELLNAME_OBJECT)) diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx index 804b6127de4f..333128a18db9 100644 --- a/sw/source/ui/shells/slotadd.cxx +++ b/sw/source/ui/shells/slotadd.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: slotadd.cxx,v $ - * $Revision: 1.30 $ + * $Revision: 1.30.124.1 $ * * This file is part of OpenOffice.org. * @@ -147,7 +147,7 @@ #define avmedia_MediaItem ::avmedia::MediaItem #define SFX_TYPEMAP -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 3c1d84666c7a..2beb89f0458b 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -57,9 +57,7 @@ #include <svx/svxdlg.hxx> #include <svtools/zformat.hxx> #include <sfx2/bindings.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objface.hxx> @@ -72,28 +70,20 @@ #include <fmtfsize.hxx> #include <swmodule.hxx> #include <wrtsh.hxx> -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <frmatr.hxx> #include <uitool.hxx> -#ifndef _INPUTWIN_HXX #include <inputwin.hxx> -#endif #include <uiitems.hxx> #include <usrpref.hxx> -#ifndef _TABSH_HXX #include <tabsh.hxx> -#endif #include "swtablerep.hxx" #include <tablemgr.hxx> #include <cellatr.hxx> #include <frmfmt.hxx> #include <swundo.hxx> #include <swtable.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #include <tblsel.hxx> #include <dialog.hrc> @@ -130,12 +120,8 @@ #include <unoobj.hxx> #define SwTableShell -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif #include "swabstdlg.hxx" #include <table.hrc> diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index f0874a954b97..742e93b646c2 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -46,18 +46,14 @@ #include <svtools/ptitem.hxx> #include <svtools/stritem.hxx> #include <svtools/moduleoptions.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <sfx2/fcontnr.hxx> #include <svx/hlnkitem.hxx> #include <svx/srchitem.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/docfile.hxx> #include <svtools/urihelper.hxx> -#ifndef __SBX_SBXVARIABLE_HXX //autogen #include <basic/sbxvar.hxx> -#endif #include <svtools/whiter.hxx> #include <sfx2/request.hxx> #include <svx/opaqitem.hxx> @@ -71,9 +67,7 @@ #include <svx/htmlmode.hxx> #include <svx/pfiledlg.hxx> #include <svx/htmlcfg.hxx> -#ifndef _COM_SUN_STAR_I18N_TRANSLITERATIONMODULES_HDL_ #include <com/sun/star/i18n/TransliterationModules.hdl> -#endif #include <sot/clsids.hxx> #include <svx/acorrcfg.hxx> @@ -84,12 +78,8 @@ #include <fmtfsize.hxx> #include <swmodule.hxx> #include <wrtsh.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #include <doc.hxx> #include <uitool.hxx> #ifndef _CMDID_H @@ -99,9 +89,7 @@ #include <globals.hrc> #endif #include <frmmgr.hxx> -#ifndef _TEXTSH_HXX #include <textsh.hxx> -#endif #include <frmfmt.hxx> #include <tablemgr.hxx> #include <swundo.hxx> // fuer Undo-IDs @@ -137,12 +125,8 @@ #define HyphenZone #define TextFont #define DropCap -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif #include <SwRewriter.hxx> #include <undobj.hxx> #ifndef _COMCORE_HRC diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index c3ee9a18ccf0..8fe6b9511f8f 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -39,9 +39,7 @@ #include <vcl/fixed.hxx> #include <vcl/help.hxx> #include <vcl/cmdevt.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <svtools/printdlg.hxx> #include <svtools/whiter.hxx> #include <svtools/stritem.hxx> @@ -71,20 +69,12 @@ #include <swmodule.hxx> #include <modcfg.hxx> #include <wrtsh.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #include <viewopt.hxx> #include <doc.hxx> -#ifndef _PVIEW_HXX #include <pview.hxx> -#endif -#ifndef _VIEW_HXX #include <view.hxx> -#endif -#ifndef _TEXTSH_HXX #include <textsh.hxx> -#endif #include <scroll.hxx> #include <swprtopt.hxx> #include <docstat.hxx> @@ -109,12 +99,8 @@ #endif #define SwPagePreView -#ifndef _ITEMDEF_HXX -#include <itemdef.hxx> -#endif -#ifndef _SWSLOTS_HXX +#include <sfx2/msg.hxx> #include <swslots.hxx> -#endif // OD 12.12.2002 #103492# #include <pagepreviewlayout.hxx> diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 7898e4db1cb2..34cfebe663a1 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -76,7 +76,7 @@ #include <srcview.hxx> #include <viewfunc.hxx> #include <doc.hxx> -#include <itemdef.hxx> +#include <sfx2/msg.hxx> #include <shellio.hxx> #include <cmdid.h> // FN_ ... diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 2e9a3bc783e7..38f885657450 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -49,9 +49,7 @@ #include <svx/srchdlg.hxx> #include <sfx2/templdlg.hxx> #include <uivwimp.hxx> -#ifndef _AVMEDIA_MEDIAPPLAYER_HXX #include <avmedia/mediaplayer.hxx> -#endif #include <swmodule.hxx> #include <sfx2/objface.hxx> @@ -92,7 +90,7 @@ #define WebListInText #define WebListInTable #define TextPage -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include <svx/svxslots.hxx> #include "swslots.hxx" #include <PostItMgr.hxx> diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 57a2a8ec6c1f..19d0faa0bfce 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -50,13 +50,13 @@ #include <com/sun/star/text/NotePrintMode.hpp> #include <doc.hxx> #include <comphelper/TypeGeneration.hxx> -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ #include <com/sun/star/beans/PropertyAttribute.hpp> -#endif +#include <com/sun/star/view/DocumentZoomType.hpp> #include <comphelper/ChainablePropertySetInfo.hxx> #include <edtwin.hxx> #include <rtl/ustrbuf.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -726,23 +726,28 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c if(!(rValue >>= nZoom)) throw IllegalArgumentException(); SvxZoomType eZoom = (SvxZoomType)USHRT_MAX; - switch(nZoom) + switch (nZoom) { - case /*DocumentZoomType_OPTIMAL */0: + case view::DocumentZoomType::OPTIMAL: eZoom = SVX_ZOOM_OPTIMAL; break; - case /*DocumentZoomType_PAGE_WIDTH */ 1: + case view::DocumentZoomType::PAGE_WIDTH: eZoom = SVX_ZOOM_PAGEWIDTH; break; - case /*DocumentZoomType_ENTIRE_PAGE */ 2: + case view::DocumentZoomType::ENTIRE_PAGE: eZoom = SVX_ZOOM_WHOLEPAGE; break; - case /*DocumentZoomType_BY_VALUE */ 3: + case view::DocumentZoomType::BY_VALUE: eZoom = SVX_ZOOM_PERCENT; break; - case /*DocumentZoomType_PAGE_WIDTH_EXACT */ 4: + case view::DocumentZoomType::PAGE_WIDTH_EXACT: eZoom = SVX_ZOOM_PAGEWIDTH_NOBORDER; break; + default: + throw IllegalArgumentException( + ::rtl::OUString::createFromAscii( + "SwXViewSettings: invalid zoom type"), 0, 0); + break; } if(eZoom < USHRT_MAX) { @@ -915,23 +920,27 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u case HANDLE_VIEWSET_ZOOM_TYPE: { bBool = FALSE; - sal_Int16 nRet; - switch(mpConstViewOption->GetZoomType()) + sal_Int16 nRet(0); + switch (mpConstViewOption->GetZoomType()) { case SVX_ZOOM_OPTIMAL: - nRet = /*DocumentZoomType_OPTIMAL*/ 0; + nRet = view::DocumentZoomType::OPTIMAL; break; case SVX_ZOOM_PAGEWIDTH: - nRet = /*DocumentZoomType_PAGE_WIDTH */1; + nRet = view::DocumentZoomType::PAGE_WIDTH; break; case SVX_ZOOM_WHOLEPAGE: - nRet = /*DocumentZoomType_ENTIRE_PAGE */ 2; + nRet = view::DocumentZoomType::ENTIRE_PAGE; break; case SVX_ZOOM_PERCENT: - nRet = /*DocumentZoomType_BY_VALUE */ 3; + nRet = view::DocumentZoomType::BY_VALUE; + break; + case SVX_ZOOM_PAGEWIDTH_NOBORDER: + nRet = view::DocumentZoomType::PAGE_WIDTH_EXACT; break; default: - ; + OSL_ENSURE(false, "SwXViewSettings: invalid zoom type"); + break; } rValue <<= nRet; } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index eaba514a6e6a..6197bb489d61 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -38,9 +38,7 @@ #include <hintids.hxx> #include <docsh.hxx> #include <rubylist.hxx> -#ifndef _SWDOC_HXX //autogen #include <doc.hxx> -#endif #include <unotxvw.hxx> #include <unodispatch.hxx> #include <unomap.hxx> @@ -1442,9 +1440,9 @@ void SwXTextViewCursor::gotoRange( const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark(); pSrcNode = &(pBkmk->GetMarkPos().nNode.GetNode()); } - else if (pPara && pPara->GetCrsr()) + else if (pPara && pPara->GetTxtNode()) { - pSrcNode = pPara->GetCrsr()->GetNode(); + pSrcNode = pPara->GetTxtNode(); } const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0; diff --git a/sw/source/ui/web/wdocsh.cxx b/sw/source/ui/web/wdocsh.cxx index 9f7eff770172..dbfdf87dc94d 100644 --- a/sw/source/ui/web/wdocsh.cxx +++ b/sw/source/ui/web/wdocsh.cxx @@ -43,7 +43,7 @@ #include <sot/clsids.hxx> #include <sfx2/objface.hxx> -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "cfgid.h" #include "cmdid.h" #include "swtypes.hxx" diff --git a/sw/source/ui/web/wformsh.cxx b/sw/source/ui/web/wformsh.cxx index 8a629fbfeac2..ed9a84667c79 100644 --- a/sw/source/ui/web/wformsh.cxx +++ b/sw/source/ui/web/wformsh.cxx @@ -33,7 +33,7 @@ -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> diff --git a/sw/source/ui/web/wfrmsh.cxx b/sw/source/ui/web/wfrmsh.cxx index e43a0e2d7850..ee2f61884000 100644 --- a/sw/source/ui/web/wfrmsh.cxx +++ b/sw/source/ui/web/wfrmsh.cxx @@ -50,7 +50,7 @@ // STATIC DATA ----------------------------------------------------------- #define SwWebFrameShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" diff --git a/sw/source/ui/web/wgrfsh.cxx b/sw/source/ui/web/wgrfsh.cxx index 5a935bb9e2e1..00a21da8e1b7 100644 --- a/sw/source/ui/web/wgrfsh.cxx +++ b/sw/source/ui/web/wgrfsh.cxx @@ -32,8 +32,7 @@ #include "precompiled_sw.hxx" - -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include <svx/srchitem.hxx> #include <sfx2/app.hxx> diff --git a/sw/source/ui/web/wlistsh.cxx b/sw/source/ui/web/wlistsh.cxx index a505928134b9..fc3f0635b54d 100644 --- a/sw/source/ui/web/wlistsh.cxx +++ b/sw/source/ui/web/wlistsh.cxx @@ -32,9 +32,7 @@ #include "precompiled_sw.hxx" -#include "itemdef.hxx" - - +#include <sfx2/msg.hxx> #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include <svx/srchitem.hxx> diff --git a/sw/source/ui/web/wolesh.cxx b/sw/source/ui/web/wolesh.cxx index 481c9405e439..131b6d72da10 100644 --- a/sw/source/ui/web/wolesh.cxx +++ b/sw/source/ui/web/wolesh.cxx @@ -32,8 +32,7 @@ #include "precompiled_sw.hxx" - -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include <svx/srchitem.hxx> diff --git a/sw/source/ui/web/wtabsh.cxx b/sw/source/ui/web/wtabsh.cxx index 7af0bef34232..c47541214d58 100644 --- a/sw/source/ui/web/wtabsh.cxx +++ b/sw/source/ui/web/wtabsh.cxx @@ -51,7 +51,7 @@ #include "wtabsh.hxx" #define SwWebTableShell -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "svx/svxids.hrc" #include "swslots.hxx" diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index 2bbf79cfab94..abdcee987840 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -37,9 +37,7 @@ #include <sfx2/objface.hxx> #include <sfx2/app.hxx> #include <svx/srchitem.hxx> //*** -#ifndef __SBX_SBXVARIABLE_HXX //autogen #include <basic/sbxvar.hxx> -#endif #ifndef _SVX_SVXIDS_HRC //autogen #include <svx/svxids.hrc> #endif @@ -63,7 +61,7 @@ #define HyphenZone #define TextFont #define DropCap -#include "itemdef.hxx" +#include <sfx2/msg.hxx> #include "swslots.hxx" diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index 6d1b0ca68c03..34ccd8f72378 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -32,7 +32,7 @@ #include "precompiled_sw.hxx" -#include <itemdef.hxx> +#include <sfx2/msg.hxx> #include <svx/srchitem.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/templdlg.hxx> diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 6624668fcd8a..42cfb1c3d64d 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -30,12 +30,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> // define ITEMIDs #include <svtools/macitem.hxx> #include <sfx2/frame.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/urihelper.hxx> #include <svtools/eitem.hxx> #include <svtools/stritem.hxx> @@ -47,9 +46,7 @@ #include <frmatr.hxx> #include <swtypes.hxx> // SET_CURR_SHELL #include <wrtsh.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #include <fldbas.hxx> // Felder #include <expfld.hxx> #include <ddefld.hxx> @@ -61,9 +58,7 @@ #include <frmfmt.hxx> // fuer UpdateTable #include <swtable.hxx> // fuer UpdateTable #include <mdiexp.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <swevent.hxx> #include <poolfmt.hxx> #include <section.hxx> @@ -71,12 +66,8 @@ #include <navipi.hxx> #include <crsskip.hxx> #include <txtinet.hxx> -#ifndef _CMDID_H #include <cmdid.h> -#endif -#ifndef _WRTSH_HRC #include <wrtsh.hrc> -#endif #include "swabstdlg.hxx" #include "fldui.hrc" @@ -355,8 +346,8 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter ) const SwTxtINetFmt* pTxtAttr = rItem.GetTxtINetFmt(); if( pTxtAttr ) { - ((SwTxtINetFmt*)pTxtAttr)->SetVisited( sal_True ); - ((SwTxtINetFmt*)pTxtAttr)->SetValidVis( sal_True ); + const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisited( true ); + const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( true ); } bIsInClickToEdit = FALSE; |