[Libreoffice-commits] core.git: sw/inc sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 19 19:08:43 UTC 2020


 sw/inc/index.hxx                                      |    6 +-----
 sw/inc/shellio.hxx                                    |    8 +-------
 sw/inc/textboxhelper.hxx                              |   11 +----------
 sw/source/core/crsr/overlayrangesoutline.hxx          |    8 +++-----
 sw/source/core/inc/DateFormFieldButton.hxx            |    5 +----
 sw/source/core/inc/DropDownFormFieldButton.hxx        |    5 +----
 sw/source/core/inc/FormFieldButton.hxx                |    5 +----
 sw/source/core/inc/MarkManager.hxx                    |    5 ++---
 sw/source/core/inc/UndoBookmark.hxx                   |    8 +++-----
 sw/source/core/inc/bookmrk.hxx                        |   15 +++------------
 sw/source/core/inc/crossrefbookmark.hxx               |    4 +---
 sw/source/core/inc/docsort.hxx                        |   11 +----------
 sw/source/filter/ww8/docxsdrexport.hxx                |    8 +-------
 sw/source/filter/ww8/docxtablestyleexport.hxx         |   11 +----------
 sw/source/filter/ww8/rtfexportfilter.hxx              |   11 +----------
 sw/source/ui/uno/swdetect.hxx                         |   14 +-------------
 sw/source/ui/vba/wordvbahelper.hxx                    |   10 ++--------
 sw/source/uibase/docvw/OverlayRanges.hxx              |    7 ++-----
 sw/source/uibase/docvw/SidebarScrollBar.hxx           |   11 ++---------
 sw/source/uibase/inc/DateFormFieldDialog.hxx          |    6 +-----
 sw/source/uibase/inc/DropDownFormFieldDialog.hxx      |    5 +----
 sw/source/uibase/sidebar/TableEditPanel.hxx           |    6 ++----
 sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx |    6 ++----
 23 files changed, 35 insertions(+), 151 deletions(-)

New commits:
commit f3ed833dc829d02aa5daa99b1499d4ca0c287554
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Jul 19 18:46:36 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 19 21:07:57 2020 +0200

    compact namespace: sw
    
    Change-Id: Ib1303380e6b55b3b3f8a3d513956f9e77ae5961e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99006
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index 10256ad1f53f..0e5e89125d92 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -27,11 +27,7 @@
 class SwIndexReg;
 struct SwPosition;
 
-namespace sw {
-namespace mark {
-class IMark;
-}
-}
+namespace sw::mark { class IMark; }
 
 /// Marks a character position inside a document model node.
 class SAL_WARN_UNUSED SW_DLLPUBLIC SwIndex
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index dd6183444fe8..19a38e083d95 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -48,13 +48,7 @@ class SwPaM;
 class SwTextBlocks;
 struct SwPosition;
 struct Writer_Impl;
-namespace sw
-{
-namespace mark
-{
-class IMark;
-}
-}
+namespace sw::mark { class IMark; }
 namespace com::sun::star::embed { class XStorage; }
 
 // Defines the count of chars at which a paragraph read via ASCII/W4W-Reader
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index db565c2e8915..61879024b86e 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -31,19 +31,10 @@ namespace tools
 class Rectangle;
 }
 class ZSortFly;
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace drawing
+namespace com::sun::star::drawing
 {
 class XShape;
 }
-}
-}
-}
 
 /**
  * A TextBox is a TextFrame, that is tied to a drawinglayer shape.
diff --git a/sw/source/core/crsr/overlayrangesoutline.hxx b/sw/source/core/crsr/overlayrangesoutline.hxx
index 3621f7fe664c..ff1fd71b447b 100644
--- a/sw/source/core/crsr/overlayrangesoutline.hxx
+++ b/sw/source/core/crsr/overlayrangesoutline.hxx
@@ -24,9 +24,7 @@
 
 #include <vector>
 
-namespace sw
-{
-    namespace overlay
+namespace sw::overlay
     {
         class OverlayRangesOutline : public sdr::overlay::OverlayObject
         {
@@ -52,8 +50,8 @@ namespace sw
             // data write access
             void setRanges(const std::vector< basegfx::B2DRange >& rNew);
         };
-    } // end of namespace overlay
-} // end of namespace sw
+
+} // end of namespace sw::overlay
 
 #endif // INCLUDED_SW_SOURCE_CORE_CRSR_OVERLAYRANGESOUTLINE_HXX
 
diff --git a/sw/source/core/inc/DateFormFieldButton.hxx b/sw/source/core/inc/DateFormFieldButton.hxx
index 8d0e4d6c4123..60aad2777aba 100644
--- a/sw/source/core/inc/DateFormFieldButton.hxx
+++ b/sw/source/core/inc/DateFormFieldButton.hxx
@@ -15,13 +15,10 @@
 class SwEditWin;
 class FloatingWindow;
 class SvNumberFormatter;
-namespace sw
-{
-namespace mark
+namespace sw::mark
 {
 class DateFieldmark;
 }
-} // namespace sw
 
 /**
  * This button is shown when the cursor is on a date form field.
diff --git a/sw/source/core/inc/DropDownFormFieldButton.hxx b/sw/source/core/inc/DropDownFormFieldButton.hxx
index a19470498579..ffaa2af2d2b8 100644
--- a/sw/source/core/inc/DropDownFormFieldButton.hxx
+++ b/sw/source/core/inc/DropDownFormFieldButton.hxx
@@ -14,13 +14,10 @@
 
 class SwEditWin;
 class FloatingWindow;
-namespace sw
-{
-namespace mark
+namespace sw::mark
 {
 class DropDownFieldmark;
 }
-}
 
 /**
  * This button is shown when the cursor is on a drop-down form field.
diff --git a/sw/source/core/inc/FormFieldButton.hxx b/sw/source/core/inc/FormFieldButton.hxx
index 987d86d15d70..265d0bafb713 100644
--- a/sw/source/core/inc/FormFieldButton.hxx
+++ b/sw/source/core/inc/FormFieldButton.hxx
@@ -15,13 +15,10 @@
 
 class SwEditWin;
 class FloatingWindow;
-namespace sw
-{
-namespace mark
+namespace sw::mark
 {
 class Fieldmark;
 }
-} // namespace sw
 
 /**
  * This button is shown when the cursor is on a form field with drop-down capability.
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index a9457f916763..a1f98062a167 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -27,8 +27,7 @@
 
 class SwCursorShell;
 
-namespace sw {
-    namespace mark {
+namespace sw::mark {
     typedef std::unordered_map<OUString, sal_Int32> MarkBasenameMapUniqueOffset_t;
 
     class FieldmarkWithDropDownButton;
@@ -142,7 +141,7 @@ namespace sw {
 
             sw::mark::FieldmarkWithDropDownButton* m_pLastActiveFieldmark;
     };
-    } // namespace mark
+
 }
 
 #endif
diff --git a/sw/source/core/inc/UndoBookmark.hxx b/sw/source/core/inc/UndoBookmark.hxx
index ebaac8cd19e7..4246389aa756 100644
--- a/sw/source/core/inc/UndoBookmark.hxx
+++ b/sw/source/core/inc/UndoBookmark.hxx
@@ -27,11 +27,9 @@ class SwHistoryBookmark;
 class SwHistoryNoTextFieldmark;
 class SwHistoryTextFieldmark;
 
-namespace sw {
-    namespace mark {
-        class IMark;
-        class IFieldmark;
-    }
+namespace sw::mark {
+    class IMark;
+    class IFieldmark;
 }
 
 class SwDoc;
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index 27e4171bebc6..36a673d86499 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -31,23 +31,14 @@
 #include <swrect.hxx>
 #include "FormFieldButton.hxx"
 
-namespace com {
-    namespace sun {
-        namespace star {
-            namespace text {
-                class XTextContent;
-            }
-        }
-    }
-}
+namespace com::sun::star::text { class XTextContent; }
 
 class SwDoc;
 class SwEditWin;
 class SwServerObject;
 class SvNumberFormatter;
 
-namespace sw {
-    namespace mark {
+namespace sw::mark {
         class MarkBase
             : virtual public IMark
         {
@@ -349,8 +340,8 @@ namespace sw {
 
         /// check if rPaM is valid range of new fieldmark
         bool IsFieldmarkOverlap(SwPaM const& rPaM);
-    }
 }
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx
index 06116bdda776..e3976329ed4c 100644
--- a/sw/source/core/inc/crossrefbookmark.hxx
+++ b/sw/source/core/inc/crossrefbookmark.hxx
@@ -24,8 +24,7 @@
 #include <rtl/ustring.hxx>
 #include <vcl/keycod.hxx>
 
-namespace sw {
-    namespace mark {
+namespace sw::mark {
         class CrossRefBookmark
             : public Bookmark
         {
@@ -78,7 +77,6 @@ namespace sw {
                 const OUString& rName);
             static bool IsLegalName(const OUString& rName);
         };
-    }
 }
 
 #endif
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index fdc73f908027..7a89c4c716b9 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -34,16 +34,7 @@ class FndBox_;
 class FndLine_;
 class CollatorWrapper;
 class LocaleDataWrapper;
-
-namespace com {
-    namespace sun {
-        namespace star {
-            namespace lang {
-                struct Locale;
-            }
-        }
-    }
-}
+namespace com::sun::star::lang { struct Locale; }
 
 class SwMovedBoxes
 {
diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx
index aecb83c2359d..69a9eb3adec0 100644
--- a/sw/source/filter/ww8/docxsdrexport.hxx
+++ b/sw/source/filter/ww8/docxsdrexport.hxx
@@ -20,13 +20,7 @@ namespace rtl
 {
 template <typename> class Reference;
 }
-namespace oox
-{
-namespace drawingml
-{
-class DrawingML;
-}
-}
+namespace oox::drawingml { class DrawingML; }
 class Size;
 class SdrObject;
 class SvxBoxItem;
diff --git a/sw/source/filter/ww8/docxtablestyleexport.hxx b/sw/source/filter/ww8/docxtablestyleexport.hxx
index 8303aafdc518..fad19f4b4fd9 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.hxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.hxx
@@ -14,19 +14,10 @@
 
 #include <sax/fshelper.hxx>
 
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace beans
+namespace com::sun::star::beans
 {
 struct PropertyValue;
 }
-}
-}
-}
 class SwDoc;
 
 /// Handles DOCX export of table styles, based on InteropGrabBag.
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index b7603c1de732..7135f7602d34 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -25,19 +25,10 @@
 #include <cppuhelper/implbase.hxx>
 #include <shellio.hxx>
 
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace uno
+namespace com::sun::star::uno
 {
 class XComponentContext;
 }
-}
-}
-}
 
 /// Dummy Writer implementation to be able to use the string format methods of the base class
 class RtfWriter : public Writer
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index ce410c97aced..a72521004aad 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -25,19 +25,7 @@
 
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
-namespace com
-{
-    namespace sun
-    {
-        namespace star
-        {
-            namespace beans
-            {
-                struct PropertyValue;
-            }
-        }
-    }
-}
+namespace com::sun::star::beans { struct PropertyValue; }
 
 class SfxMedium;
 class SfxFilter;
diff --git a/sw/source/ui/vba/wordvbahelper.hxx b/sw/source/ui/vba/wordvbahelper.hxx
index d0ac9e43ff17..ba8f77885ca8 100644
--- a/sw/source/ui/vba/wordvbahelper.hxx
+++ b/sw/source/ui/vba/wordvbahelper.hxx
@@ -27,11 +27,7 @@
 
 class SwDocShell;
 class SwView;
-namespace ooo
-{
-    namespace vba
-    {
-    namespace word
+namespace ooo::vba::word
     {
         //css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
         SwDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel );
@@ -61,9 +57,7 @@ namespace ooo
         MOVE_DOWN
     };
 
-} // word
-} // vba
-} // ooo
+} // ooo::vba::word
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/docvw/OverlayRanges.hxx b/sw/source/uibase/docvw/OverlayRanges.hxx
index 7482deef8f97..9e860a5c612a 100644
--- a/sw/source/uibase/docvw/OverlayRanges.hxx
+++ b/sw/source/uibase/docvw/OverlayRanges.hxx
@@ -27,9 +27,7 @@
 
 class SwView;
 
-namespace sw
-{
-    namespace overlay
+namespace sw::overlay
     {
         class OverlayRanges final : public sdr::overlay::OverlayObject
         {
@@ -67,8 +65,7 @@ namespace sw
             std::vector< basegfx::B2DRange > maRanges;
             bool mbShowSolidBorder;
         };
-    } // end of namespace overlay
-} // end of namespace sw
+} // end of namespace sw::overlay
 
 #endif // INCLUDED_SW_SOURCE_UIBASE_DOCVW_OVERLAYRANGES_HXX
 
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.hxx b/sw/source/uibase/docvw/SidebarScrollBar.hxx
index 2fb1a90de8e1..8a2834cdb797 100644
--- a/sw/source/uibase/docvw/SidebarScrollBar.hxx
+++ b/sw/source/uibase/docvw/SidebarScrollBar.hxx
@@ -13,18 +13,12 @@
 #include <vcl/scrbar.hxx>
 
 class SwView;
-
-namespace sw
-{
-namespace annotation
+namespace sw::annotation
 {
 class SwAnnotationWin;
 }
-}
 
-namespace sw
-{
-namespace sidebarwindows
+namespace sw::sidebarwindows
 {
 /// Similar to the VCL scrollbar, but instrumented with Writer-specific details for LOK.
 class SidebarScrollBar : public ScrollBar
@@ -43,7 +37,6 @@ public:
     ~SidebarScrollBar() override;
 };
 }
-}
 
 #endif
 
diff --git a/sw/source/uibase/inc/DateFormFieldDialog.hxx b/sw/source/uibase/inc/DateFormFieldDialog.hxx
index 11ae445fe10a..fd157af9be34 100644
--- a/sw/source/uibase/inc/DateFormFieldDialog.hxx
+++ b/sw/source/uibase/inc/DateFormFieldDialog.hxx
@@ -15,14 +15,10 @@
 
 class SvNumberFormatter;
 class SwDoc;
-
-namespace sw
-{
-namespace mark
+namespace sw::mark
 {
 class IDateFieldmark;
 }
-} // namespace sw
 
 /// Dialog to specify the properties of date form field
 namespace sw
diff --git a/sw/source/uibase/inc/DropDownFormFieldDialog.hxx b/sw/source/uibase/inc/DropDownFormFieldDialog.hxx
index ae1e1b51db62..0719b740163a 100644
--- a/sw/source/uibase/inc/DropDownFormFieldDialog.hxx
+++ b/sw/source/uibase/inc/DropDownFormFieldDialog.hxx
@@ -12,13 +12,10 @@
 
 #include <vcl/weld.hxx>
 
-namespace sw
-{
-namespace mark
+namespace sw::mark
 {
 class IFieldmark;
 }
-} // namespace sw
 
 /// Dialog to specify the properties of drop-down form field
 namespace sw
diff --git a/sw/source/uibase/sidebar/TableEditPanel.hxx b/sw/source/uibase/sidebar/TableEditPanel.hxx
index 361e86009f91..7fd895700b69 100644
--- a/sw/source/uibase/sidebar/TableEditPanel.hxx
+++ b/sw/source/uibase/sidebar/TableEditPanel.hxx
@@ -17,9 +17,7 @@
 #include <sfx2/weldutils.hxx>
 #include <svx/relfld.hxx>
 
-namespace sw
-{
-namespace sidebar
+namespace sw::sidebar
 {
 class TableEditPanel : public PanelLayout,
                        public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
@@ -85,7 +83,7 @@ private:
     DECL_LINK(RowHeightMofiyHdl, weld::MetricSpinButton&, void);
     DECL_LINK(ColumnWidthMofiyHdl, weld::MetricSpinButton&, void);
 };
-}
+
 } // end of namespace sw::sidebar
 
 #endif // INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_TABLEEDITPANEL_HXX
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx
index e29c5fc14169..43acb654411b 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx
@@ -21,9 +21,7 @@
 #include <sfx2/weldutils.hxx>
 #include <svx/sidebar/InspectorTextPanel.hxx>
 
-namespace sw
-{
-namespace sidebar
+namespace sw::sidebar
 {
 class WriterInspectorTextPanel final : public svx::sidebar::InspectorTextPanel
 {
@@ -39,7 +37,7 @@ public:
     // attributes have changed
     DECL_LINK(AttrChangedNotify, LinkParamNone*, void);
 };
-}
+
 } // end of namespace svx::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list