sw/inc/comcore.hxx  |    5 +----
 sw/inc/crsrsh.hxx   |    5 +----
 sw/inc/crstate.hxx  |    5 +----
 sw/inc/cshtyp.hxx   |    5 +----
 sw/inc/dbfld.hxx    |    5 +----
 sw/inc/dbgoutsw.hxx |    4 +---
 sw/inc/dbmgr.hxx    |    5 +----
 sw/inc/dbui.hrc     |    6 +-----
 sw/inc/dcontact.hxx |    5 +----
 sw/inc/dlelstnr.hxx |    6 +-----
 sw/inc/dobjfac.hxx  |    5 +----
 sw/inc/doc.hxx      |    5 +----
 sw/inc/docary.hxx   |    5 +----
 sw/inc/docfac.hxx   |    5 +----
 sw/inc/docfunc.hxx  |    5 +----
 sw/inc/docsh.hxx    |    5 +----
 sw/inc/docstat.hxx  |    5 +----
 sw/inc/docstyle.hxx |    5 +----
 sw/inc/docufld.hxx  |    5 +----
 sw/inc/dpage.hxx    |    5 +----
 sw/inc/drawdoc.hxx  |    5 +----
 21 files changed, 21 insertions(+), 85 deletions(-)

New commits:
commit 78f2f1502bb09e76615d5aee9335f7f6f6f64eda
Author:     Sloane Vaznova <[email protected]>
AuthorDate: Sun Nov 17 01:16:16 2024 -0600
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Sun Nov 17 12:42:19 2024 +0100

    tdf#143148 Use pragma once instead of include guards
    
    Refactored include guards into pragma once for some files
    alphabetically c-d in sw/inc.
    
    Change-Id: I8cf8059851169472d7953f4e6f5408666d27c2c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176688
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/sw/inc/comcore.hxx b/sw/inc/comcore.hxx
index 9da3d19e2aa0..14de469f55ff 100644
--- a/sw/inc/comcore.hxx
+++ b/sw/inc/comcore.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_COMCORE_HXX
-#define INCLUDED_SW_INC_COMCORE_HXX
+#pragma once
 
 // defines for the Autoformat Redline Comments
 // see sw/inc/utlui.hrc
@@ -50,6 +49,4 @@
 // !!!!!!!!!!!!!!!!!!!!!!!!!!  always set the correct end !!!!!!!!!!!!
 #define STR_AUTOFMTREDL_END                     26
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 806b1b7d2472..2d7f279c8aa3 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_CRSRSH_HXX
-#define INCLUDED_SW_INC_CRSRSH_HXX
+#pragma once
 
 #include <com/sun/star/i18n/WordType.hpp>
 
@@ -969,6 +968,4 @@ inline void SwCursorShell::UnSetVisibleCursor()
     m_pVisibleCursor->SetDragCursor( false );
 }
 
-#endif  // _CRSRSH_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 018106514714..9d750cbc487a 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_CRSTATE_HXX
-#define INCLUDED_SW_INC_CRSTATE_HXX
+#pragma once
 
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <tools/gen.hxx>
@@ -209,6 +208,4 @@ struct SwCursorMoveState
     {}
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
index ec99572f6827..c6818a200777 100644
--- a/sw/inc/cshtyp.hxx
+++ b/sw/inc/cshtyp.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_CSHTYP_HXX
-#define INCLUDED_SW_INC_CSHTYP_HXX
+#pragma once
 
 #include "swdllapi.h"
 #include <o3tl/typed_flags_set.hxx>
@@ -109,6 +108,4 @@ enum class SwDocPositions
     OtherEnd
 };
 
-#endif // INCLUDED_SW_INC_CSHTYP_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 1ecbf4dfeeb0..708db0a2b135 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DBFLD_HXX
-#define INCLUDED_SW_INC_DBFLD_HXX
+#pragma once
 
 #include "swdllapi.h"
 #include "fldbas.hxx"
@@ -286,6 +285,4 @@ inline tools::Long SwDBSetNumberField::GetSetNumber() const
 inline void SwDBSetNumberField::SetSetNumber(tools::Long nNum)
     { m_nNumber = nNum; }
 
-#endif // INCLUDED_SW_INC_DBFLD_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 97587d911333..b02a4ad909ca 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DBGOUTSW_HXX
-#define INCLUDED_SW_INC_DBGOUTSW_HXX
+#pragma once
 
 #ifdef DBG_UTIL
 
@@ -106,6 +105,5 @@ const char* dbg_out(const std::unordered_map<tKey, tMember, 
fHashFunction>& rMap
 const char* dbg_out(const SwFormToken& rToken);
 const char* dbg_out(const SwFormTokens& rTokens);
 #endif // DBG_UTIL
-#endif // INCLUDED_SW_INC_DBGOUTSW_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index ae5730d5cfc1..b48749696d74 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DBMGR_HXX
-#define INCLUDED_SW_INC_DBMGR_HXX
+#pragma once
 
 #include <rtl/ustring.hxx>
 #include <tools/solar.h>
@@ -492,6 +491,4 @@ enum class DBConnURIType
 DBConnURIType SW_DLLPUBLIC GetDBunoType(const INetURLObject &rURL);
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 4ccac85d633c..ab3a5d7ecb98 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -16,9 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-
-#ifndef INCLUDED_SW_INC_DBUI_HRC
-#define INCLUDED_SW_INC_DBUI_HRC
+#pragma once
 
 #include <utility>
 #include <unotools/resmgr.hxx>
@@ -60,6 +58,4 @@ const std::pair<TranslateId, int> SA_ADDRESS_HEADER[] =
     { NC_("SA_ADDRESS_HEADER", "Gender"),                 MM_PART_GENDER       
   }
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index c924c006fc66..ffdcf1e24588 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DCONTACT_HXX
-#define INCLUDED_SW_INC_DCONTACT_HXX
+#pragma once
 
 #include <svx/svdobj.hxx>
 #include <svx/svdovirt.hxx>
@@ -410,6 +409,4 @@ class SAL_DLLPUBLIC_RTTI SwDrawContact final : public 
SwContact
         virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& 
_roAnchoredObjs ) const override;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx
index ca4ef456def4..1032959efc83 100644
--- a/sw/inc/dlelstnr.hxx
+++ b/sw/inc/dlelstnr.hxx
@@ -16,9 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-
-#ifndef INCLUDED_SW_INC_DLELSTNR_HXX
-#define INCLUDED_SW_INC_DLELSTNR_HXX
+#pragma once
 
 #include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
 #include <com/sun/star/frame/XTerminateListener.hpp>
@@ -68,6 +66,4 @@ public:
     virtual void SAL_CALL notifyTermination( const css::lang::EventObject& 
rEventObj ) override;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx
index 33d55bdccf22..91458c209a8a 100644
--- a/sw/inc/dobjfac.hxx
+++ b/sw/inc/dobjfac.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOBJFAC_HXX
-#define INCLUDED_SW_INC_DOBJFAC_HXX
+#pragma once
 
 #include <tools/link.hxx>
 #include <svx/svdobj.hxx>
@@ -30,6 +29,4 @@ public:
 
 extern SwObjectFactory aSwObjectFactory;
 
-#endif // INCLUDED_SW_INC_DOBJFAC_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index e0e77c2971f2..7d0c2955721e 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOC_HXX
-#define INCLUDED_SW_INC_DOC_HXX
+#pragma once
 
 // SwDoc interfaces
 #include <o3tl/typed_flags_set.hxx>
@@ -1778,6 +1777,4 @@ inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
 
 bool sw_GetPostIts(const IDocumentFieldsAccess& rIDFA, SetGetExpFields * 
pSrtLst);
 
-#endif  //_DOC_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 55ae1c7eb478..dc8d0941dc04 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCARY_HXX
-#define INCLUDED_SW_INC_DOCARY_HXX
+#pragma once
 
 #include <vector>
 #include <type_traits>
@@ -313,6 +312,4 @@ public:
 
 typedef std::vector<SwOLENode*> SwOLENodes;
 
-#endif // INCLUDED_SW_INC_DOCARY_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx
index 300e0af938a9..c48feb006631 100644
--- a/sw/inc/docfac.hxx
+++ b/sw/inc/docfac.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCFAC_HXX
-#define INCLUDED_SW_INC_DOCFAC_HXX
+#pragma once
 
 #include <rtl/ref.hxx>
 #include "swdllapi.h"
@@ -36,6 +35,4 @@ public:
     SwDoc& GetDoc();
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docfunc.hxx b/sw/inc/docfunc.hxx
index e37a5ea2a02c..0721877c6ad3 100644
--- a/sw/inc/docfunc.hxx
+++ b/sw/inc/docfunc.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCFUNC_HXX
-#define INCLUDED_SW_INC_DOCFUNC_HXX
+#pragma once
 
 class SwDoc;
 
@@ -57,6 +56,4 @@ bool AllDrawObjsOnPage(SwDoc& p_rDoc);
 bool HasOutlineStyleToBeWrittenAsNormalListStyle(SwDoc& rDoc);
 }
 
-#endif //_DOCFUNC_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 56fbec40e1fb..d755d14e9b67 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCSH_HXX
-#define INCLUDED_SW_INC_DOCSH_HXX
+#pragma once
 
 #include <memory>
 #include <vector>
@@ -362,6 +361,4 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
                     sal_Int16 nVersion,
                     SwDocShell* pDestSh );
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
index 84476db5c065..ba01ac57c220 100644
--- a/sw/inc/docstat.hxx
+++ b/sw/inc/docstat.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCSTAT_HXX
-#define INCLUDED_SW_INC_DOCSTAT_HXX
+#pragma once
 
 #include <tools/solar.h>
 #include "swdllapi.h"
@@ -43,6 +42,4 @@ struct SW_DLLPUBLIC SwDocStat
     void Reset();
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index e53dc2c743e6..e45c599d2a0b 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCSTYLE_HXX
-#define INCLUDED_SW_INC_DOCSTYLE_HXX
+#pragma once
 
 #include <rtl/ref.hxx>
 #include <rtl/ustring.hxx>
@@ -246,6 +245,4 @@ private:
     SwDocStyleSheetPool( const SwDocStyleSheetPool& ) = delete;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 1e69003f03b5..83986b735ae3 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DOCUFLD_HXX
-#define INCLUDED_SW_INC_DOCUFLD_HXX
+#pragma once
 
 #include <sal/config.h>
 
@@ -772,6 +771,4 @@ public:
     virtual bool        PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich 
) override;
 };
 
-#endif // INCLUDED_SW_INC_DOCUFLD_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index 16d5b4650169..0f2ed801a82b 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DPAGE_HXX
-#define INCLUDED_SW_INC_DPAGE_HXX
+#pragma once
 
 #include <memory>
 #include <svx/fmpage.hxx>
@@ -60,6 +59,4 @@ private:
     void lateInit(const SwDPage& rSrcPage);
 };
 
-#endif // INCLUDED_SW_INC_DPAGE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
index c4e6d23ad086..4bda4147cf78 100644
--- a/sw/inc/drawdoc.hxx
+++ b/sw/inc/drawdoc.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_DRAWDOC_HXX
-#define INCLUDED_SW_INC_DRAWDOC_HXX
+#pragma once
 
 #include <svx/fmmodel.hxx>
 
@@ -46,6 +45,4 @@ private:
     virtual css::uno::Reference<css::frame::XModel> createUnoModel() override;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to