compact namespace decl

used
   git grep -lw namespace
    | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;'
 to do the initial replace, then compiled and fixed.

Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2020-07-10 15:19:30 +02:00
parent abea0d6647
commit da7489eb6a
36 changed files with 75 additions and 253 deletions

View File

@@ -25,13 +25,10 @@
#include <vector> #include <vector>
// forward declaractions // forward declaractions
namespace com::sun::star namespace com::sun::star::xml::dom
{ {
namespace xml::dom class XNodeList;
{ namespace events { class XEventListener; }
class XNodeList;
namespace events { class XEventListener; }
}
} }

View File

@@ -25,10 +25,7 @@
#include <com/sun/star/xforms/XFormsEvent.hpp> #include <com/sun/star/xforms/XFormsEvent.hpp>
#include <com/sun/star/xml/dom/events/XEventTarget.hpp> #include <com/sun/star/xml/dom/events/XEventTarget.hpp>
namespace com { namespace com::sun::star::xforms {
namespace sun {
namespace star {
namespace xforms {
class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > { class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > {
@@ -67,7 +64,7 @@ class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > {
bool m_cancelable; bool m_cancelable;
}; };
} } } } }
#endif #endif

View File

@@ -27,9 +27,7 @@
// namespaces // namespaces
namespace framework{ namespace framework::pattern::frame{
namespace pattern{
namespace frame{
/** @short close (or dispose) the given resource. /** @short close (or dispose) the given resource.
@@ -77,9 +75,7 @@ inline bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource
return true; return true;
} }
} // namespace frame } // namespace framework::pattern::frame
} // namespace pattern
} // namespace framework
#endif // INCLUDED_FRAMEWORK_SOURCE_INC_PATTERN_FRAME_HXX #endif // INCLUDED_FRAMEWORK_SOURCE_INC_PATTERN_FRAME_HXX

View File

@@ -26,8 +26,7 @@
namespace com::sun::star::frame { class XModel; } namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { template <typename > class Reference; } namespace com::sun::star::uno { template <typename > class Reference; }
namespace basic { namespace basic::vba {
namespace vba {
/* This header contains public helper functions for VBA used from this module /* This header contains public helper functions for VBA used from this module
and from other VBA implementation modules such as vbahelper. and from other VBA implementation modules such as vbahelper.
@@ -88,8 +87,7 @@ BASIC_DLLPUBLIC void registerCurrentDirectory(
const OUString& rPath ); const OUString& rPath );
} // namespace vba } // namespace basic::vba
} // namespace basic
#endif #endif

View File

@@ -26,9 +26,7 @@
namespace rtl { class OString; } namespace rtl { class OString; }
namespace codemaker { namespace codemaker::UnoType {
namespace UnoType {
/** /**
An enumeration of all the sorts of relevant UNOIDL entities. An enumeration of all the sorts of relevant UNOIDL entities.
*/ */
@@ -82,7 +80,6 @@ namespace UnoType {
rtl::OString decompose( rtl::OString decompose(
rtl::OString const & type, sal_Int32 * rank = nullptr, rtl::OString const & type, sal_Int32 * rank = nullptr,
std::vector< rtl::OString > * arguments = nullptr); std::vector< rtl::OString > * arguments = nullptr);
}
} }

View File

@@ -33,25 +33,12 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
namespace com namespace com::sun::star::ui::dialogs
{ {
namespace sun class XFilePicker3;
{ struct FilePickerEvent;
namespace star struct DialogClosedEvent;
{
namespace ui
{
namespace dialogs
{
class XFilePicker3;
struct FilePickerEvent;
struct DialogClosedEvent;
}
}
}
}
} }
namespace com::sun::star::awt { class XWindow; } namespace com::sun::star::awt { class XWindow; }
namespace com::sun::star::uno { template <typename > class Reference; } namespace com::sun::star::uno { template <typename > class Reference; }
namespace weld { class Window; } namespace weld { class Window; }

View File

@@ -33,19 +33,10 @@
#include <vector> #include <vector>
namespace com namespace com::sun::star::frame
{ {
namespace sun class XFrame;
{ class XController;
namespace star
{
namespace frame
{
class XFrame;
class XController;
}
}
}
} }
class SvBorder; class SvBorder;

View File

@@ -18,19 +18,11 @@
#include <svl/svldllapi.h> #include <svl/svldllapi.h>
namespace com { namespace com::sun::star::security { class XCertificate; }
namespace sun {
namespace star {
namespace security {
class XCertificate; }
}}}
class SvStream; class SvStream;
struct SignatureInformation; struct SignatureInformation;
namespace svl { namespace svl::crypto {
namespace crypto {
/// Converts a hex-encoded string into a byte array. /// Converts a hex-encoded string into a byte array.
SVL_DLLPUBLIC std::vector<unsigned char> DecodeHexString(const OString& rHex); SVL_DLLPUBLIC std::vector<unsigned char> DecodeHexString(const OString& rHex);
@@ -84,7 +76,6 @@ private:
OUString m_aSignPassword; OUString m_aSignPassword;
}; };
}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -71,9 +71,7 @@ struct SignatureReferenceInformation
typedef ::std::vector< SignatureReferenceInformation > SignatureReferenceInformations; typedef ::std::vector< SignatureReferenceInformation > SignatureReferenceInformations;
namespace svl namespace svl::crypto
{
namespace crypto
{ {
/// Specifies the algorithm used for signature generation and validation. /// Specifies the algorithm used for signature generation and validation.
enum class SignatureMethodAlgorithm enum class SignatureMethodAlgorithm
@@ -82,7 +80,7 @@ enum class SignatureMethodAlgorithm
ECDSA ECDSA
}; };
} }
}
struct SignatureInformation struct SignatureInformation
{ {

View File

@@ -30,9 +30,7 @@ namespace com :: sun :: star :: uno { class XComponentContext; }
class SvStream; class SvStream;
namespace svt namespace svt::GraphicAccess
{
namespace GraphicAccess
{ {
/** Helpers for obtaining streams (which also can be used with the ImageProducer) /** Helpers for obtaining streams (which also can be used with the ImageProducer)
@@ -62,8 +60,7 @@ UNLESS_MERGELIBS(SVT_DLLPUBLIC) css::uno::Reference<css::io::XInputStream> getIm
css::uno::Reference<css::uno::XComponentContext> const & rxContext, css::uno::Reference<css::uno::XComponentContext> const & rxContext,
OUString const & rImageResourceURL); OUString const & rImageResourceURL);
} // namespace GraphicAccess } // namespace svt::GraphicAccess
} // namespace svt
#endif // INCLUDED_SVTOOLS_IMAGERESOURCEACCESS_HXX #endif // INCLUDED_SVTOOLS_IMAGERESOURCEACCESS_HXX

View File

@@ -25,13 +25,10 @@
#include <sal/types.h> #include <sal/types.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
namespace com { namespace com::sun::star::uno {
namespace sun {
namespace star {
namespace uno {
class Type; class Type;
class Any; class Any;
} } } } }
#define BASEPROPERTY_NOTFOUND 0 #define BASEPROPERTY_NOTFOUND 0

View File

@@ -31,16 +31,7 @@ class CharClass;
namespace com::sun::star::lang { struct Locale; } namespace com::sun::star::lang { struct Locale; }
namespace com::sun::star::util { class XTextSearch2; } namespace com::sun::star::util { class XTextSearch2; }
namespace com::sun::star::util { struct SearchResult; }
namespace com {
namespace sun {
namespace star {
namespace util {
struct SearchResult;
}
}
}
}
namespace i18nutil { namespace i18nutil {
struct SearchOptions; struct SearchOptions;
struct SearchOptions2; struct SearchOptions2;

View File

@@ -26,20 +26,11 @@
#include <tools/stream.hxx> #include <tools/stream.hxx>
#include <memory> #include <memory>
namespace com namespace com::sun::star::io
{
namespace sun
{
namespace star
{
namespace io
{ {
class XStream; class XStream;
class XInputStream; class XInputStream;
} }
}
}
}
namespace com::sun::star::awt { class XWindow; } namespace com::sun::star::awt { class XWindow; }

View File

@@ -22,8 +22,7 @@
#include <comphelper/servicedecl.hxx> #include <comphelper/servicedecl.hxx>
namespace comphelper { namespace comphelper::service_decl {
namespace service_decl {
template <typename ImplT_, typename WithArgsT = with_args<false> > template <typename ImplT_, typename WithArgsT = with_args<false> >
struct vba_service_class_ : public serviceimpl_base< detail::OwnServiceImpl<ImplT_>, WithArgsT > struct vba_service_class_ : public serviceimpl_base< detail::OwnServiceImpl<ImplT_>, WithArgsT >
{ {
@@ -43,8 +42,7 @@ struct vba_service_class_ : public serviceimpl_base< detail::OwnServiceImpl<Impl
explicit vba_service_class_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {} explicit vba_service_class_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {}
}; };
} // namespace service_decl } // namespace comphelper::service_decl
} // namespace comphelper
#endif #endif

View File

@@ -36,10 +36,8 @@
#include <sfx2/docfilt.hxx> #include <sfx2/docfilt.hxx>
#include <sfx2/docfile.hxx> #include <sfx2/docfile.hxx>
namespace ooo namespace ooo::vba
{ {
namespace vba
{
inline css::uno::Reference< css::lang::XMultiServiceFactory > getVBAServiceFactory( SfxObjectShell const * pShell ) inline css::uno::Reference< css::lang::XMultiServiceFactory > getVBAServiceFactory( SfxObjectShell const * pShell )
{ {
@@ -74,7 +72,6 @@ namespace ooo
// word seems to return an erroneous mime type :-/ "application/msword" not consistent with the excel one // word seems to return an erroneous mime type :-/ "application/msword" not consistent with the excel one
inline bool isAlienWordDoc( SfxObjectShell const & rDocShell ) { return isAlienDoc( rDocShell, "application/msword" ); } inline bool isAlienWordDoc( SfxObjectShell const & rDocShell ) { return isAlienDoc( rDocShell, "application/msword" ); }
}
} }
#endif #endif

View File

@@ -51,9 +51,7 @@ class SfxObjectShell;
class SfxViewFrame; class SfxViewFrame;
class SfxViewShell; class SfxViewShell;
namespace ooo namespace ooo::vba
{
namespace vba
{ {
/// @throws css::lang::IllegalArgumentException /// @throws css::lang::IllegalArgumentException
template < class T > template < class T >
@@ -273,8 +271,7 @@ public:
static void runtimeexception( ErrCode err ); static void runtimeexception( ErrCode err );
}; };
} // vba } // ooo::vba
} // ooo
namespace ov = ooo::vba; namespace ov = ooo::vba;

View File

@@ -27,9 +27,7 @@
#include <sal/types.h> #include <sal/types.h>
#include <vbahelper/vbahelper.hxx> #include <vbahelper/vbahelper.hxx>
namespace ooo namespace ooo::vba
{
namespace vba
{ {
template< typename T1, typename T2 > template< typename T1, typename T2 >
class DefaultReturnHelper : public ::cppu::WeakImplHelper< T2, css::script::XDefaultProperty > class DefaultReturnHelper : public ::cppu::WeakImplHelper< T2, css::script::XDefaultProperty >
@@ -49,8 +47,7 @@ namespace ooo
ReturnInteger( sal_Int32 nValue ) : ReturnInteger_BASE( nValue ){} ReturnInteger( sal_Int32 nValue ) : ReturnInteger_BASE( nValue ){}
}; };
} // vba } // ooo::vba
} // ooo
#endif #endif

View File

@@ -22,15 +22,12 @@
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
namespace registry namespace registry::tools
{
namespace tools
{ {
OUString convertToFileUrl(char const * filename, sal_Int32 length); OUString convertToFileUrl(char const * filename, sal_Int32 length);
} // namespace tools } // namespace registry::tools
} // namespace registry
#endif /* INCLUDED_REGISTRY_TOOLS_FILEURL_HXX */ #endif /* INCLUDED_REGISTRY_TOOLS_FILEURL_HXX */

View File

@@ -23,9 +23,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace registry namespace registry::tools
{
namespace tools
{ {
class Options class Options
{ {
@@ -52,8 +50,7 @@ protected:
virtual void printUsage_Impl() const = 0; virtual void printUsage_Impl() const = 0;
}; };
} // namespace tools } // namespace registry::tools
} // namespace registry
#endif /* INCLUDED_REGISTRY_TOOLS_OPTIONS_HXX */ #endif /* INCLUDED_REGISTRY_TOOLS_OPTIONS_HXX */

View File

@@ -22,8 +22,7 @@
#include <sal/types.h> #include <sal/types.h>
namespace sca { namespace sca::analysis {
namespace analysis {
// BESSEL functions // BESSEL functions
@@ -57,8 +56,7 @@ double BesselY( double x, sal_Int32 n );
*/ */
double BesselK( double x, sal_Int32 n ); double BesselK( double x, sal_Int32 n );
} // namespace analysis } // namespace sca::analysis
} // namespace sca
#endif #endif

View File

@@ -42,8 +42,7 @@ namespace com::sun::star::lang { class XMultiServiceFactory; }
#define RETURN_FINITE(d) if( !std::isfinite( d ) ) throw css::lang::IllegalArgumentException(); return d; #define RETURN_FINITE(d) if( !std::isfinite( d ) ) throw css::lang::IllegalArgumentException(); return d;
namespace sca { namespace sca::pricing {
namespace pricing {
enum class ScaCategory enum class ScaCategory
{ {
@@ -112,8 +111,7 @@ struct FindScaFuncData
bool operator() ( ScaFuncData const & rCandidate ) const { return rCandidate.Is(m_rId); } bool operator() ( ScaFuncData const & rCandidate ) const { return rCandidate.Is(m_rId); }
}; };
} // namespace pricing } // namespace sca::pricing
} // namespace sca
css::uno::Reference< css::uno::XInterface > SAL_CALL PricingFunctionAddIn_CreateInstance( css::uno::Reference< css::uno::XInterface > SAL_CALL PricingFunctionAddIn_CreateInstance(

View File

@@ -42,7 +42,6 @@ namespace drawinglayer {
namespace processor2d { namespace processor2d {
class BaseProcessor2D; class BaseProcessor2D;
} }
namespace primitive2d { namespace primitive2d {
class PolygonHairlinePrimitive2D; class PolygonHairlinePrimitive2D;
} }

View File

@@ -54,10 +54,8 @@ class SfxInterface;
class BasicManager; class BasicManager;
class SfxBasicManagerHolder; class SfxBasicManagerHolder;
class SfxBasicManagerCreationListener; class SfxBasicManagerCreationListener;
namespace sfx2::sidebar { class Theme; }
namespace sfx2 {
namespace sidebar { class Theme; }
}
typedef std::vector<SfxDdeDocTopic_Impl*> SfxDdeDocTopics_Impl; typedef std::vector<SfxDdeDocTopic_Impl*> SfxDdeDocTopics_Impl;

View File

@@ -23,19 +23,7 @@
#include <sfx2/dockwin.hxx> #include <sfx2/dockwin.hxx>
namespace com namespace com::sun::star::frame { class XFrame; }
{
namespace sun
{
namespace star
{
namespace frame
{
class XFrame;
}
}
}
}
// forward --------------------------------------------------------------- // forward ---------------------------------------------------------------

View File

@@ -24,19 +24,10 @@
#include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/beans/Optional.hpp>
namespace com namespace com::sun::star::uno
{
namespace sun
{
namespace star
{
namespace uno
{ {
class Any; class Any;
} }
}
}
}
namespace kf5access namespace kf5access
{ {

View File

@@ -27,19 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
namespace com namespace com::sun::star::beans { struct PropertyValue; }
{
namespace sun
{
namespace star
{
namespace beans
{
struct PropertyValue;
}
}
}
}
class SmFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo > class SmFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
{ {

View File

@@ -25,12 +25,8 @@
#include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Sequence.hxx>
#include <vcl/weld.hxx> #include <vcl/weld.hxx>
namespace com { namespace com::sun::star::security { class XCertificate; }
namespace sun {
namespace star {
namespace security {
class XCertificate; }
}}}
class MacroWarning : public weld::MessageDialogController class MacroWarning : public weld::MessageDialogController
{ {

View File

@@ -18,8 +18,7 @@
#include <sal/log.hxx> #include <sal/log.hxx>
#include <xmloff/dllapi.h> #include <xmloff/dllapi.h>
namespace xmloff { namespace xmloff::token {
namespace token {
class TokenMap class TokenMap
{ {
@@ -89,8 +88,7 @@ private:
TokenMap& mrTokenMap; TokenMap& mrTokenMap;
}; };
} // namespace token } // namespace xmloff::token
} // namespace xmloff
#endif #endif

View File

@@ -25,9 +25,7 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XPropertyState.hpp>
namespace xmloff namespace xmloff::chart
{
namespace chart
{ {
class ColorPropertySet : public ::cppu::WeakImplHelper< class ColorPropertySet : public ::cppu::WeakImplHelper<
@@ -76,8 +74,7 @@ private:
Color m_nDefaultColor; Color m_nDefaultColor;
}; };
} // namespace chart } // namespace xmloff::chart
} // namespace xmloff
// XMLOFF_COLORPROPERTYSET_HXX // XMLOFF_COLORPROPERTYSET_HXX
#endif #endif

View File

@@ -26,14 +26,10 @@
#include <vector> #include <vector>
namespace com { namespace com::sun::star {
namespace sun { namespace io { class XStream; }
namespace star { namespace embed { class XStorage; }
namespace io { }
class XStream; }
namespace embed {
class XStorage; }
}}}
namespace com::sun::star::xml::sax { class XDocumentHandler; } namespace com::sun::star::xml::sax { class XDocumentHandler; }

View File

@@ -30,11 +30,7 @@
#include <com/sun/star/xml/crypto/XSEInitializer.hpp> #include <com/sun/star/xml/crypto/XSEInitializer.hpp>
namespace com namespace com::sun::star
{
namespace sun
{
namespace star
{ {
namespace beans namespace beans
{ {
@@ -57,8 +53,6 @@ namespace uno
class XComponentContext; class XComponentContext;
} }
} }
}
}
class PDFSignatureHelper; class PDFSignatureHelper;
/// Manages signatures (addition, removal), used by DigitalSignaturesDialog. /// Manages signatures (addition, removal), used by DigitalSignaturesDialog.

View File

@@ -13,19 +13,14 @@
#include <xmlsecuritydllapi.h> #include <xmlsecuritydllapi.h>
namespace vcl namespace vcl::filter
{
namespace filter
{ {
class PDFObjectElement; class PDFObjectElement;
} }
}
struct SignatureInformation; struct SignatureInformation;
class SvStream; class SvStream;
namespace xmlsecurity namespace xmlsecurity::pdfio
{
namespace pdfio
{ {
/** /**
* @param rInformation The actual result. * @param rInformation The actual result.
@@ -36,8 +31,7 @@ XMLSECURITY_DLLPUBLIC bool ValidateSignature(SvStream& rStream,
vcl::filter::PDFObjectElement* pSignature, vcl::filter::PDFObjectElement* pSignature,
SignatureInformation& rInformation, bool bLast); SignatureInformation& rInformation, bool bLast);
} // namespace pdfio } // namespace xmlsecurity::pdfio
} // namespace xmlsecurity
#endif // INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX #endif // INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX

View File

@@ -15,11 +15,7 @@
#include <svl/sigstruct.hxx> #include <svl/sigstruct.hxx>
namespace com namespace com::sun::star
{
namespace sun
{
namespace star
{ {
namespace frame namespace frame
{ {
@@ -37,16 +33,11 @@ namespace security
{ {
struct DocumentSignatureInformation; struct DocumentSignatureInformation;
} }
namespace xml namespace xml::crypto
{
namespace crypto
{ {
class XSecurityEnvironment; class XSecurityEnvironment;
} }
} }
}
}
}
/// Handles signatures of a PDF file. /// Handles signatures of a PDF file.
class XMLSECURITY_DLLPUBLIC PDFSignatureHelper class XMLSECURITY_DLLPUBLIC PDFSignatureHelper

View File

@@ -31,15 +31,13 @@
class DateTime; class DateTime;
class UriBindingHelper; class UriBindingHelper;
namespace com { namespace com::sun::star {
namespace sun { namespace io {
namespace star { class XOutputStream;
namespace io { class XInputStream;
class XOutputStream; }
class XInputStream; } namespace embed { class XStorage; }
namespace embed { }
class XStorage; }
}}}
namespace com::sun::star::graphic { class XGraphic; } namespace com::sun::star::graphic { class XGraphic; }
namespace com::sun::star::uno { class XComponentContext; } namespace com::sun::star::uno { class XComponentContext; }

View File

@@ -26,14 +26,10 @@
#include <com/sun/star/xml/crypto/XUriBinding.hpp> #include <com/sun/star/xml/crypto/XUriBinding.hpp>
namespace com { namespace com::sun::star {
namespace sun { namespace io { class XInputStream; }
namespace star { namespace embed { class XStorage; }
namespace io { }
class XInputStream; }
namespace embed {
class XStorage; }
}}}
// XUriBinding // XUriBinding

View File

@@ -14,11 +14,7 @@
#include <svl/sigstruct.hxx> #include <svl/sigstruct.hxx>
namespace com namespace com::sun::star
{
namespace sun
{
namespace star
{ {
namespace embed namespace embed
{ {
@@ -28,16 +24,11 @@ namespace uno
{ {
class XComponentContext; class XComponentContext;
} }
namespace xml namespace xml::sax
{
namespace sax
{ {
class XDocumentHandler; class XDocumentHandler;
} }
} }
}
}
}
/// Writes a single OOXML digital signature. /// Writes a single OOXML digital signature.
class OOXMLSecExporter class OOXMLSecExporter