Kaydet (Commit) c4399bcd authored tarafından Alexander Wilms's avatar Alexander Wilms Kaydeden (comit) Caolán McNamara

Remove visual noise from uui

Change-Id: I64fa42929aad00fc63f2937527dd3539f9d6f7f3
Reviewed-on: https://gerrit.libreoffice.org/8337Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f993a893
......@@ -35,7 +35,7 @@
namespace uui
{
/*-************************************************************************************************************//**
/*-************************************************************************************************************
@short initialize filter dialog with start values
@descr We set some necessary information on these instance for later working and create internal structures.
After construction user should call "SetFilters()" and "SetURL()" to fill listbox with selectable filter
......@@ -64,7 +64,7 @@ FilterDialog::FilterDialog( Window* pParentWindow ,
FreeResource();
}
/*-************************************************************************************************************//**
/*-************************************************************************************************************
@short set file name on dialog control
@descr We convert given URL (it must be an URL!) into valid file name and show it on our dialog.
......@@ -82,7 +82,7 @@ void FilterDialog::SetURL( const OUString& sURL )
m_ftURL.SetText( impl_buildUIFileName(sURL) );
}
/*-************************************************************************************************************//**
/*-************************************************************************************************************
@short change list of filter names
@descr We save given pointer internal and use it to fill our listbox with given names.
Saved list pointer is used on method "AskForFilter()" too, to find user selected item
......@@ -116,7 +116,7 @@ void FilterDialog::ChangeFilters( const FilterNameList* pFilterNames )
}
}
/*-************************************************************************************************************//**
/*-************************************************************************************************************
@short ask user for his decision
@descr We show the dialog and if user finish it with "OK" - we try to find selected item in internal saved
name list (which you must set in "ChangeFilters()"!). If we return sal_True as result, you can use out
......@@ -159,7 +159,7 @@ bool FilterDialog::AskForFilter( FilterNameListPtr& pSelectedItem )
return bSelected;
}
/*-************************************************************************************************************//**
/*-************************************************************************************************************
@short helper class to calculate length of given string
@descr Instances of it can be used as callback for INetURLObject::getAbbreviated() method to build
short URLs to show it on GUI. We use in ctor set OutputDevice to call special VCL method ...
......@@ -190,7 +190,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util:
const OutputDevice* m_pDevice;
};
/*-************************************************************************************************************//**
/*-************************************************************************************************************
@short try to build short name of given URL to show it n GUI
@descr We detect type of given URL automaticly and build this short name depend on this type ...
If we couldnt make it right we return full given string without any changes ...
......
......@@ -203,7 +203,7 @@ handleAuthenticationRequest_(
if (xSupplyAuthentication.is())
xSupplyAuthentication2.set(xSupplyAuthentication, uno::UNO_QUERY);
//////////////////////////
// First, try to obtain credentials from password container service.
uui::PasswordContainerHelper aPwContainerHelper(xContext);
if (aPwContainerHelper.handleAuthenticationRequest(rRequest,
......@@ -215,7 +215,7 @@ handleAuthenticationRequest_(
return;
}
//////////////////////////
// Second, try to obtain credentials from user via password dialog.
ucb::RememberAuthentication eDefaultRememberMode
= ucb::RememberAuthentication_SESSION;
......@@ -318,7 +318,7 @@ handleAuthenticationRequest_(
xSupplyAuthentication->select();
}
//////////////////////////
// Third, store credentials in password container.
if ( aInfo.GetIsUseSystemCredentials() )
......
......@@ -206,7 +206,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
// Disapprove = 4,
// Retry = 2,
// Abort = 1
//
// The mapping has five properties on which the code to select the
// correct continuation relies:
// 1 The OK button is mapped to Approve if that is available,
......@@ -215,10 +215,10 @@ UUIInteractionHelper::handleErrorHandlerRequest(
// 3 The RETRY button is always mapped to Retry.
// 4 The NO button is always mapped to Disapprove.
// 5 The YES button is always mapped to Approve.
//
// Because the WinBits button combinations are quite restricted, not
// every request can be served here.
//
// Finally, it seems to be better to leave default button
// determination to VCL (the favouring of CANCEL as default button
// seems to not always be what the user wants)...
......
......@@ -337,7 +337,7 @@ UUIInteractionHelper::tryOtherInteractionHandler(
namespace
{
// .................................................................................................................
static bool lcl_matchesRequest( const Any& i_rRequest, const OUString& i_rTypeName, const OUString& i_rPropagation )
{
const ::com::sun::star::uno::TypeDescription aTypeDesc( i_rTypeName );
......@@ -834,9 +834,9 @@ UUIInteractionHelper::handleRequest_impl(
}
///////////////////////////////////////////////////////////////////
// Handle requests which do not have a plain string representation.
///////////////////////////////////////////////////////////////////
if (!bObtainErrorStringOnly)
{
if ( handleAuthenticationRequest( rRequest ) )
......@@ -899,9 +899,9 @@ UUIInteractionHelper::handleRequest_impl(
return true;
}
///////////////////////////////////////////////////////////////
// Last chance: interaction handlers registered in the configuration
///////////////////////////////////////////////////////////////
// typed InteractionHandlers (ooo.Interactions)
if ( handleTypedHandlerImplementations( rRequest ) )
......@@ -1301,7 +1301,7 @@ UUIInteractionHelper::handleFutureDocumentVersionUpdateRequest(
// TODO: this static variable is somewhat hacky. Formerly (before the dialog was moved from SFX2 to the
// interaction handler implementation), this was stored in SFX_APP()'s impl structure, in member
// bODFVersionWarningLater. Of course, we do not have access to it here.
//
// A proper solution which I would envision would be:
// - There's a central implementation (this one here) of css.task.InteractionHandler
// - There's a configuration which maps UNO names to service names
......@@ -1314,7 +1314,7 @@ UUIInteractionHelper::handleFutureDocumentVersionUpdateRequest(
// This way, the FutureDocumentVersionProductUpdateRequest could be handled in SFX (or any other
// suitable place), again, and we would only have one place where we remember the s_bDeferredToNextSession
// flag.
//
// Note: The above pattern has been implemented in CWS autorecovery. Now the remaining task is to move the
// handling of this interaction to SFX, again.
......@@ -1447,9 +1447,9 @@ UUIInteractionHelper::handleBrokenPackageRequest(
}
}
//=========================================================================
// ErrorResource Implementation
//=========================================================================
bool
ErrorResource::getString(ErrCode nErrorCode, OUString &rString)
......
......@@ -65,7 +65,7 @@ namespace com { namespace sun { namespace star {
class Window;
//============================================================================
struct InteractionHandlerData
{
/** The UNO service name to use to instanciate the content provider.
......@@ -83,7 +83,7 @@ typedef ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com
typedef ::boost::unordered_map< OUString, OUString, OUStringHash > StringHashMap;
//============================================================================
class UUIInteractionHelper
{
private:
......@@ -190,7 +190,7 @@ private:
com::sun::star::task::XInteractionContinuation > > const &
rContinuations);
//=====================================================================
bool
handleInteractiveIOException(
......
......@@ -26,7 +26,7 @@
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
//============================================================================
#define LF_NO_PATH 0x0001 // hide "path"
#define LF_NO_USERNAME 0x0002 // hide "name"
#define LF_NO_PASSWORD 0x0004 // hide "password"
......@@ -37,10 +37,10 @@
#define LF_NO_ACCOUNT 0x0080 // hide "account"
#define LF_NO_USESYSCREDS 0x0100 // hide "use system cedentials"
//............................................................................
//............................................................................
//============================================================================
class LoginDialog : public ModalDialog
{
FixedText* m_pErrorFT;
......@@ -89,11 +89,11 @@ public:
void ClearAccount();
};
// -----------------------------------------------------------------------
//............................................................................
//............................................................................
#endif // UUI_LOGINDLG_HXX
......
......@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
//=========================================================================
#define LOGINERROR_FLAG_MODIFY_ACCOUNT 1
#define LOGINERROR_FLAG_MODIFY_USER_NAME 2
......
......@@ -28,7 +28,7 @@
#include <vcl/group.hxx>
#include <vcl/fixed.hxx>
//============================================================================
class MasterPasswordCreateDialog : public ModalDialog
{
private:
......
......@@ -27,7 +27,7 @@
#include <vcl/edit.hxx>
#include <vcl/group.hxx>
//============================================================================
class MasterPasswordDialog : public ModalDialog
{
Edit* m_pEDMasterPassword;
......
......@@ -20,7 +20,7 @@
#ifndef UUI_NAMECLASHDLG_HRC
#define UUI_NAMECLASHDLG_HRC
//============================================================================
#define FT_FILE_EXISTS_WARNING 20
#define EDIT_NEW_NAME 21
......
......@@ -25,7 +25,7 @@
#include "vcl/fixed.hxx"
#include "vcl/edit.hxx"
//============================================================================
enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE };
......
......@@ -36,7 +36,7 @@ using namespace com::sun::star;
namespace {
//=========================================================================
bool fillContinuation(
bool bUseSystemCredentials,
const ucb::AuthenticationRequest & rRequest,
......@@ -109,13 +109,13 @@ bool fillContinuation(
namespace uui {
//=========================================================================
PasswordContainerHelper::PasswordContainerHelper(
uno::Reference< uno::XComponentContext > const & xContext ):
m_xPasswordContainer(task::PasswordContainer::create(xContext))
{}
//=========================================================================
bool PasswordContainerHelper::handleAuthenticationRequest(
ucb::AuthenticationRequest const & rRequest,
uno::Reference< ucb::XInteractionSupplyAuthentication > const &
......@@ -221,7 +221,7 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
return false;
}
//=========================================================================
bool PasswordContainerHelper::addRecord(
OUString const & rURL,
OUString const & rUsername,
......@@ -272,9 +272,9 @@ bool PasswordContainerHelper::addRecord(
return true;
}
//=========================================================================
//=========================================================================
//=========================================================================
PasswordContainerInteractionHandler::PasswordContainerInteractionHandler(
const uno::Reference< uno::XComponentContext >& xContext )
......@@ -282,17 +282,17 @@ PasswordContainerInteractionHandler::PasswordContainerInteractionHandler(
{
}
//=========================================================================
// virtual
PasswordContainerInteractionHandler::~PasswordContainerInteractionHandler()
{
}
//=========================================================================
//
// XServiceInfo methods.
//
//=========================================================================
// virtual
OUString SAL_CALL
......@@ -302,7 +302,7 @@ PasswordContainerInteractionHandler::getImplementationName()
return getImplementationName_Static();
}
//=========================================================================
// virtual
sal_Bool SAL_CALL
PasswordContainerInteractionHandler::supportsService(
......@@ -312,7 +312,7 @@ PasswordContainerInteractionHandler::supportsService(
return cppu::supportsService(this, ServiceName);
}
//=========================================================================
// virtual
uno::Sequence< OUString > SAL_CALL
PasswordContainerInteractionHandler::getSupportedServiceNames()
......@@ -321,7 +321,7 @@ PasswordContainerInteractionHandler::getSupportedServiceNames()
return getSupportedServiceNames_Static();
}
//=========================================================================
// static
OUString
PasswordContainerInteractionHandler::getImplementationName_Static()
......@@ -329,7 +329,7 @@ PasswordContainerInteractionHandler::getImplementationName_Static()
return OUString( "com.sun.star.comp.uui.PasswordContainerInteractionHandler" );
}
//=========================================================================
// static
uno::Sequence< OUString >
PasswordContainerInteractionHandler::getSupportedServiceNames_Static()
......@@ -340,11 +340,11 @@ PasswordContainerInteractionHandler::getSupportedServiceNames_Static()
return aSNS;
}
//=========================================================================
//
// XInteractionHandler2 methods.
//
//=========================================================================
// virtual
void SAL_CALL
......@@ -411,11 +411,11 @@ PasswordContainerInteractionHandler::handleInteractionRequest(
return false;
}
//=========================================================================
//
// Service factory implementation.
//
//=========================================================================
static uno::Reference< uno::XInterface > SAL_CALL
PasswordContainerInteractionHandler_CreateInstance(
......@@ -427,7 +427,7 @@ PasswordContainerInteractionHandler_CreateInstance(
return uno::Reference< uno::XInterface >::query( pX );
}
//=========================================================================
// static
uno::Reference< lang::XSingleServiceFactory >
PasswordContainerInteractionHandler::createServiceFactory(
......
......@@ -40,7 +40,7 @@ namespace com {
namespace uui {
// ============================================================================
/** Passwordcontainer UNO service (com.sun.star.task.PasswordContainer) helper.
*/
......@@ -52,7 +52,7 @@ public:
com::sun::star::uno::XComponentContext > const &
xContext );
// ------------------------------------------------------------------------
/** This member function tries to handle an authentication interaction
request by looking up credentials for the given URL in the password
......@@ -129,14 +129,14 @@ public:
bool bPersist )
SAL_THROW( (com::sun::star::uno::RuntimeException) );
// ------------------------------------------------------------------------
private:
com::sun::star::uno::Reference<
com::sun::star::task::XPasswordContainer2 > m_xPasswordContainer;
};
// ============================================================================
class PasswordContainerInteractionHandler :
public cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo,
......
......@@ -120,10 +120,10 @@ PasswordDialog::PasswordDialog(
aOKBtn.SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
//
// move controls down by extra height needed for aFTPassword
// (usually only needed if a URL was provided)
//
long nLabelWidth = aFTPassword.GetSizePixel().Width();
long nLabelHeight = aFTPassword.GetSizePixel().Height();
......
......@@ -28,7 +28,7 @@
#include <vcl/group.hxx>
#include <vcl/fixed.hxx>
//============================================================================
class PasswordDialog : public ModalDialog
{
......
......@@ -46,9 +46,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL uui_component_getFactory(sal_Cha
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
Reference< XSingleServiceFactory > xFactory;
//////////////////////////////////////////////////////////////////////
// UUI Interaction Request String Resolver.
//////////////////////////////////////////////////////////////////////
if ( rtl_str_compare(pImplName,
UUIInteractionRequestStringResolver::m_aImplementationName)
......@@ -63,9 +63,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL uui_component_getFactory(sal_Cha
UUIInteractionRequestStringResolver::getSupportedServiceNames_static());
}
//////////////////////////////////////////////////////////////////////
// UUI Password Container Interaction Handler.
//////////////////////////////////////////////////////////////////////
else if ( uui::PasswordContainerInteractionHandler::getImplementationName_Static().
equalsAscii( pImplName ) )
......@@ -74,7 +74,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL uui_component_getFactory(sal_Cha
uui::PasswordContainerInteractionHandler::createServiceFactory( xSMgr );
}
//////////////////////////////////////////////////////////////////////
if ( xFactory.is() )
{
......
......@@ -26,9 +26,9 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
//=====================================================================
//= Https_WarnDialog
//=====================================================================
class SSLWarnDialog : public MessageDialog
{
private:
......
......@@ -25,9 +25,9 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
//=====================================================================
//= Https_UADialog
//=====================================================================
class UnknownAuthDialog : public MessageDialog
{
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment