LibreOffice Module svx (master)  1
Public Member Functions | Private Attributes | List of all members
svx::DatabaseLocationInputController Class Reference

helper class to control controls needed to input a database location More...

#include <databaselocationinput.hxx>

Public Member Functions

 DatabaseLocationInputController (const css::uno::Reference< css::uno::XComponentContext > &_rContext, URLBox &_rLocationInput, weld::Button &_rBrowseButton, weld::Window &_rDialog)
 
 ~DatabaseLocationInputController ()
 
void setURL (const OUString &_rURL)
 sets the given URL at the input control, after translating it into a system path More...
 
OUString getURL () const
 returns the current database location, in form of a URL (not a system path) More...
 
bool prepareCommit ()
 prepares committing the database location entered in the input field More...
 

Private Attributes

::std::unique_ptr< DatabaseLocationInputController_Implm_pImpl
 

Detailed Description

helper class to control controls needed to input a database location

If you allow, in your dialog, to save a database document, then you usually have an URLBox for inputting the actual location, and a push button to browse for a location.

This helper class controls such two UI elements.

Definition at line 47 of file databaselocationinput.hxx.

Constructor & Destructor Documentation

svx::DatabaseLocationInputController::DatabaseLocationInputController ( const css::uno::Reference< css::uno::XComponentContext > &  _rContext,
URLBox _rLocationInput,
weld::Button _rBrowseButton,
weld::Window _rDialog 
)

Definition at line 224 of file databaselocationinput.cxx.

svx::DatabaseLocationInputController::~DatabaseLocationInputController ( )

Definition at line 230 of file databaselocationinput.cxx.

Member Function Documentation

OUString svx::DatabaseLocationInputController::getURL ( ) const

returns the current database location, in form of a URL (not a system path)

Definition at line 244 of file databaselocationinput.cxx.

References m_pImpl.

bool svx::DatabaseLocationInputController::prepareCommit ( )

prepares committing the database location entered in the input field

Effectively, this method checks whether the file in the location already exists, and if so, it asks the user whether to overwrite it.

If the method is called multiple times, this check only happens when the location changed since the last call.

Definition at line 234 of file databaselocationinput.cxx.

References m_pImpl.

void svx::DatabaseLocationInputController::setURL ( const OUString &  _rURL)

sets the given URL at the input control, after translating it into a system path

Definition at line 239 of file databaselocationinput.cxx.

References m_pImpl.

Member Data Documentation

::std::unique_ptr< DatabaseLocationInputController_Impl > svx::DatabaseLocationInputController::m_pImpl
private

Definition at line 78 of file databaselocationinput.hxx.

Referenced by getURL(), prepareCommit(), and setURL().


The documentation for this class was generated from the following files: