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, SvtURLBox &_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 45 of file databaselocationinput.hxx.

Constructor & Destructor Documentation

◆ DatabaseLocationInputController()

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

Definition at line 219 of file databaselocationinput.cxx.

References m_pImpl.

◆ ~DatabaseLocationInputController()

svx::DatabaseLocationInputController::~DatabaseLocationInputController ( )

Definition at line 225 of file databaselocationinput.cxx.

Member Function Documentation

◆ getURL()

OUString svx::DatabaseLocationInputController::getURL ( ) const

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

Definition at line 239 of file databaselocationinput.cxx.

References m_pImpl.

◆ prepareCommit()

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 229 of file databaselocationinput.cxx.

References m_pImpl.

◆ setURL()

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 234 of file databaselocationinput.cxx.

References m_pImpl.

Member Data Documentation

◆ m_pImpl

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

Definition at line 76 of file databaselocationinput.hxx.

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


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