[PATCH] Cleanup OUString, macros, includes, etc in desktop

LeMoyne Castle (via Code Review) gerrit at gerrit.libreoffice.org
Sat Dec 29 08:50:46 PST 2012


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1505

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/05/1505/1

Cleanup OUString, macros, includes, etc in desktop

Removed OUString macros, excess namespace stuff, unused includes
Cleaned up OUString usage

Change-Id: Ied5c42b23b61cb14a9e790b58cb452618486a5f3
---
M desktop/source/app/configinit.cxx
1 file changed, 5 insertions(+), 18 deletions(-)



diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index 8c46728..25791df 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -24,27 +24,13 @@
 #include <comphelper/processfactory.hxx>
 #include <uno/current_context.hxx>
 #include <cppuhelper/implbase1.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
-#include <stdio.h>
+#include <rtl/ustring.hxx>
 #include <com/sun/star/task/InteractionHandler.hpp>
 
 // ----------------------------------------------------------------------------
 
-namespace uno           = ::com::sun::star::uno;
-namespace lang          = ::com::sun::star::lang;
-using rtl::OUString;
-using uno::UNO_QUERY;
+using namespace ::com::sun::star;
 
-// ----------------------------------------------------------------------------
-
-// must be aligned with configmgr/source/misc/configinteractionhandler
-static char const CONFIG_ERROR_HANDLER[] = "configuration.interaction-handler";
-// ----------------------------------------------------------------------------
-
-#define OUSTRING( constascii ) OUString( RTL_CONSTASCII_USTRINGPARAM( constascii ) )
-
-#define k_ERRORHANDLER OUSTRING( CONFIGURATION_ERROR_HANDLER )
 
 // ----------------------------------------------------------------------------
 // ConfigurationErrorHandler
@@ -113,7 +99,8 @@
 uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString const & aName)
         throw (uno::RuntimeException)
 {
-    if ( aName == CONFIG_ERROR_HANDLER )
+        // must be aligned with configmgr/source/misc/configinteractionhandler
+    if ( aName == "configuration.interaction-handler" )
     {
         if ( !m_xHandler.is() )
             m_xHandler = ConfigurationErrorHandler::getDefaultInteractionHandler();
@@ -156,7 +143,7 @@
 ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefaultInteractionHandler()
 {
     uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
-    InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
+    InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY );
     return xHandler;
 }
 //------------------------------------------------------------------------------

-- 
To view, visit https://gerrit.libreoffice.org/1505
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied5c42b23b61cb14a9e790b58cb452618486a5f3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: LeMoyne Castle <lemoyne.castle at gmail.com>



More information about the LibreOffice mailing list