summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r--dbaccess/source/ui/app/AppController.cxx122
-rw-r--r--dbaccess/source/ui/app/AppController.hxx10
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx37
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx54
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx118
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx3
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx127
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx2
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx8
-rw-r--r--dbaccess/source/ui/app/AppIconControl.hxx2
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx21
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.hxx5
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx20
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx3
-rw-r--r--dbaccess/source/ui/app/AppView.cxx101
-rw-r--r--dbaccess/source/ui/app/AppView.hxx4
-rw-r--r--dbaccess/source/ui/app/IApplicationController.hxx4
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx37
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.hxx8
19 files changed, 236 insertions, 450 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 15d80947b54d..8ab54d24b068 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "AppController.hxx"
#include "dbustrings.hrc"
#include "advancedsettingsdlg.hxx"
@@ -133,10 +132,9 @@ extern "C" void SAL_CALL createRegistryInfo_ODBApplication()
{
static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OApplicationController > aAutoRegistration;
}
-//........................................................................
+
namespace dbaui
{
-//........................................................................
using namespace ::dbtools;
using namespace ::svx;
using namespace ::com::sun::star;
@@ -162,35 +160,32 @@ using ::com::sun::star::sdb::application::NamedDatabaseObject;
namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer;
-//------------------------------------------------------------------------------
OUString SAL_CALL OApplicationController::getImplementationName() throw( RuntimeException )
{
return getImplementationName_Static();
}
-//------------------------------------------------------------------------------
OUString OApplicationController::getImplementationName_Static() throw( RuntimeException )
{
return OUString(SERVICE_SDB_APPLICATIONCONTROLLER);
}
-//------------------------------------------------------------------------------
+
Sequence< OUString> OApplicationController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< OUString> aSupported(1);
aSupported.getArray()[0] = OUString("com.sun.star.sdb.application.DefaultViewController");
return aSupported;
}
-//-------------------------------------------------------------------------
+
Sequence< OUString> SAL_CALL OApplicationController::getSupportedServiceNames() throw(RuntimeException)
{
return getSupportedServiceNames_Static();
}
-// -------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OApplicationController::Create(const Reference<XMultiServiceFactory >& _rxFactory)
{
return *(new OApplicationController( comphelper::getComponentContext(_rxFactory)));
}
-// -----------------------------------------------------------------------------
struct XContainerFunctor : public ::std::unary_function< OApplicationController::TContainerVector::value_type , bool>
{
@@ -206,9 +201,7 @@ struct XContainerFunctor : public ::std::unary_function< OApplicationController:
}
};
-//====================================================================
-//= OApplicationController
-//====================================================================
+// OApplicationController
class SelectionNotifier : public ::boost::noncopyable
{
private:
@@ -291,11 +284,8 @@ private:
SelectionNotifier& m_rNotifier;
};
-//====================================================================
-//= OApplicationController
-//====================================================================
+// OApplicationController
DBG_NAME(OApplicationController)
-//--------------------------------------------------------------------
OApplicationController::OApplicationController(const Reference< XComponentContext >& _rxORB)
:OApplicationController_CBASE( _rxORB )
,m_aContextMenuInterceptors( getMutex() )
@@ -313,7 +303,7 @@ OApplicationController::OApplicationController(const Reference< XComponentContex
{
DBG_CTOR(OApplicationController,NULL);
}
-//------------------------------------------------------------------------------
+
OApplicationController::~OApplicationController()
{
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
@@ -330,10 +320,9 @@ OApplicationController::~OApplicationController()
DBG_DTOR(OApplicationController,NULL);
}
-//--------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2(OApplicationController,OApplicationController_CBASE,OApplicationController_Base)
IMPLEMENT_FORWARD_XINTERFACE2(OApplicationController,OApplicationController_CBASE,OApplicationController_Base)
-// -----------------------------------------------------------------------------
void OApplicationController::disconnect()
{
if ( m_xDataSourceConnection.is() )
@@ -357,7 +346,6 @@ void OApplicationController::disconnect()
InvalidateAll();
}
-//--------------------------------------------------------------------
void SAL_CALL OApplicationController::disposing()
{
::std::for_each(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),XContainerFunctor(this));
@@ -437,7 +425,6 @@ void SAL_CALL OApplicationController::disposing()
OApplicationController_CBASE::disposing(); // here the m_refCount must be equal 5
}
-//--------------------------------------------------------------------
sal_Bool OApplicationController::Construct(Window* _pParent)
{
setView( * new OApplicationView( _pParent, getORB(), *this, m_ePreviewMode ) );
@@ -481,7 +468,6 @@ sal_Bool OApplicationController::Construct(Window* _pParent)
return sal_True;
}
-//--------------------------------------------------------------------
void SAL_CALL OApplicationController::disposing(const EventObject& _rSource) throw( RuntimeException )
{
::osl::MutexGuard aGuard( getMutex() );
@@ -519,7 +505,7 @@ void SAL_CALL OApplicationController::disposing(const EventObject& _rSource) thr
OApplicationController_CBASE::disposing( _rSource );
}
}
-//--------------------------------------------------------------------
+
sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( RuntimeException )
{
// notify the OnPrepareViewClosing event (before locking any mutex)
@@ -577,7 +563,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt
return bCanSuspend;
}
-// -----------------------------------------------------------------------------
+
FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
@@ -968,7 +954,6 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
return aReturn;
}
-// -----------------------------------------------------------------------------
namespace
{
bool lcl_handleException_nothrow( const Reference< XModel >& _rxDocument, const Any& _rException )
@@ -999,7 +984,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs)
{
SolarMutexGuard aSolarGuard;
@@ -1425,7 +1409,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
}
InvalidateFeature(_nId);
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::describeSupportedFeatures()
{
OApplicationController_CBASE::describeSupportedFeatures();
@@ -1532,13 +1516,12 @@ void OApplicationController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:DBStatusUserName", SID_DB_APP_STATUS_USERNAME, CommandGroup::INTERNAL);
implDescribeSupportedFeature( ".uno:DBStatusHostName", SID_DB_APP_STATUS_HOSTNAME, CommandGroup::INTERNAL);
}
-// -----------------------------------------------------------------------------
+
OApplicationView* OApplicationController::getContainer() const
{
return static_cast< OApplicationView* >( getView() );
}
-// -----------------------------------------------------------------------------
// ::com::sun::star::container::XContainerListener
void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
@@ -1575,7 +1558,7 @@ void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rE
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -1609,7 +1592,7 @@ void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEv
getContainer()->elementRemoved(eType,sName);
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -1658,6 +1641,7 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE
}
}
}
+
namespace
{
OUString lcl_getToolBarResource(ElementType _eType)
@@ -1686,7 +1670,7 @@ namespace
return sToolbar;
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::onContainerSelect(ElementType _eType)
{
OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
@@ -1757,7 +1741,7 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType)
return sal_True;
}
-// -----------------------------------------------------------------------------
+
bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree )
{
if ( getContainer() && getContainer()->isLeaf( _rTree.GetHdlEntry() ) )
@@ -1778,7 +1762,7 @@ bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree )
}
return false; // not handled
}
-// -----------------------------------------------------------------------------
+
bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTableOrViewName ) const
{
OSL_PRECOND( m_xDataSourceConnection.is(), "OApplicationController::impl_isAlterableView_nothrow: no connection!" );
@@ -1804,14 +1788,12 @@ bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTab
return bIsAlterableView;
}
-// -----------------------------------------------------------------------------
Reference< XComponent > OApplicationController::openElement(const OUString& _sName, ElementType _eType,
ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand )
{
return openElementWithArguments( _sName, _eType, _eOpenMode, _nInstigatorCommand, ::comphelper::NamedValueCollection() );
}
-// -----------------------------------------------------------------------------
Reference< XComponent > OApplicationController::openElementWithArguments( const OUString& _sName, ElementType _eType,
ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection& _rAdditionalArguments )
{
@@ -1923,7 +1905,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
}
return xRet;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType )
{
ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType );
@@ -1931,7 +1913,7 @@ IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType )
getContainer()->selectContainer(eType);
return 0L;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OApplicationController, OnCreateWithPilot, void*, _pType )
{
ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType );
@@ -1939,7 +1921,6 @@ IMPL_LINK( OApplicationController, OnCreateWithPilot, void*, _pType )
return 0L;
}
-// -----------------------------------------------------------------------------
void OApplicationController::newElementWithPilot( ElementType _eType )
{
utl::CloseVeto aKeepDoc( getFrame() );
@@ -1989,7 +1970,6 @@ void OApplicationController::newElementWithPilot( ElementType _eType )
// XDatabaseDocumentUI::loadComponent method.
}
-// -----------------------------------------------------------------------------
Reference< XComponent > OApplicationController::newElement( ElementType _eType, const ::comphelper::NamedValueCollection& i_rAdditionalArguments,
Reference< XComponent >& o_rDocumentDefinition )
{
@@ -2048,7 +2028,6 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType,
return xComponent;
}
-// -----------------------------------------------------------------------------
void OApplicationController::addContainerListener(const Reference<XNameAccess>& _xCollection)
{
try
@@ -2070,7 +2049,7 @@ void OApplicationController::addContainerListener(const Reference<XNameAccess>&
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::renameEntry()
{
SolarMutexGuard aSolarGuard;
@@ -2224,7 +2203,6 @@ void OApplicationController::renameEntry()
}
}
-// -----------------------------------------------------------------------------
void OApplicationController::onSelectionChanged()
{
InvalidateAll();
@@ -2245,7 +2223,7 @@ void OApplicationController::onSelectionChanged()
}
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::showPreviewFor(const ElementType _eType,const OUString& _sName)
{
if ( m_ePreviewMode == E_PREVIEWNONE )
@@ -2292,13 +2270,12 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const OUStr
}
}
-//------------------------------------------------------------------------------
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged)
{
OnInvalidateClipboard();
return 0L;
}
-//------------------------------------------------------------------------------
+
void OApplicationController::OnInvalidateClipboard()
{
InvalidateFeature(ID_BROWSER_CUT);
@@ -2306,21 +2283,21 @@ void OApplicationController::OnInvalidateClipboard()
InvalidateFeature(ID_BROWSER_PASTE);
InvalidateFeature(SID_DB_APP_PASTE_SPECIAL);
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::onCutEntry()
{
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::onCopyEntry()
{
Execute(ID_BROWSER_COPY,Sequence<PropertyValue>());
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::onPasteEntry()
{
Execute(ID_BROWSER_PASTE,Sequence<PropertyValue>());
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::onDeleteEntry()
{
ElementType eType = getContainer()->getElementType();
@@ -2346,85 +2323,71 @@ void OApplicationController::onDeleteEntry()
executeChecked(nId,Sequence<PropertyValue>());
}
-// -----------------------------------------------------------------------------
void OApplicationController::executeUnChecked(const URL& _rCommand, const Sequence< PropertyValue>& aArgs)
{
OApplicationController_CBASE::executeUnChecked( _rCommand, aArgs );
}
-// -----------------------------------------------------------------------------
void OApplicationController::executeChecked(const URL& _rCommand, const Sequence< PropertyValue>& aArgs)
{
OApplicationController_CBASE::executeChecked( _rCommand, aArgs );
}
-// -----------------------------------------------------------------------------
void OApplicationController::executeUnChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue>& aArgs)
{
OApplicationController_CBASE::executeUnChecked( _nCommandId, aArgs );
}
-// -----------------------------------------------------------------------------
void OApplicationController::executeChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue>& aArgs)
{
OApplicationController_CBASE::executeChecked( _nCommandId, aArgs );
}
-// -----------------------------------------------------------------------------
sal_Bool OApplicationController::isCommandEnabled(sal_uInt16 _nCommandId) const
{
return OApplicationController_CBASE::isCommandEnabled( _nCommandId );
}
-// -----------------------------------------------------------------------------
sal_Bool OApplicationController::isCommandEnabled( const OUString& _rCompleteCommandURL ) const
{
return OApplicationController_CBASE::isCommandEnabled( _rCompleteCommandURL );
}
-// -----------------------------------------------------------------------------
sal_uInt16 OApplicationController::registerCommandURL( const OUString& _rCompleteCommandURL )
{
return OApplicationController_CBASE::registerCommandURL( _rCompleteCommandURL );
}
-// -----------------------------------------------------------------------------
void OApplicationController::notifyHiContrastChanged()
{
OApplicationController_CBASE::notifyHiContrastChanged();
}
-// -----------------------------------------------------------------------------
Reference< XController > OApplicationController::getXController() throw( RuntimeException )
{
return OApplicationController_CBASE::getXController();
}
-// -----------------------------------------------------------------------------
bool OApplicationController::interceptUserInput( const NotifyEvent& _rEvent )
{
return OApplicationController_CBASE::interceptUserInput( _rEvent );
}
-// -----------------------------------------------------------------------------
PopupMenu* OApplicationController::getContextMenu( Control& /*_rControl*/ ) const
{
return new PopupMenu( ModuleRes( RID_MENU_APP_EDIT ) );
}
-// -----------------------------------------------------------------------------
IController& OApplicationController::getCommandController()
{
return *static_cast< IApplicationController* >( this );
}
-// -----------------------------------------------------------------------------
::cppu::OInterfaceContainerHelper* OApplicationController::getContextMenuInterceptors()
{
return &m_aContextMenuInterceptors;
}
-// -----------------------------------------------------------------------------
Any OApplicationController::getCurrentSelection( Control& _rControl ) const
{
Sequence< NamedDatabaseObject > aSelection;
@@ -2432,13 +2395,11 @@ Any OApplicationController::getCurrentSelection( Control& _rControl ) const
return makeAny( aSelection );
}
-// -----------------------------------------------------------------------------
sal_Bool OApplicationController::requestQuickHelp( const SvTreeListEntry* /*_pEntry*/, OUString& /*_rText*/ ) const
{
return sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
{
TransferableHelper* pTransfer = NULL;
@@ -2463,7 +2424,7 @@ sal_Bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point
return NULL != pTransfer;
}
-// -----------------------------------------------------------------------------
+
sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors )
{
sal_Int8 nActionAskedFor = _rEvt.mnAction;
@@ -2508,7 +2469,7 @@ sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const
return DND_ACTION_NONE;
}
-// -----------------------------------------------------------------------------
+
sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
{
OApplicationView* pView = getContainer();
@@ -2522,12 +2483,10 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
// a TransferableDataHelper for accessing the dropped data
TransferableDataHelper aDroppedData(_rEvt.maDropEvent.Transferable);
-
// reset the data of the previous async drop (if any)
if ( m_nAsyncDrop )
Application::RemoveUserEvent(m_nAsyncDrop);
-
m_nAsyncDrop = 0;
m_aAsyncDrop.aDroppedData.clear();
m_aAsyncDrop.nType = pView->getElementType();
@@ -2536,7 +2495,6 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
m_aAsyncDrop.bHtml = sal_False;
m_aAsyncDrop.aUrl = OUString();
-
// loop through the available formats and see what we can do ...
// first we have to check if it is our own format, if not we have to copy the stream :-(
if ( ODataAccessObjectTransferable::canExtractObjectDescriptor(aDroppedData.GetDataFlavorExVector()) )
@@ -2611,13 +2569,12 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
return DND_ACTION_NONE;
}
-// -----------------------------------------------------------------------------
+
Reference< XModel > SAL_CALL OApplicationController::getModel(void) throw( RuntimeException )
{
return m_xModel;
}
-// -----------------------------------------------------------------------------
void OApplicationController::onAttachedFrame()
{
sal_Int32 nConnectedControllers( 0 );
@@ -2644,7 +2601,6 @@ void OApplicationController::onAttachedFrame()
OnFirstControllerConnected();
}
-// -----------------------------------------------------------------------------
void OApplicationController::OnFirstControllerConnected()
{
if ( !m_xModel.is() )
@@ -2693,7 +2649,6 @@ void OApplicationController::OnFirstControllerConnected()
return;
}
-// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::attachFrame( const Reference< XFrame > & i_rxFrame ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( getMutex() );
@@ -2703,7 +2658,6 @@ void SAL_CALL OApplicationController::attachFrame( const Reference< XFrame > & i
onAttachedFrame();
}
-// -----------------------------------------------------------------------------
sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel > & _rxModel) throw( RuntimeException )
{
::osl::MutexGuard aGuard( getMutex() );
@@ -2794,7 +2748,7 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel >
return sal_True;
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::containerFound( const Reference< XContainer >& _xContainer)
{
try
@@ -2810,13 +2764,12 @@ void OApplicationController::containerFound( const Reference< XContainer >& _xCo
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
OUString OApplicationController::getCurrentlySelectedName(sal_Int32& _rnCommandType) const
{
_rnCommandType = ( (getContainer()->getElementType() == E_QUERY)
? CommandType::QUERY : ( (getContainer()->getElementType() == E_TABLE) ? CommandType::TABLE : -1 ));
-
OUString sName;
if ( _rnCommandType != -1 )
{
@@ -2833,19 +2786,16 @@ OUString OApplicationController::getCurrentlySelectedName(sal_Int32& _rnCommandT
return sName;
}
-// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::addSelectionChangeListener( const Reference< view::XSelectionChangeListener >& _Listener ) throw (RuntimeException)
{
m_pSelectionNotifier->addListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::removeSelectionChangeListener( const Reference< view::XSelectionChangeListener >& _Listener ) throw (RuntimeException)
{
m_pSelectionNotifier->removeListener( _Listener );
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw (IllegalArgumentException, RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -2857,7 +2807,6 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
return sal_True;
}
- // --------------------------------------------------------------
// BEGIN compatibility
Sequence< NamedValue > aCurrentSelection;
if ( (_aSelection >>= aCurrentSelection) && aCurrentSelection.getLength() )
@@ -2885,7 +2834,6 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
return sal_True;
}
// END compatibility
- // --------------------------------------------------------------
Sequence< NamedDatabaseObject > aSelectedObjects;
if ( !( _aSelection >>= aSelectedObjects ) )
@@ -2970,7 +2918,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
return sal_True;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -3000,7 +2948,7 @@ Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException)
}
return makeAny( aCurrentSelection );
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::impl_migrateScripts_nothrow()
{
try
@@ -3014,8 +2962,6 @@ void OApplicationController::impl_migrateScripts_nothrow()
}
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index e9e282040599..f56f039f4781 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -62,16 +62,12 @@ namespace com { namespace sun { namespace star {
}
}}}
-//........................................................................
namespace dbaui
{
-//........................................................................
class SubComponentManager;
- //====================================================================
- //= OApplicationController
- //====================================================================
+ // OApplicationController
class OApplicationController;
class OApplicationView;
class OLinkedDocumentsAccess;
@@ -137,7 +133,6 @@ namespace dbaui
OApplicationView* getContainer() const;
-
/** returns the database name
@return
the database name
@@ -400,7 +395,6 @@ namespace dbaui
void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< OUString >& i_rObjectName );
protected:
- // ----------------------------------------------------------------
// initalizing members
/** forces usage of a connection which we do not own
<p>To be used from within XInitialization::initialize only.</p>
@@ -564,9 +558,7 @@ namespace dbaui
virtual void SAL_CALL disposing();
};
-//........................................................................
} // namespace dbaui
-//........................................................................
#endif // DBAUI_APPCONTROLLER_HXX
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 8ac9711a2cfe..195c52a3424f 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "AppController.hxx"
#include <comphelper/sequence.hxx>
#include <comphelper/property.hxx>
@@ -82,10 +81,8 @@
#include <osl/mutex.hxx>
#include "subcomponentmanager.hxx"
-//........................................................................
namespace dbaui
{
-//........................................................................
using namespace ::dbtools;
using namespace ::svx;
using namespace ::svtools;
@@ -101,7 +98,6 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::util;
-// -----------------------------------------------------------------------------
void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList)
{
SharedConnection xConnection( ensureConnection() );
@@ -185,7 +181,7 @@ void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList
}
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::deleteObjects( ElementType _eType, const ::std::vector< OUString>& _rList, bool _bConfirm )
{
Reference< XNameContainer > xNames( getElements( _eType ), UNO_QUERY );
@@ -296,7 +292,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
}
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::deleteEntries()
{
SolarMutexGuard aSolarGuard;
@@ -326,7 +322,7 @@ void OApplicationController::deleteEntries()
}
}
}
-// -----------------------------------------------------------------------------
+
// DO NOT CALL with getMutex() held!!
const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
@@ -414,13 +410,13 @@ const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQL
return m_xDataSourceConnection;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::isDataSourceReadOnly() const
{
Reference<XStorable> xStore(m_xModel,UNO_QUERY);
return !xStore.is() || xStore->isReadonly();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::isConnectionReadOnly() const
{
sal_Bool bIsConnectionReadOnly = sal_True;
@@ -438,7 +434,7 @@ sal_Bool OApplicationController::isConnectionReadOnly() const
// TODO check configuration
return bIsConnectionReadOnly;
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > OApplicationController::getElements( ElementType _eType )
{
Reference< XNameAccess > xElements;
@@ -487,7 +483,7 @@ Reference< XNameAccess > OApplicationController::getElements( ElementType _eType
return xElements;
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::getSelectionElementNames(::std::vector< OUString>& _rNames) const
{
SolarMutexGuard aSolarGuard;
@@ -498,7 +494,6 @@ void OApplicationController::getSelectionElementNames(::std::vector< OUString>&
getContainer()->getSelectionElementNames( _rNames );
}
-// -----------------------------------------------------------------------------
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< OLinkedDocumentsAccess > OApplicationController::getDocumentsAccess( ElementType _eType )
{
@@ -519,9 +514,9 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
) );
return pDocuments;
}
+
SAL_WNODEPRECATED_DECLARATIONS_POP
-// -----------------------------------------------------------------------------
TransferableHelper* OApplicationController::copyObject()
{
try
@@ -587,7 +582,7 @@ TransferableHelper* OApplicationController::copyObject()
}
return NULL;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAccessDescriptor& _rPasteData,const OUString& _sParentFolder ,sal_Bool _bMove)
{
try
@@ -675,7 +670,6 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
}
}
-
Reference< XNameContainer > xDestQueries(getQueryDefintions(), UNO_QUERY);
Reference< XSingleServiceFactory > xQueryFactory(xDestQueries, UNO_QUERY);
if (!xQueryFactory.is())
@@ -772,7 +766,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
}
return sal_False;
}
-// -----------------------------------------------------------------------------
+
Reference<XNameContainer> OApplicationController::getQueryDefintions() const
{
Reference<XQueryDefinitionsSupplier> xSet(m_xDataSource,UNO_QUERY);
@@ -783,7 +777,7 @@ Reference<XNameContainer> OApplicationController::getQueryDefintions() const
}
return xNames;
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::getSupportedFormats(ElementType _eType,::std::vector<SotFormatStringId>& _rFormatIds) const
{
switch( _eType )
@@ -800,19 +794,18 @@ void OApplicationController::getSupportedFormats(ElementType _eType,::std::vecto
break;
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::isTableFormat() const
{
return m_aTableCopyHelper.isTableFormat(getViewClipboard());
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ )
{
m_nAsyncDrop = 0;
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
-
if ( m_aAsyncDrop.nType == E_TABLE )
{
SharedConnection xConnection( ensureConnection() );
@@ -842,9 +835,7 @@ IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ )
return 0L;
}
-//........................................................................
-} // namespace dbaui
-//........................................................................
+} // namespace dbaui
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index ce9ad063044f..202071992a60 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "AppController.hxx"
#include "AppDetailView.hxx"
#include "AppView.hxx"
@@ -67,7 +66,6 @@
#include <vcl/waitobj.hxx>
#include <osl/mutex.hxx>
-//........................................................................
namespace dbaui
{
using namespace ::dbtools;
@@ -93,9 +91,6 @@ using ::com::sun::star::ui::XContextMenuInterceptor;
namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition;
-//........................................................................
-// -----------------------------------------------------------------------------
-
class CloseChecker : public ::cppu::WeakImplHelper1< com::sun::star::lang::XEventListener >
{
bool m_bClosed;
@@ -122,7 +117,7 @@ public:
}
};
-// -----------------------------------------------------------------------------
+
void OApplicationController::convertToView(const OUString& _sName)
{
try
@@ -165,7 +160,7 @@ void OApplicationController::convertToView(const OUString& _sName)
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::pasteFormat(sal_uInt32 _nFormatId)
{
if ( _nFormatId )
@@ -188,13 +183,12 @@ void OApplicationController::pasteFormat(sal_uInt32 _nFormatId)
}
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::openDataSourceAdminDialog()
{
openDialog( OUString( "com.sun.star.sdb.DatasourceAdministrationDialog" ) );
}
-// -----------------------------------------------------------------------------
void OApplicationController::openDialog( const OUString& _sServiceName )
{
try
@@ -254,13 +248,12 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::openTableFilterDialog()
{
openDialog( OUString( "com.sun.star.sdb.TableFilterDialog" ) );
}
-// -----------------------------------------------------------------------------
void OApplicationController::refreshTables()
{
if ( getContainer() && getContainer()->getDetailView() )
@@ -282,12 +275,12 @@ void OApplicationController::refreshTables()
getContainer()->getDetailView()->createTablesPage( ensureConnection() );
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::openDirectSQLDialog()
{
openDialog( SERVICE_SDB_DIRECTSQLDIALOG );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -336,7 +329,6 @@ void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent&
modified(aEvt);
}
-// -----------------------------------------------------------------------------
Reference< XDataSource > SAL_CALL OApplicationController::getDataSource() throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
@@ -344,7 +336,6 @@ Reference< XDataSource > SAL_CALL OApplicationController::getDataSource() throw
return xDataSource;
}
-// -----------------------------------------------------------------------------
Reference< XWindow > SAL_CALL OApplicationController::getApplicationMainWindow() throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
@@ -353,28 +344,24 @@ Reference< XWindow > SAL_CALL OApplicationController::getApplicationMainWindow()
return xWindow;
}
-// -----------------------------------------------------------------------------
Sequence< Reference< XComponent > > SAL_CALL OApplicationController::getSubComponents() throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
return m_pSubComponentManager->getSubComponents();
}
-// -----------------------------------------------------------------------------
Reference< XConnection > SAL_CALL OApplicationController::getActiveConnection() throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
return m_xDataSourceConnection.getTyped();
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL OApplicationController::isConnected( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
return m_xDataSourceConnection.is();
}
-// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::connect( ) throw (SQLException, RuntimeException)
{
SQLExceptionInfo aError;
@@ -390,7 +377,6 @@ void SAL_CALL OApplicationController::connect( ) throw (SQLException, RuntimeEx
}
}
-// -----------------------------------------------------------------------------
beans::Pair< ::sal_Int32, OUString > SAL_CALL OApplicationController::identifySubComponent( const Reference< XComponent >& i_rSubComponent ) throw (IllegalArgumentException, RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
@@ -409,7 +395,6 @@ beans::Pair< ::sal_Int32, OUString > SAL_CALL OApplicationController::identifySu
return beans::Pair< ::sal_Int32, OUString >( nType, sName );
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL OApplicationController::closeSubComponents( ) throw (RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -417,8 +402,6 @@ beans::Pair< ::sal_Int32, OUString > SAL_CALL OApplicationController::identifySu
return m_pSubComponentManager->closeSubComponents();
}
-
-// -----------------------------------------------------------------------------
namespace
{
ElementType lcl_objectType2ElementType( const sal_Int32 _nObjectType )
@@ -438,7 +421,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< OUString >& i_rObjectName )
{
// ensure we're connected
@@ -486,14 +468,12 @@ void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int
throw NoSuchElementException( *i_rObjectName, *this );
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL OApplicationController::loadComponent( ::sal_Int32 _ObjectType,
const OUString& _ObjectName, ::sal_Bool _ForEditing ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException)
{
return loadComponentWithArguments( _ObjectType, _ObjectName, _ForEditing, Sequence< PropertyValue >() );
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArguments( ::sal_Int32 _ObjectType,
const OUString& _ObjectName, ::sal_Bool _ForEditing, const Sequence< PropertyValue >& _Arguments ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException)
{
@@ -513,13 +493,11 @@ Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArgume
return xComponent;
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL OApplicationController::createComponent( ::sal_Int32 i_nObjectType, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException)
{
return createComponentWithArguments( i_nObjectType, Sequence< PropertyValue >(), o_DocumentDefinition );
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArguments( ::sal_Int32 i_nObjectType, const Sequence< PropertyValue >& i_rArguments, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -536,20 +514,17 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArgu
return xComponent;
}
-// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::registerContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException)
{
if ( _Interceptor.is() )
m_aContextMenuInterceptors.addInterface( _Interceptor );
}
-// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::releaseContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException)
{
m_aContextMenuInterceptors.removeInterface( _Interceptor );
}
-// -----------------------------------------------------------------------------
void OApplicationController::previewChanged( sal_Int32 _nMode )
{
SolarMutexGuard aSolarGuard;
@@ -576,7 +551,7 @@ void OApplicationController::previewChanged( sal_Int32 _nMode )
InvalidateFeature(SID_DB_APP_VIEW_DOCINFO_PREVIEW);
InvalidateFeature(SID_DB_APP_VIEW_DOC_PREVIEW);
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::askToReconnect()
{
if ( m_bNeedToReconnect )
@@ -608,7 +583,6 @@ void OApplicationController::askToReconnect()
}
}
-// -----------------------------------------------------------------------------
OUString OApplicationController::getDatabaseName() const
{
OUString sDatabaseName;
@@ -626,14 +600,12 @@ OUString OApplicationController::getDatabaseName() const
return sDatabaseName;
}
-// -----------------------------------------------------------------------------
OUString OApplicationController::getStrippedDatabaseName() const
{
OUString sDatabaseName;
return ::dbaui::getStrippedDatabaseName( m_xDataSource, sDatabaseName );
}
-// -----------------------------------------------------------------------------
void OApplicationController::onDocumentOpened( const OUString& _rName, const sal_Int32 _nType,
const ElementOpenMode _eMode, const Reference< XComponent >& _xDocument, const Reference< XComponent >& _rxDefinition )
{
@@ -657,7 +629,7 @@ void OApplicationController::onDocumentOpened( const OUString& _rName, const sal
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::insertHierachyElement(ElementType _eType,const OUString& _sParentFolder,sal_Bool _bCollection,const Reference<XContent>& _xContent,sal_Bool _bMove)
{
Reference<XHierarchicalNameContainer> xNames(getElements(_eType), UNO_QUERY);
@@ -670,7 +642,7 @@ sal_Bool OApplicationController::insertHierachyElement(ElementType _eType,const
,_xContent
,_bMove);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationController::isRenameDeleteAllowed(ElementType _eType,sal_Bool _bDelete) const
{
ElementType eType = getContainer()->getElementType();
@@ -710,7 +682,7 @@ sal_Bool OApplicationController::isRenameDeleteAllowed(ElementType _eType,sal_Bo
}
return bEnabled;
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager)
{
@@ -743,7 +715,7 @@ void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::fra
InvalidateAll();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationController::doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMode)
{
::std::vector< OUString> aList;
@@ -798,7 +770,7 @@ void OApplicationController::doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMod
aSendMail.Send( getFrame() );
}
}
-// -----------------------------------------------------------------------------
+
ElementType OApplicationController::getElementType(const Reference< XContainer >& _xContainer) const
{
ElementType eRet = E_NONE;
@@ -817,8 +789,6 @@ ElementType OApplicationController::getElementType(const Reference< XContainer >
return eRet;
}
-//........................................................................
} // namespace dbaui
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 79a0afff37ee..148d469d68ca 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -66,7 +66,6 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
-
using namespace ::dbaui;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::uno;
@@ -122,9 +121,7 @@ namespace
OUString sErase = _rName.getToken(0,'/',nIndex); // we don't want to have the "private:forms" part
return (nIndex != -1 ? lcl_findEntry_impl(rTree,_rName.copy(sErase.getLength() + 1),_pFirst) : NULL);
}
- //==================================================================
// class OPreviewWindow
- //==================================================================
class OTablePreviewWindow : public Window
{
DECL_LINK(OnDisableInput, void*);
@@ -135,12 +132,10 @@ namespace
OTablePreviewWindow( Window* pParent, WinBits nStyle = 0 );
virtual long Notify( NotifyEvent& rNEvt );
};
- // -----------------------------------------------------------------------------
OTablePreviewWindow::OTablePreviewWindow(Window* pParent, WinBits nStyle) : Window( pParent, nStyle)
{
ImplInitSettings( sal_True, sal_True, sal_True );
}
- // -----------------------------------------------------------------------------
long OTablePreviewWindow::Notify( NotifyEvent& rNEvt )
{
long nRet = Window::Notify( rNEvt );
@@ -148,13 +143,11 @@ namespace
PostUserEvent( LINK( this, OTablePreviewWindow, OnDisableInput) );
return nRet;
}
- // -----------------------------------------------------------------------------
IMPL_LINK_NOARG(OTablePreviewWindow, OnDisableInput)
{
EnableInput(sal_False);
return 0L;
}
- // -----------------------------------------------------------------------------
void OTablePreviewWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -166,7 +159,6 @@ namespace
Invalidate();
}
}
- // -----------------------------------------------------------------------------
void OTablePreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -189,10 +181,9 @@ namespace
}
}
-//==================================================================
+
// class OAppDetailPageHelper
DBG_NAME(OAppDetailPageHelper)
-//==================================================================
OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _rBorderWin,PreviewMode _ePreviewMode) : Window(_pParent,WB_DIALOGCONTROL)
,m_rBorderWin(_rBorderWin)
,m_aFL(this,WB_VERT)
@@ -232,7 +223,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _r
m_pLists[i] = NULL;
ImplInitSettings();
}
-// -----------------------------------------------------------------------------
+
OAppDetailPageHelper::~OAppDetailPageHelper()
{
try
@@ -263,7 +254,7 @@ OAppDetailPageHelper::~OAppDetailPageHelper()
DBG_DTOR(OAppDetailPageHelper,NULL);
}
-// -----------------------------------------------------------------------------
+
int OAppDetailPageHelper::getVisibleControlIndex() const
{
int i = 0;
@@ -274,7 +265,7 @@ int OAppDetailPageHelper::getVisibleControlIndex() const
}
return i;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::selectAll()
{
int nPos = getVisibleControlIndex();
@@ -283,7 +274,7 @@ void OAppDetailPageHelper::selectAll()
m_pLists[nPos]->SelectAll(sal_True);
}
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::sort(int _nPos,SvSortMode _eSortMode )
{
OSL_ENSURE(m_pLists[_nPos],"List can not be NULL! ->GPF");
@@ -293,7 +284,7 @@ void OAppDetailPageHelper::sort(int _nPos,SvSortMode _eSortMode )
if ( eOldSortMode != _eSortMode )
pModel->Resort();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OAppDetailPageHelper::isSortUp() const
{
SvSortMode eSortMode = SortNone;
@@ -305,21 +296,21 @@ sal_Bool OAppDetailPageHelper::isSortUp() const
}
return eSortMode == SortAscending;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::sortDown()
{
int nPos = getVisibleControlIndex();
if ( nPos < E_ELEMENT_TYPE_COUNT )
sort(nPos,SortDescending);
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::sortUp()
{
int nPos = getVisibleControlIndex();
if ( nPos < E_ELEMENT_TYPE_COUNT )
sort(nPos,SortAscending);
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::getSelectionElementNames( ::std::vector< OUString>& _rNames ) const
{
int nPos = getVisibleControlIndex();
@@ -353,7 +344,6 @@ void OAppDetailPageHelper::getSelectionElementNames( ::std::vector< OUString>& _
}
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
enum ElementType eType = E_TABLE;
@@ -368,7 +358,6 @@ void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _r
OSL_FAIL( "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" );
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
OSL_ENSURE( _eType < E_ELEMENT_TYPE_COUNT, "OAppDetailPageHelper::describeCurrentSelectionForType: invalid type!" );
@@ -437,7 +426,6 @@ void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _e
::std::copy( aSelected.begin(), aSelected.end(), _out_rSelectedObjects.getArray() );
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::selectElements(const Sequence< OUString>& _aNames)
{
int nPos = getVisibleControlIndex();
@@ -455,7 +443,7 @@ void OAppDetailPageHelper::selectElements(const Sequence< OUString>& _aNames)
}
}
}
-// -----------------------------------------------------------------------------
+
OUString OAppDetailPageHelper::getQualifiedName( SvTreeListEntry* _pEntry ) const
{
int nPos = getVisibleControlIndex();
@@ -492,13 +480,13 @@ OUString OAppDetailPageHelper::getQualifiedName( SvTreeListEntry* _pEntry ) cons
return sComposedName;
}
-// -----------------------------------------------------------------------------
+
ElementType OAppDetailPageHelper::getElementType() const
{
int nPos = getVisibleControlIndex();
return static_cast<ElementType>(nPos);
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OAppDetailPageHelper::getSelectionCount()
{
sal_Int32 nCount = 0;
@@ -515,7 +503,7 @@ sal_Int32 OAppDetailPageHelper::getSelectionCount()
}
return nCount;
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OAppDetailPageHelper::getElementCount()
{
sal_Int32 nCount = 0;
@@ -526,34 +514,34 @@ sal_Int32 OAppDetailPageHelper::getElementCount()
}
return nCount;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OAppDetailPageHelper::isCutAllowed()
{
return sal_False;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OAppDetailPageHelper::isCopyAllowed()
{
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OAppDetailPageHelper::isPasteAllowed()
{
return sal_True;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::copy()
{
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::cut()
{
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::paste()
{
}
-// -----------------------------------------------------------------------------
+
bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry) const
{
if ( !_pEntry )
@@ -570,7 +558,6 @@ bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry) const
return true;
}
-// -----------------------------------------------------------------------------
sal_Bool OAppDetailPageHelper::isALeafSelected() const
{
int nPos = getVisibleControlIndex();
@@ -587,7 +574,7 @@ sal_Bool OAppDetailPageHelper::isALeafSelected() const
}
return bLeafSelected;
}
-// -----------------------------------------------------------------------------
+
SvTreeListEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const
{
SvTreeListEntry* pReturn = NULL;
@@ -596,7 +583,7 @@ SvTreeListEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const
pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,sal_True );
return pReturn;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xConnection)
{
OSL_ENSURE(_xConnection.is(),"Connection is NULL! -> GPF");
@@ -630,7 +617,6 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
setDetailPage(m_pLists[E_TABLE]);
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId)
{
ImageProvider aImageProvider;
@@ -649,7 +635,6 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm
_rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType );
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameAccess >& _xContainer)
{
OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed.");
@@ -693,7 +678,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
setDetailPage(m_pLists[_eType]);
}
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::setDetailPage(Window* _pWindow)
{
OSL_ENSURE(_pWindow,"OAppDetailPageHelper::setDetailPage: Window is NULL!");
@@ -717,7 +702,6 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow)
Resize();
}
-// -----------------------------------------------------------------------------
namespace
{
namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
@@ -732,7 +716,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType,
const sal_uInt16 _nImageId, SvTreeListEntry* _pParent )
{
@@ -772,7 +755,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
}
}
}
-// -----------------------------------------------------------------------------
+
DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const OString& _sHelpId, const Image& _rImage)
{
DBTreeListBox* pTreeView = new DBTreeListBox(this,
@@ -781,7 +764,6 @@ DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const OString& _sHelpId,
return createTree( pTreeView, _rImage );
}
-// -----------------------------------------------------------------------------
DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rImage )
{
WaitObject aWaitCursor(this);
@@ -808,7 +790,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
return _pTreeView;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::clearPages()
{
showPreview(NULL);
@@ -818,7 +800,7 @@ void OAppDetailPageHelper::clearPages()
m_pLists[i]->Clear();
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool OAppDetailPageHelper::isFilled() const
{
size_t i = 0;
@@ -826,7 +808,7 @@ sal_Bool OAppDetailPageHelper::isFilled() const
;
return i != E_ELEMENT_TYPE_COUNT;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::elementReplaced(ElementType _eType
,const OUString& _rOldName
,const OUString& _rNewName )
@@ -860,7 +842,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType _eType
}
}
}
-// -----------------------------------------------------------------------------
+
SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUString& _rName, const Any& _rObject )
{
SvTreeListEntry* pRet = NULL;
@@ -904,7 +886,7 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS
}
return pRet;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _rName )
{
DBTreeListBox* pTreeView = getCurrentView();
@@ -942,44 +924,44 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _r
showPreview(NULL);
}
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree)
{
OSL_ENSURE( _pTree, "OAppDetailPageHelper, OnEntryDoubleClick: invalid callback!" );
bool bHandled = ( _pTree != NULL ) && getBorderWin().getView()->getAppController().onEntryDoubleClick( *_pTree );
return bHandled ? 1L : 0L;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK(OAppDetailPageHelper, OnEntrySelChange, void*, /*NOINTERESTEDIN*/)
{
getBorderWin().getView()->getAppController().onSelectionChanged();
return 1L;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OAppDetailPageHelper, OnCutEntry, void*, /*NOINTERESTEDIN*/ )
{
getBorderWin().getView()->getAppController().onCutEntry();
return 1L;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OAppDetailPageHelper, OnCopyEntry, void*, /*NOINTERESTEDIN*/ )
{
getBorderWin().getView()->getAppController().onCopyEntry();
return 1L;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OAppDetailPageHelper, OnPasteEntry, void*, /*NOINTERESTEDIN*/ )
{
getBorderWin().getView()->getAppController().onPasteEntry();
return 1L;
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK( OAppDetailPageHelper, OnDeleteEntry, void*, /*NOINTERESTEDIN*/ )
{
getBorderWin().getView()->getAppController().onDeleteEntry();
return 1L;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::Resize()
{
// parent window dimension
@@ -1009,17 +991,17 @@ void OAppDetailPageHelper::Resize()
m_pTablePreview->SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() );
}
}
-// -----------------------------------------------------------------------------
+
PreviewMode OAppDetailPageHelper::getPreviewMode()
{
return m_ePreviewMode;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OAppDetailPageHelper::isPreviewEnabled()
{
return m_ePreviewMode != E_PREVIEWNONE;
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce)
{
if ( m_ePreviewMode != _eMode || _bForce )
@@ -1065,7 +1047,7 @@ void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce)
}
}
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
{
if ( isPreviewEnabled() )
@@ -1126,7 +1108,7 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
}
}
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
const OUString& _sName,
sal_Bool _bTable)
@@ -1194,7 +1176,7 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
showPreview(NULL);
}
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/)
{
m_aTBPreview.EndSelection();
@@ -1242,7 +1224,6 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/)
return 0L;
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::KeyInput( const KeyEvent& rKEvt )
{
SvTreeListBox* pCurrentView = getCurrentView();
@@ -1259,7 +1240,6 @@ void OAppDetailPageHelper::KeyInput( const KeyEvent& rKEvt )
Window::KeyInput(rKEvt);
}
-// -----------------------------------------------------------------------------
void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -1281,7 +1261,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt )
}
}
}
-// -----------------------------------------------------------------------------
+
void OAppDetailPageHelper::ImplInitSettings()
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1305,13 +1285,13 @@ void OAppDetailPageHelper::ImplInitSettings()
m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() );
m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() );
}
-// -----------------------------------------------------------------------------
+
OPreviewWindow::OPreviewWindow(Window* _pParent)
: Window(_pParent)
{
ImplInitSettings( sal_True, sal_True, sal_True );
}
-// -----------------------------------------------------------------------------
+
sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
{
const Size aWinSize( GetOutputSizePixel() );
@@ -1345,8 +1325,6 @@ sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rect
return bRet;
}
-// ------------------------------------------------------------------------
-
void OPreviewWindow::Paint( const Rectangle& rRect )
{
Window::Paint( rRect );
@@ -1362,7 +1340,7 @@ void OPreviewWindow::Paint( const Rectangle& rRect )
m_aGraphicObj.Draw( this, aPos, aSize );
}
}
-// -----------------------------------------------------------------------------
+
void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -1374,7 +1352,7 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-// -----------------------------------------------------------------------------
+
void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1395,7 +1373,5 @@ void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
}
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 92202ecadcd3..40d6426eb416 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -73,10 +73,8 @@ namespace dbaui
void setGraphic(const Graphic& _rGraphic ) { m_aGraphicObj.SetGraphic(_rGraphic); }
};
- //==================================================================
// A helper class for the controls in the detail page.
// Combines general functionality.
- //==================================================================
class OAppDetailPageHelper : public Window
{
DBTreeListBox* m_pLists[ELEMENT_COUNT];
@@ -322,7 +320,6 @@ namespace dbaui
void elementRemoved(ElementType _eType
,const OUString& _rName );
-
/// returns the preview mode
PreviewMode getPreviewMode();
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 9652e33e0f09..08d657ad654d 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -62,7 +62,6 @@ using ::com::sun::star::sdb::application::NamedDatabaseObject;
#define SPACEBETWEENENTRIES 4
-// -----------------------------------------------------------------------------
TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled )
:sUNOCommand( OUString::createFromAscii( _pAsciiUNOCommand ) )
,nHelpID( _nHelpID )
@@ -71,7 +70,6 @@ TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sa
{
}
-// -----------------------------------------------------------------------------
OCreationList::OCreationList( OTasksWindow& _rParent )
:SvTreeListBox( &_rParent, WB_TABSTOP | WB_HASBUTTONSATROOT | WB_HASBUTTONS )
,m_rTaskWindow( _rParent )
@@ -85,7 +83,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
SetNodeDefaultImages( );
EnableEntryMnemonics();
}
-// -----------------------------------------------------------------------------
+
void OCreationList::Paint( const Rectangle& _rRect )
{
if ( m_pMouseDownEntry )
@@ -99,7 +97,6 @@ void OCreationList::Paint( const Rectangle& _rRect )
Control::SetFont( m_aOriginalFont );
}
-// -----------------------------------------------------------------------------
void OCreationList::PreparePaint( SvTreeListEntry* _pEntry )
{
Wallpaper aEntryBackground( m_aOriginalBackgroundColor );
@@ -127,7 +124,6 @@ void OCreationList::PreparePaint( SvTreeListEntry* _pEntry )
SetBackground( aEntryBackground );
}
-// -----------------------------------------------------------------------------
void OCreationList::SelectSearchEntry( const void* _pEntry )
{
SvTreeListEntry* pEntry = const_cast< SvTreeListEntry* >( static_cast< const SvTreeListEntry* >( _pEntry ) );
@@ -140,7 +136,6 @@ void OCreationList::SelectSearchEntry( const void* _pEntry )
GrabFocus();
}
-// -----------------------------------------------------------------------------
void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const
{
SvTreeListEntry* pEntry = const_cast< SvTreeListEntry* >( static_cast< const SvTreeListEntry* >( _pEntry ) );
@@ -151,7 +146,6 @@ void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const
onSelected( pEntry );
}
-// -----------------------------------------------------------------------------
Rectangle OCreationList::GetFocusRect( SvTreeListEntry* _pEntry, long _nLine )
{
Rectangle aRect = SvTreeListBox::GetFocusRect( _pEntry, _nLine );
@@ -171,7 +165,7 @@ Rectangle OCreationList::GetFocusRect( SvTreeListEntry* _pEntry, long _nLine )
return aRect;
}
-// -----------------------------------------------------------------------------
+
void OCreationList::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
{
// don't give this to the base class, it does a ReleaseMouse as very first action
@@ -179,28 +173,28 @@ void OCreationList::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*
// something with the drag-event), I hesitate to fix it in the current state,
// since I don't overlook the consequences, and we're close to 2.0 ...)
}
-// -----------------------------------------------------------------------------
+
void OCreationList::ModelHasCleared()
{
SvTreeListBox::ModelHasCleared();
m_pLastActiveEntry = NULL;
m_pMouseDownEntry = NULL;
}
-// -----------------------------------------------------------------------------
+
void OCreationList::GetFocus()
{
SvTreeListBox::GetFocus();
if ( !GetCurEntry() )
setCurrentEntryInvalidate( m_pLastActiveEntry ? m_pLastActiveEntry : GetFirstEntryInView() );
}
-// -----------------------------------------------------------------------------
+
void OCreationList::LoseFocus()
{
SvTreeListBox::LoseFocus();
m_pLastActiveEntry = GetCurEntry();
setCurrentEntryInvalidate( NULL );
}
-// -----------------------------------------------------------------------------
+
void OCreationList::MouseButtonDown( const MouseEvent& rMEvt )
{
SvTreeListBox::MouseButtonDown( rMEvt );
@@ -213,7 +207,7 @@ void OCreationList::MouseButtonDown( const MouseEvent& rMEvt )
CaptureMouse();
}
}
-// -----------------------------------------------------------------------------
+
void OCreationList::MouseMove( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeaveWindow() )
@@ -252,7 +246,7 @@ void OCreationList::MouseMove( const MouseEvent& rMEvt )
SvTreeListBox::MouseMove(rMEvt);
}
-// -----------------------------------------------------------------------------
+
void OCreationList::MouseButtonUp( const MouseEvent& rMEvt )
{
SvTreeListEntry* pEntry = GetEntry( rMEvt.GetPosPixel() );
@@ -279,7 +273,7 @@ void OCreationList::MouseButtonUp( const MouseEvent& rMEvt )
if ( bExecute )
onSelected( pEntry );
}
-// -----------------------------------------------------------------------------
+
bool OCreationList::setCurrentEntryInvalidate( SvTreeListEntry* _pEntry )
{
if ( GetCurEntry() != _pEntry )
@@ -297,7 +291,7 @@ bool OCreationList::setCurrentEntryInvalidate( SvTreeListEntry* _pEntry )
}
return false;
}
-// -----------------------------------------------------------------------------
+
void OCreationList::updateHelpText()
{
sal_uInt16 nHelpTextId = 0;
@@ -305,7 +299,7 @@ void OCreationList::updateHelpText()
nHelpTextId = reinterpret_cast< TaskEntry* >( GetCurEntry()->GetUserData() )->nHelpID;
m_rTaskWindow.setHelpText( nHelpTextId );
}
-// -----------------------------------------------------------------------------
+
void OCreationList::onSelected( SvTreeListEntry* _pEntry ) const
{
OSL_ENSURE( _pEntry, "OCreationList::onSelected: invalid entry!" );
@@ -313,7 +307,7 @@ void OCreationList::onSelected( SvTreeListEntry* _pEntry ) const
aCommand.Complete = reinterpret_cast< TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand;
m_rTaskWindow.getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() );
}
-// -----------------------------------------------------------------------------
+
void OCreationList::KeyInput( const KeyEvent& rKEvt )
{
const KeyCode& rCode = rKEvt.GetKeyCode();
@@ -343,8 +337,9 @@ void OCreationList::KeyInput( const KeyEvent& rKEvt )
updateHelpText();
}
}
-// -----------------------------------------------------------------------------
+
DBG_NAME(OTasksWindow)
+
OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView)
: Window(_pParent,WB_DIALOGCONTROL )
,m_aCreation(*this)
@@ -368,13 +363,13 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView
ImplInitSettings(sal_True,sal_True,sal_True);
}
-// -----------------------------------------------------------------------------
+
OTasksWindow::~OTasksWindow()
{
DBG_DTOR(OTasksWindow,NULL);
Clear();
}
-// -----------------------------------------------------------------------
+
void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -387,7 +382,7 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-// -----------------------------------------------------------------------------
+
void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -422,7 +417,7 @@ void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
aFont.SetWeight(WEIGHT_BOLD);
m_aDescription.SetControlFont(aFont);
}
-// -----------------------------------------------------------------------------
+
void OTasksWindow::setHelpText(sal_uInt16 _nId)
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -436,8 +431,9 @@ void OTasksWindow::setHelpText(sal_uInt16 _nId)
{
m_aHelpText.SetText(OUString());
}
+
}
-// -----------------------------------------------------------------------------
+
IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/)
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -446,7 +442,7 @@ IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/)
m_aHelpText.SetText( ModuleRes( reinterpret_cast< TaskEntry* >( pEntry->GetUserData() )->nHelpID ) );
return 1L;
}
-// -----------------------------------------------------------------------------
+
void OTasksWindow::Resize()
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -469,7 +465,7 @@ void OTasksWindow::Resize()
m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) );
}
-// -----------------------------------------------------------------------------
+
void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -520,7 +516,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
m_aCreation.updateHelpText();
Enable(!_rList.empty());
}
-// -----------------------------------------------------------------------------
+
void OTasksWindow::Clear()
{
DBG_CHKTHIS(OTasksWindow,NULL);
@@ -533,10 +529,11 @@ void OTasksWindow::Clear()
}
m_aCreation.Clear();
}
-//==================================================================
+
// class OApplicationDetailView
-//==================================================================
+
DBG_NAME(OApplicationDetailView)
+
OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode) : OSplitterView(&_rParent,sal_False )
,m_aHorzSplitter(this)
,m_aTasks(this,STR_TASKS,WB_BORDER | WB_DIALOGCONTROL )
@@ -570,7 +567,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
m_aHorzSplitter.SetUniqueId(UID_APP_VIEW_HORZ_SPLIT);
setSplitter(&m_aHorzSplitter);
}
-// -----------------------------------------------------------------------------
+
OApplicationDetailView::~OApplicationDetailView()
{
DBG_DTOR(OApplicationDetailView,NULL);
@@ -578,7 +575,7 @@ OApplicationDetailView::~OApplicationDetailView()
setSplitter(NULL);
m_pControlHelper = NULL;
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
@@ -604,7 +601,7 @@ void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForegro
m_aHorzSplitter.SetFillColor( rStyleSettings.GetDialogColor() );
m_aHorzSplitter.SetTextFillColor(rStyleSettings.GetDialogColor() );
}
-// -----------------------------------------------------------------------
+
void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
@@ -620,20 +617,18 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::GetFocus()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
OSplitterView::GetFocus();
}
-// -----------------------------------------------------------------------------
void OApplicationDetailView::setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics )
{
m_aExternalMnemonics = _rMnemonics;
}
-// -----------------------------------------------------------------------------
bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent )
{
const KeyCode& rKeyCode = _rEvent.GetKeyCode();
@@ -644,19 +639,16 @@ bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent )
return false;
}
-// -----------------------------------------------------------------------------
void OApplicationDetailView::createTablesPage(const Reference< XConnection >& _xConnection )
{
impl_createPage( E_TABLE, _xConnection, NULL );
}
-// -----------------------------------------------------------------------------
void OApplicationDetailView::createPage( ElementType _eType,const Reference< XNameAccess >& _xContainer )
{
impl_createPage( _eType, NULL, _xContainer );
}
-// -----------------------------------------------------------------------------
void OApplicationDetailView::impl_createPage( ElementType _eType, const Reference< XConnection >& _rxConnection,
const Reference< XNameAccess >& _rxNonTableElements )
{
@@ -684,7 +676,6 @@ void OApplicationDetailView::impl_createPage( ElementType _eType, const Referenc
Resize();
}
-// -----------------------------------------------------------------------------
const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _eType )
{
if ( m_aTaskPaneData.empty() )
@@ -698,7 +689,6 @@ const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _e
return rData;
}
-// -----------------------------------------------------------------------------
void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPaneData& _rData ) const
{
TaskEntryList& rList( _rData.aTasks );
@@ -765,55 +755,54 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane
}
}
-// -----------------------------------------------------------------------------
OUString OApplicationDetailView::getQualifiedName( SvTreeListEntry* _pEntry ) const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getQualifiedName( _pEntry );
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationDetailView::isLeaf(SvTreeListEntry* _pEntry) const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isLeaf(_pEntry);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationDetailView::isALeafSelected() const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isALeafSelected();
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::selectAll()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->selectAll();
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::sortDown()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->sortDown();
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::sortUp()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->sortUp();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationDetailView::isFilled() const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isFilled();
}
-// -----------------------------------------------------------------------------
+
ElementType OApplicationDetailView::getElementType() const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getElementType();
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::clearPages(sal_Bool _bTaskAlso)
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
@@ -821,81 +810,85 @@ void OApplicationDetailView::clearPages(sal_Bool _bTaskAlso)
getTasksWindow().Clear();
m_pControlHelper->clearPages();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OApplicationDetailView::getSelectionCount()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getSelectionCount();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OApplicationDetailView::getElementCount()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getElementCount();
}
-// -----------------------------------------------------------------------------
void OApplicationDetailView::getSelectionElementNames( ::std::vector< OUString>& _rNames ) const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->getSelectionElementNames( _rNames );
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->describeCurrentSelectionForControl( _rControl, _out_rSelectedObjects );
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->describeCurrentSelectionForType( _eType, _out_rSelectedObjects );
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::selectElements(const Sequence< OUString>& _aNames)
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->selectElements( _aNames );
}
-// -----------------------------------------------------------------------------
+
SvTreeListEntry* OApplicationDetailView::getEntry( const Point& _aPoint ) const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getEntry(_aPoint);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationDetailView::isCutAllowed()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isCutAllowed();
}
+
sal_Bool OApplicationDetailView::isCopyAllowed()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isCopyAllowed();
}
+
sal_Bool OApplicationDetailView::isPasteAllowed() { DBG_CHKTHIS(OApplicationDetailView,NULL);return m_pControlHelper->isPasteAllowed(); }
+
void OApplicationDetailView::copy() { DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->copy(); }
+
void OApplicationDetailView::cut() { DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->cut(); }
+
void OApplicationDetailView::paste()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->paste();
}
-// -----------------------------------------------------------------------------
+
SvTreeListEntry* OApplicationDetailView::elementAdded(ElementType _eType,const OUString& _rName, const Any& _rObject )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->elementAdded(_eType,_rName, _rObject );
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::elementRemoved(ElementType _eType,const OUString& _rName )
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->elementRemoved(_eType,_rName );
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::elementReplaced(ElementType _eType
,const OUString& _rOldName
,const OUString& _rNewName )
@@ -903,31 +896,31 @@ void OApplicationDetailView::elementReplaced(ElementType _eType
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->elementReplaced( _eType, _rOldName, _rNewName );
}
-// -----------------------------------------------------------------------------
+
PreviewMode OApplicationDetailView::getPreviewMode()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->getPreviewMode();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationDetailView::isPreviewEnabled()
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isPreviewEnabled();
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::switchPreview(PreviewMode _eMode)
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->switchPreview(_eMode);
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::showPreview(const Reference< XContent >& _xContent)
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->showPreview(_xContent);
}
-// -----------------------------------------------------------------------------
+
void OApplicationDetailView::showPreview( const OUString& _sDataSourceName,
const OUString& _sName,
sal_Bool _bTable)
@@ -935,13 +928,13 @@ void OApplicationDetailView::showPreview( const OUString& _sDataSourceName,
DBG_CHKTHIS(OApplicationDetailView,NULL);
m_pControlHelper->showPreview(_sDataSourceName,_sName,_bTable);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationDetailView::isSortUp() const
{
DBG_CHKTHIS(OApplicationDetailView,NULL);
return m_pControlHelper->isSortUp();
}
-// -----------------------------------------------------------------------------
+
Window* OApplicationDetailView::getTreeWindow() const
{
return m_pControlHelper->getCurrentView();
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index 67c9b57e9f96..d8813dddecdc 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -141,7 +141,6 @@ namespace dbaui
void Clear();
void setHelpText(sal_uInt16 _nId);
};
- //==================================================================
class OApplicationDetailView : public OSplitterView
, public IClipboardTest
{
@@ -326,7 +325,6 @@ namespace dbaui
/// <TRUE/> if the preview is enabled
sal_Bool isPreviewEnabled();
-
/** switches to the given preview mode
@param _eMode
the mode to set for the preview
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 0dc9d966ea85..2cfccd12bcad 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -28,10 +28,8 @@
#include <memory>
using namespace ::dbaui;
-//==================================================================
// class OApplicationIconControl
DBG_NAME(OApplicationIconControl)
-//==================================================================
OApplicationIconControl::OApplicationIconControl(Window* _pParent)
: SvtIconChoiceCtrl(_pParent,WB_ICON | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | /*!WB_NOSELECTION |*/
WB_TABSTOP | WB_CLIPCHILDREN | WB_NOVSCROLL | WB_SMART_ARRANGE | WB_NOHSCROLL | WB_CENTER)
@@ -63,7 +61,7 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent)
SetChoiceWithCursor( sal_True );
SetSelectionMode(SINGLE_SELECTION);
}
-// -----------------------------------------------------------------------------
+
OApplicationIconControl::~OApplicationIconControl()
{
sal_uLong nCount = GetEntryCount();
@@ -79,7 +77,7 @@ OApplicationIconControl::~OApplicationIconControl()
DBG_DTOR(OApplicationIconControl,NULL);
}
-// -----------------------------------------------------------------------------
+
sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt )
{
sal_Int8 nDropOption = DND_ACTION_NONE;
@@ -97,7 +95,7 @@ sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt )
return nDropOption;
}
-// -----------------------------------------------------------------------------
+
sal_Int8 OApplicationIconControl::ExecuteDrop( const ExecuteDropEvent& _rEvt )
{
if ( m_pActionListener )
diff --git a/dbaccess/source/ui/app/AppIconControl.hxx b/dbaccess/source/ui/app/AppIconControl.hxx
index 1c057f52c37a..1ca4b4dae1d7 100644
--- a/dbaccess/source/ui/app/AppIconControl.hxx
+++ b/dbaccess/source/ui/app/AppIconControl.hxx
@@ -22,11 +22,9 @@
#include <svtools/ivctrl.hxx>
#include <svtools/transfer.hxx>
-
namespace dbaui
{
class IControlActionListener;
- //==================================================================
class OApplicationIconControl :public SvtIconChoiceCtrl
,public DropTargetHelper
{
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 2eba13004c3b..97f6cc0259ba 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -36,10 +36,8 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
-//==================================================================
// class OApplicationSwapWindow
DBG_NAME(OApplicationSwapWindow)
-//==================================================================
OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWindow& _rBorderWindow )
:Window(_pParent,WB_DIALOGCONTROL )
,m_aIconControl(this)
@@ -55,13 +53,13 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind
m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL);
m_aIconControl.Show();
}
-// -----------------------------------------------------------------------------
+
OApplicationSwapWindow::~OApplicationSwapWindow()
{
DBG_DTOR(OApplicationSwapWindow,NULL);
}
-// -----------------------------------------------------------------------------
+
void OApplicationSwapWindow::Resize()
{
Size aFLSize = LogicToPixel( Size( 8, 0 ), MAP_APPFONT );
@@ -74,7 +72,7 @@ void OApplicationSwapWindow::Resize()
m_aIconControl.SetPosSizePixel( Point(static_cast<long>((aOutputSize.Width() - nX)*0.5), 0) ,Size(nX,aOutputSize.Height()));
m_aIconControl.ArrangeIcons();
}
-// -----------------------------------------------------------------------------
+
void OApplicationSwapWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -95,7 +93,7 @@ void OApplicationSwapWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForegro
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
}
-// -----------------------------------------------------------------------
+
void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -109,7 +107,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationSwapWindow::clearSelection()
{
m_aIconControl.SetNoSelection();
@@ -120,13 +118,11 @@ void OApplicationSwapWindow::clearSelection()
m_aIconControl.GetClickHdl().Call(&m_aIconControl);
}
-// -----------------------------------------------------------------------------
void OApplicationSwapWindow::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics )
{
m_aIconControl.CreateAutoMnemonics( _rMnemonics );
}
-// -----------------------------------------------------------------------------
bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent )
{
const KeyCode& rKeyCode = _rEvent.GetKeyCode();
@@ -137,7 +133,6 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent )
return false;
}
-// -----------------------------------------------------------------------------
ElementType OApplicationSwapWindow::getElementType() const
{
sal_uLong nPos = 0;
@@ -145,7 +140,6 @@ ElementType OApplicationSwapWindow::getElementType() const
return ( pEntry ) ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE;
}
-// -----------------------------------------------------------------------------
bool OApplicationSwapWindow::onContainerSelected( ElementType _eType )
{
if ( m_eLastType == _eType )
@@ -162,7 +156,6 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType )
return false;
}
-// -----------------------------------------------------------------------------
IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl)
{
sal_uLong nPos = 0;
@@ -176,13 +169,13 @@ IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pCo
return 1L;
}
-//------------------------------------------------------------------------------
+
IMPL_LINK_NOARG(OApplicationSwapWindow, ChangeToLastSelected)
{
selectContainer(m_eLastType);
return 0L;
}
-// -----------------------------------------------------------------------------
+
void OApplicationSwapWindow::selectContainer(ElementType _eType)
{
sal_uLong nCount = m_aIconControl.GetEntryCount();
diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx
index e0a806677309..1e8dd8849eb8 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.hxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.hxx
@@ -27,7 +27,6 @@
namespace dbaui
{
class OAppBorderWindow;
- //==================================================================
class OApplicationSwapWindow : public Window,
public IClipboardTest
{
@@ -47,7 +46,6 @@ namespace dbaui
// window overloads
virtual void Resize();
-
inline sal_Bool isCutAllowed() { return sal_False; }
inline sal_Bool isCopyAllowed() { return sal_False; }
inline sal_Bool isPasteAllowed() { return sal_False; }
@@ -75,7 +73,6 @@ namespace dbaui
/// return the element of currently select entry
ElementType getElementType() const;
-
/** clears the selection in the icon choice control and calls the handler
*/
void clearSelection();
@@ -89,9 +86,7 @@ namespace dbaui
private:
bool onContainerSelected( ElementType _eType );
};
-// .............................................................
} // namespace dbaui
-// .............................................................
#endif // DBAUI_APPSWAPWINDOW_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index a75d6e5604dc..384ed8eaf067 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -45,7 +45,7 @@ OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
pWindows[i]->Show();
}
-// -----------------------------------------------------------------------------
+
OTitleWindow::~OTitleWindow()
{
if ( m_pChild )
@@ -57,13 +57,13 @@ OTitleWindow::~OTitleWindow()
DBG_DTOR(OTitleWindow,NULL);
}
-// -----------------------------------------------------------------------------
+
void OTitleWindow::setChildWindow(Window* _pChild)
{
m_pChild = _pChild;
}
+
#define SPACE_BORDER 1
-// -----------------------------------------------------------------------------
void OTitleWindow::Resize()
{
// parent window dimension
@@ -88,7 +88,7 @@ void OTitleWindow::Resize()
Size(nOutputWidth - ( m_bShift ? (2*nXOffset - 2*SPACE_BORDER) : sal_Int32(SPACE_BORDER) ), nOutputHeight - nHeight - 2*nXOffset - 2*SPACE_BORDER) );
}
}
-// -----------------------------------------------------------------------------
+
void OTitleWindow::setTitle(sal_uInt16 _nTitleId)
{
if ( _nTitleId != 0 )
@@ -96,14 +96,14 @@ void OTitleWindow::setTitle(sal_uInt16 _nTitleId)
m_aTitle.SetText(ModuleRes(_nTitleId));
}
}
-// -----------------------------------------------------------------------------
+
void OTitleWindow::GetFocus()
{
Window::GetFocus();
if ( m_pChild )
m_pChild->GrabFocus();
}
-// -----------------------------------------------------------------------------
+
long OTitleWindow::GetWidthPixel() const
{
Size aTextSize = LogicToPixel( Size( 12, 0 ), MAP_APPFONT );
@@ -111,7 +111,7 @@ long OTitleWindow::GetWidthPixel() const
return nWidth;
}
-// -----------------------------------------------------------------------
+
void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -126,7 +126,7 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-//-----------------------------------------------------------------------------
+
void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
AllSettings aAllSettings = GetSettings();
@@ -153,7 +153,6 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
-
Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle};
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
{
@@ -164,8 +163,7 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
pWindows[i]->SetBackground( Wallpaper( aStyle.GetShadowColor() ) );
}
}
-// .............................................................
+
} // namespace dbaui
-// .............................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index f4c64310a2db..7213b27f0f5a 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -60,7 +60,6 @@ namespace dbaui
*/
void setTitle(sal_uInt16 _nTitleId);
-
/** Gets the min Width in Pixel which is needed to display the whole
@return
@@ -68,9 +67,7 @@ namespace dbaui
*/
long GetWidthPixel() const;
};
-// .............................................................
} // namespace dbaui
-// .............................................................
#endif // DBAUI_TITLE_WINDOW_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 871e29cf8662..f9dac6a931ab 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -57,10 +57,8 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::container;
using ::com::sun::star::sdb::application::NamedDatabaseObject;
-//==================================================================
// class OAppBorderWindow
DBG_NAME(OAppBorderWindow)
-//==================================================================
OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePreviewMode) : Window(_pParent,WB_DIALOGCONTROL)
,m_pPanel(NULL)
,m_pDetailView(NULL)
@@ -85,7 +83,7 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev
ImplInitSettings();
}
-// -----------------------------------------------------------------------------
+
OAppBorderWindow::~OAppBorderWindow()
{
// destroy children
@@ -108,13 +106,13 @@ OAppBorderWindow::~OAppBorderWindow()
DBG_DTOR(OAppBorderWindow,NULL);
}
-// -----------------------------------------------------------------------------
+
void OAppBorderWindow::GetFocus()
{
if ( m_pPanel )
m_pPanel->GrabFocus();
}
-// -----------------------------------------------------------------------------
+
void OAppBorderWindow::Resize()
{
// parent window dimension
@@ -139,7 +137,7 @@ void OAppBorderWindow::Resize()
if ( m_pDetailView )
m_pDetailView->SetPosSizePixel(Point(nX + aFLSize.Width(),0),Size(nOutputWidth - nX - aFLSize.Width(),nOutputHeight));
}
-// -----------------------------------------------------------------------------
+
void OAppBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -154,7 +152,7 @@ void OAppBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-// -----------------------------------------------------------------------------
+
void OAppBorderWindow::ImplInitSettings()
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -175,29 +173,24 @@ void OAppBorderWindow::ImplInitSettings()
if( true )
SetBackground( rStyleSettings.GetDialogColor() );
}
-// -----------------------------------------------------------------------------
+
OApplicationView* OAppBorderWindow::getView() const
{
return m_pView;
}
-// -----------------------------------------------------------------------------
OApplicationSwapWindow* OAppBorderWindow::getPanel() const
{
return static_cast< OApplicationSwapWindow* >( m_pPanel->getChildWindow() );
}
-// -----------------------------------------------------------------------------
OApplicationDetailView* OAppBorderWindow::getDetailView() const
{
return m_pDetailView;
}
-//==================================================================
// class OApplicationView
-//==================================================================
DBG_NAME(OApplicationView);
-//------------------------------------------------------------------------------
OApplicationView::OApplicationView( Window* pParent
,const Reference< XComponentContext >& _rxOrb
,IApplicationController& _rAppController
@@ -224,7 +217,6 @@ OApplicationView::OApplicationView( Window* pParent
ImplInitSettings();
}
-//------------------------------------------------------------------------------
OApplicationView::~OApplicationView()
{
DBG_DTOR(OApplicationView,NULL);
@@ -238,21 +230,19 @@ OApplicationView::~OApplicationView()
m_pWin = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics )
{
if ( m_pWin && m_pWin->getPanel() )
m_pWin->getPanel()->createIconAutoMnemonics( _rMnemonics );
}
-// -----------------------------------------------------------------------------
void OApplicationView::setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics )
{
if ( m_pWin && m_pWin->getDetailView() )
m_pWin->getDetailView()->setTaskExternalMnemonics( _rMnemonics );
}
-// -----------------------------------------------------------------------------
void OApplicationView::DataChanged( const DataChangedEvent& rDCEvt )
{
ODataView::DataChanged( rDCEvt );
@@ -267,7 +257,7 @@ void OApplicationView::DataChanged( const DataChangedEvent& rDCEvt )
Invalidate();
}
}
-//------------------------------------------------------------------------------
+
void OApplicationView::resizeDocumentView(Rectangle& _rPlayground)
{
if ( m_pWin && !_rPlayground.IsEmpty() )
@@ -283,7 +273,7 @@ void OApplicationView::resizeDocumentView(Rectangle& _rPlayground)
_rPlayground.SetPos( _rPlayground.BottomRight() );
_rPlayground.SetSize( Size( 0, 0 ) );
}
-//------------------------------------------------------------------------------
+
long OApplicationView::PreNotify( NotifyEvent& rNEvt )
{
switch(rNEvt.GetType())
@@ -313,7 +303,7 @@ long OApplicationView::PreNotify( NotifyEvent& rNEvt )
return ODataView::PreNotify(rNEvt);
}
-// -----------------------------------------------------------------------------
+
IClipboardTest* OApplicationView::getActiveChild() const
{
IClipboardTest* pTest = NULL;
@@ -321,148 +311,148 @@ IClipboardTest* OApplicationView::getActiveChild() const
pTest = getDetailView();
return pTest;
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isCopyAllowed()
{
IClipboardTest* pTest = getActiveChild();
return pTest && pTest->isCopyAllowed();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isCutAllowed()
{
IClipboardTest* pTest = getActiveChild();
return pTest && pTest->isCutAllowed();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isPasteAllowed()
{
IClipboardTest* pTest = getActiveChild();
return pTest && pTest->isPasteAllowed();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::copy()
{
IClipboardTest* pTest = getActiveChild();
if ( pTest )
pTest->copy();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::cut()
{
IClipboardTest* pTest = getActiveChild();
if ( pTest )
pTest->cut();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::paste()
{
IClipboardTest* pTest = getActiveChild();
if ( pTest )
pTest->paste();
}
-// -----------------------------------------------------------------------------
+
OUString OApplicationView::getQualifiedName( SvTreeListEntry* _pEntry ) const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->getQualifiedName( _pEntry );
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isLeaf(SvTreeListEntry* _pEntry) const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->isLeaf(_pEntry);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isALeafSelected() const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->isALeafSelected();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::selectAll()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->selectAll();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isSortUp() const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->isSortUp();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::sortDown()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->sortDown();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::sortUp()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->sortUp();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isFilled() const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->isFilled();
}
-// -----------------------------------------------------------------------------
+
ElementType OApplicationView::getElementType() const
{
OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF");
return getDetailView()->HasChildPathFocus() ? getDetailView()->getElementType() : getPanel()->getElementType();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OApplicationView::getSelectionCount()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->getSelectionCount();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OApplicationView::getElementCount()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->getElementCount();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::getSelectionElementNames( ::std::vector< OUString>& _rNames ) const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->getSelectionElementNames( _rNames );
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->describeCurrentSelectionForControl( _rControl, _out_rSelectedObjects );
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->describeCurrentSelectionForType( _eType, _out_rSelectedObjects );
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::selectElements(const Sequence< OUString>& _aNames)
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->selectElements( _aNames );
}
-// -----------------------------------------------------------------------------
+
SvTreeListEntry* OApplicationView::elementAdded(ElementType eType,const OUString& _rName, const Any& _rObject )
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->elementAdded(eType,_rName,_rObject);
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::elementRemoved(ElementType eType,const OUString& _rName )
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->elementRemoved(eType,_rName);
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::elementReplaced(ElementType _eType
,const OUString& _rOldName
,const OUString& _rNewName )
@@ -470,45 +460,45 @@ void OApplicationView::elementReplaced(ElementType _eType
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->elementReplaced(_eType, _rOldName, _rNewName );
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::clearPages(sal_Bool _bTaskAlso)
{
OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF");
getPanel()->clearSelection();
getDetailView()->clearPages(_bTaskAlso);
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::selectContainer(ElementType _eType)
{
OSL_ENSURE(m_pWin && getPanel(),"Detail view is NULL! -> GPF");
WaitObject aWO(this);
getPanel()->selectContainer(_eType);
}
-// -----------------------------------------------------------------------------
+
SvTreeListEntry* OApplicationView::getEntry( const Point& _aPosPixel ) const
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->getEntry(_aPosPixel);
}
-// -----------------------------------------------------------------------------
+
PreviewMode OApplicationView::getPreviewMode()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->getPreviewMode();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OApplicationView::isPreviewEnabled()
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
return getDetailView()->isPreviewEnabled();
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::switchPreview(PreviewMode _eMode)
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
getDetailView()->switchPreview(_eMode);
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::showPreview(const Reference< XContent >& _xContent)
{
OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
@@ -516,7 +506,7 @@ void OApplicationView::showPreview(const Reference< XContent >& _xContent)
m_xObject = NULL;
getDetailView()->showPreview(_xContent);
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::showPreview( const OUString& _sDataSourceName,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
const OUString& _sName,
@@ -554,7 +544,7 @@ void OApplicationView::showPreview( const OUString& _sDataSourceName,
getDetailView()->showPreview(_sDataSourceName,_sName,_bTable);
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::GetFocus()
{
if ( m_eChildFocus == NONE && m_pWin )
@@ -562,13 +552,13 @@ void OApplicationView::GetFocus()
m_pWin->GrabFocus();
}
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::_disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ )
{
if ( m_pWin && getDetailView() )
showPreview(NULL);
}
-// -----------------------------------------------------------------------------
+
void OApplicationView::ImplInitSettings()
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -589,6 +579,5 @@ void OApplicationView::ImplInitSettings()
if( true )
SetBackground( rStyleSettings.GetFieldColor() );
}
-//-----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index 7c50466b5b33..3f0da9dc6a38 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -42,7 +42,6 @@ namespace dbaui
class OApplicationDetailView;
class OApplicationSwapWindow;
class OTitleWindow;
- //==================================================================
class OAppBorderWindow : public Window
{
OTitleWindow* m_pPanel;
@@ -66,7 +65,6 @@ namespace dbaui
OApplicationDetailView* getDetailView() const;
};
- //==================================================================
class OApplicationView : public ODataView
,public IClipboardTest
,public ::utl::OEventListenerAdapter
@@ -90,7 +88,6 @@ namespace dbaui
void ImplInitSettings();
protected:
-
// return the Rectangle where I can paint myself
virtual void resizeDocumentView(Rectangle& rRect);
@@ -255,7 +252,6 @@ namespace dbaui
void elementRemoved(ElementType _eType
,const OUString& _rName );
-
/** changes the container which should be displayed. The select handler will also be called.
@param _eType
Which container to show.
diff --git a/dbaccess/source/ui/app/IApplicationController.hxx b/dbaccess/source/ui/app/IApplicationController.hxx
index fbcc6583ea98..8789b7437dac 100644
--- a/dbaccess/source/ui/app/IApplicationController.hxx
+++ b/dbaccess/source/ui/app/IApplicationController.hxx
@@ -26,10 +26,8 @@
class SvTreeListBox;
-//........................................................................
namespace dbaui
{
-//........................................................................
class SAL_NO_VTABLE IApplicationController :public IController
,public IControlActionListener
@@ -85,9 +83,7 @@ namespace dbaui
~IApplicationController() {}
};
-//........................................................................
} // namespace dbaui
-//........................................................................
#endif // DBA30D_IAPPLICATIONCONTROLLER_HXX
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 727da5ad59ab..1dcbe7cdefb0 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -38,10 +38,8 @@
#include <algorithm>
#include <functional>
-//......................................................................................................................
namespace dbaui
{
-//......................................................................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -70,12 +68,9 @@ namespace dbaui
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::beans::PropertyChangeEvent;
- //==================================================================================================================
- //= helper structs
- //==================================================================================================================
+ // helper structs
namespace
{
- //..............................................................................................................
struct SubComponentDescriptor
{
/// the name of the sub component, empty if it is yet unsaved
@@ -164,7 +159,6 @@ namespace dbaui
}
};
- //..............................................................................................................
struct SelectSubComponent : public ::std::unary_function< SubComponentDescriptor, Reference< XComponent > >
{
Reference< XComponent > operator()( const SubComponentDescriptor &_desc ) const
@@ -176,10 +170,8 @@ namespace dbaui
}
};
- //..............................................................................................................
typedef ::std::vector< SubComponentDescriptor > SubComponents;
- //..............................................................................................................
struct SubComponentMatch : public ::std::unary_function< SubComponentDescriptor, bool >
{
public:
@@ -204,9 +196,7 @@ namespace dbaui
};
}
- //==================================================================================================================
- //= SubComponentManager_Data
- //==================================================================================================================
+ // SubComponentManager_Data
struct SubComponentManager_Data
{
SubComponentManager_Data( OApplicationController& _rController, const ::comphelper::SharedMutex& _rMutex )
@@ -222,31 +212,24 @@ namespace dbaui
::osl::Mutex& getMutex() const { return m_aMutex; }
};
- //==================================================================================================================
- //= SubComponentManager
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+ // SubComponentManager
SubComponentManager::SubComponentManager( OApplicationController& _rController, const ::comphelper::SharedMutex& _rMutex )
:m_pData( new SubComponentManager_Data( _rController, _rMutex ) )
{
}
- //------------------------------------------------------------------------------------------------------------------
SubComponentManager::~SubComponentManager()
{
}
- //------------------------------------------------------------------------------------------------------------------
void SubComponentManager::disposing()
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
m_pData->m_aComponents.clear();
}
- //------------------------------------------------------------------------------------------------------------------
namespace
{
- //..............................................................................................................
bool lcl_fallbackToAnotherController( SubComponentDescriptor& _rCompDesc )
{
Reference< XController > xFallback;
@@ -284,7 +267,6 @@ namespace dbaui
return false;
}
- //..............................................................................................................
bool lcl_closeComponent( const Reference< XCommandProcessor >& _rxCommandProcessor )
{
bool bSuccess = false;
@@ -304,7 +286,6 @@ namespace dbaui
return bSuccess;
}
- //..............................................................................................................
bool lcl_closeComponent( const SubComponentDescriptor& _rComponent )
{
if ( _rComponent.xComponentCommandProcessor.is() )
@@ -332,7 +313,6 @@ namespace dbaui
return bSuccess;
}
- //..............................................................................................................
void lcl_notifySubComponentEvent( const SubComponentManager_Data& _rData, const sal_Char* _pAsciiEventName,
const SubComponentDescriptor& _rComponent )
{
@@ -352,7 +332,6 @@ namespace dbaui
}
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL SubComponentManager::propertyChange( const PropertyChangeEvent& i_rEvent ) throw (RuntimeException)
{
if ( i_rEvent.PropertyName != PROPERTY_NAME )
@@ -383,7 +362,6 @@ namespace dbaui
}
}
- //------------------------------------------------------------------------------------------------------------------
void SAL_CALL SubComponentManager::disposing( const EventObject& _rSource ) throw (RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_pData->getMutex() );
@@ -432,7 +410,6 @@ namespace dbaui
}
}
- //------------------------------------------------------------------------------------------------------------------
Sequence< Reference< XComponent> > SubComponentManager::getSubComponents() const
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
@@ -447,7 +424,6 @@ namespace dbaui
return aComponents;
}
- //------------------------------------------------------------------------------------------------------------------
sal_Bool SubComponentManager::closeSubComponents()
{
SolarMutexGuard aSolarGuard;
@@ -472,14 +448,12 @@ namespace dbaui
return empty();
}
- //------------------------------------------------------------------------------------------------------------------
bool SubComponentManager::empty() const
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
return m_pData->m_aComponents.empty();
}
- //------------------------------------------------------------------------------------------------------------------
void SubComponentManager::onSubComponentOpened( const OUString& _rName, const sal_Int32 _nComponentType,
const ElementOpenMode _eOpenMode, const Reference< XComponent >& _rxComponent )
{
@@ -515,7 +489,6 @@ namespace dbaui
lcl_notifySubComponentEvent( *m_pData, "OnSubComponentOpened", aElement );
}
- //------------------------------------------------------------------------------------------------------------------
bool SubComponentManager::activateSubFrame( const OUString& _rName, const sal_Int32 _nComponentType,
const ElementOpenMode _eOpenMode, Reference< XComponent >& o_rComponent ) const
{
@@ -544,7 +517,6 @@ namespace dbaui
return true;
}
- //------------------------------------------------------------------------------------------------------------------
bool SubComponentManager::closeSubFrames( const OUString& i_rName, const sal_Int32 _nComponentType )
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
@@ -566,7 +538,6 @@ namespace dbaui
return true;
}
- //------------------------------------------------------------------------------------------------------------------
bool SubComponentManager::lookupSubComponent( const Reference< XComponent >& i_rComponent,
OUString& o_rName, sal_Int32& o_rComponentType )
{
@@ -594,8 +565,6 @@ namespace dbaui
return false;
}
-//......................................................................................................................
} // namespace dbaui
-//......................................................................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx
index 15a3def5f7ac..f7c3df9a77b4 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.hxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.hxx
@@ -30,17 +30,13 @@
#include <memory>
-//........................................................................
namespace dbaui
{
-//........................................................................
struct SubComponentManager_Data;
class OApplicationController;
- //====================================================================
- //= SubComponentManager
- //====================================================================
+ // SubComponentManager
typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener
> SubComponentManager_Base;
class SubComponentManager : public SubComponentManager_Base
@@ -120,9 +116,7 @@ namespace dbaui
::std::auto_ptr< SubComponentManager_Data > m_pData;
};
-//........................................................................
} // namespace dbaui
-//........................................................................
#endif // DBACCESS_SUBCOMPONENTMANAGER_HXX