diff options
Diffstat (limited to 'dbaccess/source/ui/browser')
21 files changed, 480 insertions, 480 deletions
diff --git a/dbaccess/source/ui/browser/AsyncronousLink.cxx b/dbaccess/source/ui/browser/AsyncronousLink.cxx index 7cc0ac71d23b..9e615095a19b 100644 --- a/dbaccess/source/ui/browser/AsyncronousLink.cxx +++ b/dbaccess/source/ui/browser/AsyncronousLink.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/browser/bcommon.src b/dbaccess/source/ui/browser/bcommon.src index 8c79179eda20..41ccc595ff5a 100644 --- a/dbaccess/source/ui/browser/bcommon.src +++ b/dbaccess/source/ui/browser/bcommon.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 66e774b22a53..999a6bca6f66 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -114,24 +114,24 @@ using namespace ::dbtools; using namespace ::comphelper; using namespace ::svt; -#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \ - try \ - { \ - successflag = sal_False; \ - action; \ - successflag = sal_True; \ - } \ - catch(SQLException& e) \ - { \ +#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \ + try \ + { \ + successflag = sal_False; \ + action; \ + successflag = sal_True; \ + } \ + catch(SQLException& e) \ + { \ SQLException aError = ::dbtools::prependErrorInfo(e, *this, context); \ - ::com::sun::star::sdb::SQLErrorEvent aEvent; \ - aEvent.Reason <<= aError; \ - errorOccured(aEvent); \ - } \ - catch(Exception&) \ - { \ + ::com::sun::star::sdb::SQLErrorEvent aEvent; \ + aEvent.Reason <<= aError; \ + errorOccured(aEvent); \ + } \ + catch(Exception&) \ + { \ DBG_UNHANDLED_EXCEPTION(); \ - } \ + } \ #define DO_SAFE( action, message ) try { action; } catch(Exception&) { DBG_ERROR(message); } ; @@ -145,12 +145,12 @@ namespace dbaui //================================================================== class OParameterContinuation : public OInteraction< XInteractionSupplyParameters > { - Sequence< PropertyValue > m_aValues; + Sequence< PropertyValue > m_aValues; public: OParameterContinuation() { } - Sequence< PropertyValue > getValues() const { return m_aValues; } + Sequence< PropertyValue > getValues() const { return m_aValues; } // XInteractionSupplyParameters virtual void SAL_CALL setParameters( const Sequence< PropertyValue >& _rValues ) throw(RuntimeException); @@ -172,8 +172,8 @@ class SbaXDataBrowserController::FormControllerImpl ::com::sun::star::frame::XFrameActionListener > { friend class SbaXDataBrowserController; - ::cppu::OInterfaceContainerHelper m_aActivateListeners; - SbaXDataBrowserController* m_pOwner; + ::cppu::OInterfaceContainerHelper m_aActivateListeners; + SbaXDataBrowserController* m_pOwner; public: FormControllerImpl(SbaXDataBrowserController* pOwner); @@ -241,7 +241,7 @@ public: // XTabController, base of XFormController virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > & Model) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & _Container) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > SAL_CALL getContainer(void) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > > SAL_CALL getControls(void) throw( ::com::sun::star::uno::RuntimeException ); @@ -579,7 +579,7 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::disposing(const ::c //= SbaXDataBrowserController //================================================================== //------------------------------------------------------------------ -Sequence< Type > SAL_CALL SbaXDataBrowserController::getTypes( ) throw (RuntimeException) +Sequence< Type > SAL_CALL SbaXDataBrowserController::getTypes( ) throw (RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::getTypes" ); return ::comphelper::concatSequences( @@ -657,7 +657,7 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun SbaXDataBrowserController::~SbaXDataBrowserController() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::~SbaXDataBrowserController" ); - // deleteView(); + // deleteView(); // release the aggregated form controller if (m_xFormControllerImpl.is()) { @@ -674,7 +674,7 @@ void SbaXDataBrowserController::startFrameListening( const Reference< XFrame >& RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::startFrameListening" ); SbaXDataBrowserController_Base::startFrameListening( _rxFrame ); - Reference< XFrameActionListener > xAggListener; + Reference< XFrameActionListener > xAggListener; if ( m_xFormControllerImpl.is() ) m_xFormControllerImpl->queryAggregation( XFrameActionListener::static_type() ) >>= xAggListener; @@ -688,7 +688,7 @@ void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::stopFrameListening" ); SbaXDataBrowserController_Base::stopFrameListening( _rxFrame ); - Reference< XFrameActionListener > xAggListener; + Reference< XFrameActionListener > xAggListener; if ( m_xFormControllerImpl.is() ) m_xFormControllerImpl->queryAggregation( XFrameActionListener::static_type() ) >>= xAggListener; @@ -855,7 +855,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) if (!bSuccess) { - // deleteView(); + // deleteView(); return sal_False; } @@ -900,7 +900,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) if (m_xLoadable.is()) m_xLoadable->addLoadListener(this); - Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(getRowSet(), UNO_QUERY); + Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(getRowSet(), UNO_QUERY); if (xFormParameter.is()) xFormParameter->addParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); @@ -997,7 +997,7 @@ void SbaXDataBrowserController::addControlListeners(const Reference< ::com::sun: xBroadcaster->addModifyListener(static_cast<XModifyListener*>(this)); // introduce ourself as dispatch provider for the grid - Reference< XDispatchProviderInterception > xInterception(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< XDispatchProviderInterception > xInterception(getBrowserView()->getGridControl(), UNO_QUERY); if (xInterception.is()) xInterception->registerDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this)); @@ -1015,7 +1015,7 @@ void SbaXDataBrowserController::removeControlListeners(const Reference< ::com::s if (xBroadcaster.is()) xBroadcaster->removeModifyListener(static_cast<XModifyListener*>(this)); - Reference< XDispatchProviderInterception > xInterception(_xGridControl, UNO_QUERY); + Reference< XDispatchProviderInterception > xInterception(_xGridControl, UNO_QUERY); if (xInterception.is()) xInterception->releaseDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this)); @@ -1108,7 +1108,7 @@ void SbaXDataBrowserController::disposingFormModel(const ::com::sun::star::lang: if (m_xLoadable.is()) m_xLoadable->removeLoadListener(this); - Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(Source.Source, UNO_QUERY); + Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(Source.Source, UNO_QUERY); if (xFormParameter.is()) xFormParameter->removeParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); } @@ -1187,16 +1187,16 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t SolarMutexGuard aGuard; // the IsModified changed to sal_False ? - if ( (evt.PropertyName.equals(PROPERTY_ISMODIFIED)) - && (::comphelper::getBOOL(evt.NewValue) == sal_False) + if ( (evt.PropertyName.equals(PROPERTY_ISMODIFIED)) + && (::comphelper::getBOOL(evt.NewValue) == sal_False) ) - { // -> the current field isn't modified anymore, too + { // -> the current field isn't modified anymore, too setCurrentModified( sal_False ); } // switching to a new record ? - if ( (evt.PropertyName.equals(PROPERTY_ISNEW)) - && (::comphelper::getBOOL(evt.NewValue) == sal_True) + if ( (evt.PropertyName.equals(PROPERTY_ISNEW)) + && (::comphelper::getBOOL(evt.NewValue) == sal_True) ) { if (::comphelper::getINT32(xSource->getPropertyValue(PROPERTY_ROWCOUNT)) == 0) @@ -1205,7 +1205,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t InvalidateAll(); } - + // the filter or the sort criterias have changed ? -> update our parser if (evt.PropertyName.equals(PROPERTY_ACTIVECOMMAND)) { @@ -1216,7 +1216,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t { // if ( m_xParser.is() && m_xParser->getFilter() != ::comphelper::getString(evt.NewValue)) //{ - // DO_SAFE( m_xParser->setFilter(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" ); + // DO_SAFE( m_xParser->setFilter(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" ); //} InvalidateFeature(ID_BROWSER_REMOVEFILTER); } @@ -1224,7 +1224,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t { //if ( m_xParser.is() && m_xParser->getHavingClause() != ::comphelper::getString(evt.NewValue)) //{ - // DO_SAFE( m_xParser->setHavingClause(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" ); + // DO_SAFE( m_xParser->setHavingClause(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" ); //} InvalidateFeature(ID_BROWSER_REMOVEFILTER); } @@ -1232,7 +1232,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t { //if ( m_xParser.is() && m_xParser->getOrder() != ::comphelper::getString(evt.NewValue)) //{ - // DO_SAFE( m_xParser->setOrder(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new order to my parser !" ); + // DO_SAFE( m_xParser->setOrder(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new order to my parser !" ); //} InvalidateFeature(ID_BROWSER_REMOVEFILTER); } @@ -1332,7 +1332,7 @@ void SbaXDataBrowserController::disposing() if (m_xLoadable.is()) m_xLoadable->removeLoadListener(this); - Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(getRowSet(), UNO_QUERY); + Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(getRowSet(), UNO_QUERY); if (xFormParameter.is()) xFormParameter->removeParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); @@ -1361,9 +1361,9 @@ void SbaXDataBrowserController::disposing() { ::comphelper::disposeComponent(m_xRowSet); - m_xRowSet = NULL; - m_xColumnsSupplier = NULL; - m_xLoadable = NULL; + m_xRowSet = NULL; + m_xColumnsSupplier = NULL; + m_xLoadable = NULL; } catch(Exception&) { @@ -1454,7 +1454,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for return sal_True; } - Reference< ::com::sun::star::container::XIndexAccess > xParameters = aEvent.Parameters; + Reference< ::com::sun::star::container::XIndexAccess > xParameters = aEvent.Parameters; SolarMutexGuard aSolarGuard; // this may be executed in a non-main thread and we want to use vcl ... Window* pParent = Application::GetDefDialogParent(); @@ -1486,7 +1486,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for xHandler->handle(xParamRequest); if (!pParamValues->wasSelected()) - { // canceled + { // canceled setLoadingCancelled(); return sal_False; } @@ -1581,7 +1581,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const } // no chance without valid models if (isValid() && !isValidCursor()) - return aReturn; + return aReturn; switch (nId) { @@ -1638,9 +1638,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const break; } // run through - case ID_BROWSER_PASTE: + case ID_BROWSER_PASTE: case ID_BROWSER_CUT: - { + { CellControllerRef xCurrentController = getBrowserView()->getVclControl()->Controller(); if (xCurrentController.Is() && xCurrentController->ISA(EditCellController)) { @@ -1649,8 +1649,8 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const sal_Bool bIsReadOnly = rEdit.IsReadOnly(); switch (nId) { - case ID_BROWSER_CUT: aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen && !bIsReadOnly; break; - case SID_COPY : aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen; break; + case ID_BROWSER_CUT: aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen && !bIsReadOnly; break; + case SID_COPY : aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen; break; case ID_BROWSER_PASTE: aReturn.bEnabled = m_aCurrentFrame.isActive() && !bIsReadOnly; if(aReturn.bEnabled) @@ -1710,7 +1710,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const break; case ID_BROWSER_REDO: - aReturn.bEnabled = sal_False; // simply forget it ;). no redo possible. + aReturn.bEnabled = sal_False; // simply forget it ;). no redo possible. break; case ID_BROWSER_UNDORECORD: @@ -1733,17 +1733,17 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const // check if it is available Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); if (!xDataSourceSet.is()) - break; // no datasource -> no edit mode + break; // no datasource -> no edit mode sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES)); sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowInserts"))); sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowUpdates"))); sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowDeletes"))); if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible) - break; // no insert/update/delete -> no edit mode + break; // no insert/update/delete -> no edit mode if (!isValidCursor() || !isLoaded()) - break; // no cursor -> no edit mode + break; // no cursor -> no edit mode aReturn.bEnabled = sal_True; @@ -1968,10 +1968,10 @@ void SbaXDataBrowserController::ExecuteSearch() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::ExecuteSearch" ); // calculate the control source of the active field - Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); DBG_ASSERT(xGrid.is(), "SbaXDataBrowserController::ExecuteSearch : the control should have an ::com::sun::star::form::XGrid interface !"); - Reference< ::com::sun::star::form::XGridPeer > xGridPeer(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY); + Reference< ::com::sun::star::form::XGridPeer > xGridPeer(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY); Reference< ::com::sun::star::container::XIndexContainer > xColumns = xGridPeer->getColumns(); DBG_ASSERT(xGridPeer.is() && xColumns.is(), "SbaXDataBrowserController::ExecuteSearch : invalid peer !"); @@ -1983,7 +1983,7 @@ void SbaXDataBrowserController::ExecuteSearch() // the text within the current cell String sInitialText; - Reference< ::com::sun::star::container::XIndexAccess > xColControls(xGridPeer, UNO_QUERY); + Reference< ::com::sun::star::container::XIndexAccess > xColControls(xGridPeer, UNO_QUERY); Reference< XInterface > xCurControl(xColControls->getByIndex(nViewCol),UNO_QUERY); ::rtl::OUString aInitialText; if (IsSearchableControl(xCurControl, &aInitialText)) @@ -2051,7 +2051,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property } break; case SID_FM_DELETEROWS: - + if (SaveModified()) { SbaGridControl* pVclGrid = getBrowserView()->getVclControl(); @@ -2126,8 +2126,8 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property switch (nId) { case ID_BROWSER_CUT : rEdit.Cut(); break; - case SID_COPY : rEdit.Copy(); break; - case ID_BROWSER_PASTE : rEdit.Paste(); break; + case SID_COPY : rEdit.Copy(); break; + case ID_BROWSER_PASTE : rEdit.Paste(); break; } if (ID_BROWSER_CUT == nId || ID_BROWSER_PASTE == nId) { @@ -2359,7 +2359,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) } } - if ( !CommitCurrent() ) // das aktuelle Control committen lassen + if ( !CommitCurrent() ) // das aktuelle Control committen lassen return sal_False; Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); @@ -2398,7 +2398,7 @@ sal_Bool SbaXDataBrowserController::CommitCurrent() return sal_True; Reference< ::com::sun::star::awt::XControl > xActiveControl(getBrowserView()->getGridControl()); - Reference< ::com::sun::star::form::XBoundControl > xLockingTest(xActiveControl, UNO_QUERY); + Reference< ::com::sun::star::form::XBoundControl > xLockingTest(xActiveControl, UNO_QUERY); sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock(); if (xActiveControl.is() && !bControlIsLocked) { @@ -2498,7 +2498,7 @@ Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 n // get the current column from the grid if (nViewPos == (sal_uInt16)-1) { - Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); if (!xGrid.is()) return xEmptyReturn; nViewPos = xGrid->getCurrentColumnPosition(); @@ -2520,10 +2520,10 @@ Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 n //------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, pContext) { - Reference< ::com::sun::star::container::XIndexAccess > xPeerContainer(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< ::com::sun::star::container::XIndexAccess > xPeerContainer(getBrowserView()->getGridControl(), UNO_QUERY); // check all grid columns for their control source - Reference< ::com::sun::star::container::XIndexAccess > xModelColumns(getFormComponent(), UNO_QUERY); + Reference< ::com::sun::star::container::XIndexAccess > xModelColumns(getFormComponent(), UNO_QUERY); DBG_ASSERT(xModelColumns.is(), "SbaXDataBrowserController::OnSearchContextRequest : there is a grid control without columns !"); // the case 'no columns' should be indicated with an empty container, I think ... DBG_ASSERT(xModelColumns->getCount() >= xPeerContainer->getCount(), "SbaXDataBrowserController::OnSearchContextRequest : impossible : have more view than model columns !"); @@ -2582,7 +2582,7 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), aOld); // and move to the field - Reference< ::com::sun::star::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY); + Reference< ::com::sun::star::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY); sal_uInt16 nViewPos; for ( nViewPos = 0; nViewPos < aColumnControls->getCount(); ++nViewPos ) @@ -2597,7 +2597,7 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn } } - Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); xGrid->setCurrentColumnPosition(nViewPos); return 0; @@ -2679,7 +2679,7 @@ void SbaXDataBrowserController::LoadFinished(sal_Bool /*bWasSynch*/) { DBG_UNHANDLED_EXCEPTION(); } - + // -------------------------------- // switch the control to alive mode getBrowserView()->getGridControl()->setDesignMode(sal_False); @@ -2705,7 +2705,7 @@ void SbaXDataBrowserController::initializeParser() const { const Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING))) - { // (only if the statement isn't native) + { // (only if the statement isn't native) // (it is allowed to use the PROPERTY_ISPASSTHROUGH : _after_ loading a form it is valid) xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser; /* @@ -2738,7 +2738,7 @@ void SbaXDataBrowserController::loaded(const EventObject& /*aEvent*/) throw( Run { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::loaded" ); // not interested in - // we're loading within an separate thread and have a handling for it's "finished event" + // we're loading within an separate thread and have a handling for it's "finished event" } //------------------------------------------------------------------------------ @@ -2850,11 +2850,11 @@ class LoadFormHelper :public ::cppu::WeakImplHelper2< ::com::sun::star::form::XL XRowSetListener> { enum STATE { STARTED, LOADED, POSITIONED, DISPOSED }; - STATE m_eState; + STATE m_eState; - Reference< XRowSet > m_xForm; + Reference< XRowSet > m_xForm; - ::osl::Mutex m_aAccessSafety; + ::osl::Mutex m_aAccessSafety; public: LoadFormHelper(const Reference< XRowSet > & _rxForm); @@ -3017,7 +3017,7 @@ bool LoadFormHelper::WaitUntilReallyLoaded(bool _bOnlyIfLoaded) sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::getCurrentColumnPosition" ); - Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); sal_Int16 nViewPos = -1; try { @@ -3031,7 +3031,7 @@ sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() void SbaXDataBrowserController::setCurrentColumnPosition( sal_Int16 _nPos ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::setCurrentColumnPosition" ); - Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); + Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY); try { if ( -1 != _nPos ) @@ -3078,7 +3078,7 @@ sal_Bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com:: return sal_True; } //.................................................................. -} // namespace dbaui +} // namespace dbaui //.................................................................. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index 6929a9ee162b..47881727c6dd 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,17 +47,17 @@ using namespace dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::form; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -namespace +namespace { sal_Bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView) { - sal_Bool bGrabFocus = sal_False; + sal_Bool bGrabFocus = sal_False; SbaGridControl* pVclControl = _pView->getVclControl(); Reference< ::com::sun::star::awt::XControl > xGrid = _pView->getGridControl(); if (pVclControl && xGrid.is()) @@ -81,7 +81,7 @@ namespace DBG_NAME(UnoDataBrowserView) // ------------------------------------------------------------------------- -UnoDataBrowserView::UnoDataBrowserView( Window* pParent, +UnoDataBrowserView::UnoDataBrowserView( Window* pParent, IController& _rController, const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rFactory) :ODataView(pParent,_rController,_rFactory) @@ -121,7 +121,7 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont // get the VCL-control m_pVclControl = NULL; - getVclControl(); + getVclControl(); DBG_ASSERT(m_pVclControl != NULL, "UnoDataBrowserView::Construct : no real grid control !"); } @@ -139,7 +139,7 @@ UnoDataBrowserView::~UnoDataBrowserView() m_pSplitter = NULL; } setTreeView(NULL); - + if ( m_pStatus ) { delete m_pStatus; @@ -215,17 +215,17 @@ void UnoDataBrowserView::hideStatus() // ------------------------------------------------------------------------- void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) { - Point aSplitPos; - Size aSplitSize; - Point aPlaygroundPos( _rPlayground.TopLeft() ); - Size aPlaygroundSize( _rPlayground.GetSize() ); + Point aSplitPos; + Size aSplitSize; + Point aPlaygroundPos( _rPlayground.TopLeft() ); + Size aPlaygroundSize( _rPlayground.GetSize() ); if (m_pTreeView && m_pTreeView->IsVisible() && m_pSplitter) { // calculate the splitter pos and size - aSplitPos = m_pSplitter->GetPosPixel(); + aSplitPos = m_pSplitter->GetPosPixel(); aSplitPos.Y() = aPlaygroundPos.Y(); - aSplitSize = m_pSplitter->GetOutputSizePixel(); + aSplitSize = m_pSplitter->GetOutputSizePixel(); aSplitSize.Height() = aPlaygroundSize.Height(); if( ( aSplitPos.X() + aSplitSize.Width() ) > ( aPlaygroundSize.Width() )) @@ -235,8 +235,8 @@ void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) aSplitPos.X() = aPlaygroundPos.X() + sal_Int32(aPlaygroundSize.Width() * 0.2); // the tree pos and size - Point aTreeViewPos( aPlaygroundPos ); - Size aTreeViewSize( aSplitPos.X(), aPlaygroundSize.Height() ); + Point aTreeViewPos( aPlaygroundPos ); + Size aTreeViewSize( aSplitPos.X(), aPlaygroundSize.Height() ); // the status pos and size if (m_pStatus && m_pStatus->IsVisible()) @@ -249,7 +249,7 @@ void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) m_pStatus->SetPosSizePixel( aStatusPos, aStatusSize ); aTreeViewSize.Height() -= aStatusSize.Height(); } - + // set the size of treelistbox m_pTreeView->SetPosSizePixel( aTreeViewPos, aTreeViewSize ); @@ -276,8 +276,8 @@ sal_uInt16 UnoDataBrowserView::View2ModelPos(sal_uInt16 nPos) const } // ----------------------------------------------------------------------------- -SbaGridControl* UnoDataBrowserView::getVclControl() const -{ +SbaGridControl* UnoDataBrowserView::getVclControl() const +{ if ( !m_pVclControl ) { OSL_ENSURE(m_xGrid.is(),"Grid not set!"); @@ -296,7 +296,7 @@ SbaGridControl* UnoDataBrowserView::getVclControl() const } } } - return m_pVclControl; + return m_pVclControl; } // ----------------------------------------------------------------------------- void UnoDataBrowserView::GetFocus() diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index c0e3157bfb75..71d7e95a1bfc 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ namespace dbaui class ColorChanger { protected: - OutputDevice* m_pDev; + OutputDevice* m_pDev; public: ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor ) @@ -77,9 +77,9 @@ namespace dbaui DBG_NAME(ODataView) // ------------------------------------------------------------------------- - ODataView::ODataView( Window* pParent, + ODataView::ODataView( Window* pParent, IController& _rController, - const Reference< XMultiServiceFactory >& _rFactory, + const Reference< XMultiServiceFactory >& _rFactory, WinBits nStyle) :Window(pParent,nStyle) ,m_xServiceFactory(_rFactory) @@ -102,7 +102,7 @@ namespace dbaui DBG_DTOR(ODataView,NULL); enableSeparator( sal_False ); - m_rController.release(); + m_rController.release(); } // ------------------------------------------------------------------------- @@ -176,7 +176,7 @@ namespace dbaui { case EVENT_KEYINPUT: { - const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); + const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); const KeyCode& aKeyCode = pKeyEvent->GetKeyCode(); if ( m_pAccel.get() && m_pAccel->execute( aKeyCode ) ) // the accelerator consumed the event diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 21b4fc2d2172..fb834691c963 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ namespace dbaui using namespace ::com::sun::star::datatransfer; using namespace ::svx; - namespace + namespace { template<class T > void lcl_setListener(const Reference<T>& _xComponent, const Reference< XEventListener >& i_rListener, const bool i_bAdd ) { @@ -69,12 +69,12 @@ namespace dbaui i_bAdd ? xCom->addEventListener( i_rListener ) : xCom->removeEventListener( i_rListener ); } } - + // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( - const ::rtl::OUString& _rDatasource, - const sal_Int32 _nCommandType, - const ::rtl::OUString& _rCommand, + const ::rtl::OUString& _rDatasource, + const sal_Int32 _nCommandType, + const ::rtl::OUString& _rCommand, const Reference< XConnection >& _rxConnection, const Reference< XNumberFormatter >& _rxFormatter, const Reference< XMultiServiceFactory >& _rxORB) @@ -93,9 +93,9 @@ namespace dbaui // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( - const ::rtl::OUString& _rDatasource, - const sal_Int32 _nCommandType, - const ::rtl::OUString& _rCommand, + const ::rtl::OUString& _rDatasource, + const sal_Int32 _nCommandType, + const ::rtl::OUString& _rCommand, const Reference< XNumberFormatter >& _rxFormatter, const Reference< XMultiServiceFactory >& _rxORB) :ODataAccessObjectTransferable( _rDatasource, ::rtl::OUString(),_nCommandType, _rCommand) @@ -107,7 +107,7 @@ namespace dbaui } // ----------------------------------------------------------------------------- - ODataClipboard::ODataClipboard( const Reference< XPropertySet >& i_rAliveForm, + ODataClipboard::ODataClipboard( const Reference< XPropertySet >& i_rAliveForm, const Sequence< Any >& i_rSelectedRows, const sal_Bool i_bBookmarkSelection, const Reference< XMultiServiceFactory >& i_rORB ) @@ -118,7 +118,7 @@ namespace dbaui OSL_PRECOND( i_rORB.is(), "ODataClipboard::ODataClipboard: having no factory is not good ..." ); osl_incrementInterlockedCount( &m_refCount ); - + Reference<XConnection> xConnection; getDescriptor()[ daConnection ] >>= xConnection; lcl_setListener( xConnection, this, true ); @@ -132,8 +132,8 @@ namespace dbaui OSL_ENSURE( xResultSetClone.is(), "ODataClipboard::ODataClipboard: could not clone the form's result set" ); lcl_setListener( xResultSetClone, this, true ); - getDescriptor()[daCursor] <<= xResultSetClone; - getDescriptor()[daSelection] <<= i_rSelectedRows; + getDescriptor()[daCursor] <<= xResultSetClone; + getDescriptor()[daSelection] <<= i_rSelectedRows; getDescriptor()[daBookmarkSelection]<<= i_bBookmarkSelection; addCompatibleSelectionDescription( i_rSelectedRows ); diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index bb4ae9b35b28..2bdcd5b0920f 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,22 +76,22 @@ using namespace dbaui; class DBContentLoader : public ::cppu::WeakImplHelper2< XFrameLoader, XServiceInfo> { private: - ::rtl::OUString m_aURL; - Sequence< PropertyValue> m_aArgs; - Reference< XLoadEventListener > m_xListener; - Reference< XFrame > m_xFrame; - Reference< XMultiServiceFactory > m_xServiceFactory; + ::rtl::OUString m_aURL; + Sequence< PropertyValue> m_aArgs; + Reference< XLoadEventListener > m_xListener; + Reference< XFrame > m_xFrame; + Reference< XMultiServiceFactory > m_xServiceFactory; public: DBContentLoader(const Reference< XMultiServiceFactory >&); ~DBContentLoader(); // XServiceInfo - ::rtl::OUString SAL_CALL getImplementationName() throw( ); - sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ); - Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ); + ::rtl::OUString SAL_CALL getImplementationName() throw( ); + sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ); + Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ); // static methods - static ::rtl::OUString getImplementationName_Static() throw( ) + static ::rtl::OUString getImplementationName_Static() throw( ) { return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.DBContentLoader"); } @@ -100,7 +100,7 @@ public: SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); // XLoader - virtual void SAL_CALL load( const Reference< XFrame > & _rFrame, const ::rtl::OUString& _rURL, + virtual void SAL_CALL load( const Reference< XFrame > & _rFrame, const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArgs, const Reference< XLoadEventListener > & _rListener) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL cancel(void) throw(); @@ -143,8 +143,8 @@ Reference< XInterface > SAL_CALL DBContentLoader::Create( const Reference< XMult sal_Bool SAL_CALL DBContentLoader::supportsService(const ::rtl::OUString& ServiceName) throw( ) { Sequence< ::rtl::OUString > aSNL = getSupportedServiceNames(); - const ::rtl::OUString * pBegin = aSNL.getConstArray(); - const ::rtl::OUString * pEnd = pBegin + aSNL.getLength(); + const ::rtl::OUString * pBegin = aSNL.getConstArray(); + const ::rtl::OUString * pEnd = pBegin + aSNL.getLength(); for( ; pBegin != pEnd; ++pBegin) if( *pBegin == ServiceName ) return sal_True; @@ -189,10 +189,10 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: const Sequence< PropertyValue >& rArgs, const Reference< XLoadEventListener > & rListener) throw(::com::sun::star::uno::RuntimeException) { - m_xFrame = rFrame; + m_xFrame = rFrame; m_xListener = rListener; - m_aURL = rURL; - m_aArgs = rArgs; + m_aURL = rURL; + m_aArgs = rArgs; ::comphelper::ComponentContext aContext( m_xServiceFactory ); @@ -311,9 +311,9 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: Sequence< Any > aInitArgs(m_aArgs.getLength()+1); Any* pBegin = aInitArgs.getArray(); - Any* pEnd = pBegin + aInitArgs.getLength(); + Any* pEnd = pBegin + aInitArgs.getLength(); *pBegin <<= aFrame; - const PropertyValue* pIter = m_aArgs.getConstArray(); + const PropertyValue* pIter = m_aArgs.getConstArray(); for(++pBegin;pBegin != pEnd;++pBegin,++pIter) { *pBegin <<= *pIter; diff --git a/dbaccess/source/ui/browser/dbtreemodel.cxx b/dbaccess/source/ui/browser/dbtreemodel.cxx index c2975b9d8314..e2a94aa672ef 100644 --- a/dbaccess/source/ui/browser/dbtreemodel.cxx +++ b/dbaccess/source/ui/browser/dbtreemodel.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/browser/dbtreemodel.hxx b/dbaccess/source/ui/browser/dbtreemodel.hxx index b0afe70a5fe1..c28e5aa6f475 100644 --- a/dbaccess/source/ui/browser/dbtreemodel.hxx +++ b/dbaccess/source/ui/browser/dbtreemodel.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,12 +38,12 @@ // syntax of the tree userdata // datasource holds the connection // queries holds the nameaccess for the queries -// query holds the query -// tables holds the nameaccess for the tables -// table holds the table +// query holds the query +// tables holds the nameaccess for the tables +// table holds the table -#define CONTAINER_QUERIES ULONG( 0 ) -#define CONTAINER_TABLES ULONG( 1 ) +#define CONTAINER_QUERIES ULONG( 0 ) +#define CONTAINER_TABLES ULONG( 1 ) namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } } @@ -59,7 +59,7 @@ namespace dbaui xContainer; /// if the entry denotes a data source, this is the connection for this data source (if already connection) SharedConnection xConnection; - SbaTableQueryBrowser::EntryType eType; + SbaTableQueryBrowser::EntryType eType; String sAccessor; DBTreeListUserData(); diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index b69c67bc4bee..967df21722df 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,8 +47,8 @@ DBG_NAME(DBTreeView) //======================================================================== // class DBTreeView //======================================================================== -DBTreeView::DBTreeView( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nBits) - : Window( pParent, nBits ) +DBTreeView::DBTreeView( Window* pParent, const Reference< XMultiServiceFactory >& _rxORB, WinBits nBits) + : Window( pParent, nBits ) , m_pTreeListBox(NULL) { DBG_CTOR(DBTreeView,NULL); @@ -62,7 +62,7 @@ DBTreeView::DBTreeView( Window* pParent, const Reference< XMultiServiceFactory > } // ----------------------------------------------------------------------------- - + DBTreeView::~DBTreeView() { DBG_DTOR(DBTreeView,NULL); @@ -85,7 +85,7 @@ void DBTreeView::SetPreExpandHandler(const Link& _rHdl) } // ----------------------------------------------------------------------------- -void DBTreeView::setCopyHandler(const Link& _rHdl) +void DBTreeView::setCopyHandler(const Link& _rHdl) { m_pTreeListBox->setCopyHandler(_rHdl); } @@ -118,7 +118,7 @@ void DBTreeView::GetFocus() // ......................................................................... -} // namespace dbaui +} // namespace dbaui // ......................................................................... diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx index 2cba0dd10b08..7bcddc2ef32c 100644 --- a/dbaccess/source/ui/browser/dbtreeview.hxx +++ b/dbaccess/source/ui/browser/dbtreeview.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,12 +45,12 @@ namespace dbaui class DBTreeView : public Window { private: - DBTreeListBox* m_pTreeListBox; + DBTreeListBox* m_pTreeListBox; protected: // window overridables virtual void Resize(); - public: - + public: + DBTreeView( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, WinBits nBits ); @@ -60,16 +60,16 @@ namespace dbaui <p>When calling the link, the parameter is an SvLBoxEntry marking the entry to be expanded. </p> */ - void SetPreExpandHandler(const Link& _rHdl); + void SetPreExpandHandler(const Link& _rHdl); /// gets the currently set NodeExpansionHandler - void setCopyHandler(const Link& _rHdl); + void setCopyHandler(const Link& _rHdl); - void setModel(SvLBoxTreeList* _pTreeModel); - void setSelChangeHdl(const Link& _rHdl); + void setModel(SvLBoxTreeList* _pTreeModel); + void setSelChangeHdl(const Link& _rHdl); - DBTreeListBox& getListBox() const { return *m_pTreeListBox; } + DBTreeListBox& getListBox() const { return *m_pTreeListBox; } virtual void GetFocus(); }; diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index 26c7860a474e..5ef1ceabcb20 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ namespace dbaui { // ......................................................................... // ----------------------------------------------------------------------------- -SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry ) const +SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry ) const { DBG_ASSERT(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!"); switch (getEntryType(_pEntry)) @@ -75,10 +75,10 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* if (!_pEntry) return etUnknown; - SvLBoxEntry* pRootEntry = m_pTreeView->getListBox().GetRootLevelParent(_pEntry); - SvLBoxEntry* pEntryParent = m_pTreeView->getListBox().GetParent(_pEntry); - SvLBoxEntry* pTables = m_pTreeView->getListBox().GetEntry(pRootEntry, CONTAINER_TABLES); - SvLBoxEntry* pQueries = m_pTreeView->getListBox().GetEntry(pRootEntry, CONTAINER_QUERIES); + SvLBoxEntry* pRootEntry = m_pTreeView->getListBox().GetRootLevelParent(_pEntry); + SvLBoxEntry* pEntryParent = m_pTreeView->getListBox().GetParent(_pEntry); + SvLBoxEntry* pTables = m_pTreeView->getListBox().GetEntry(pRootEntry, CONTAINER_TABLES); + SvLBoxEntry* pQueries = m_pTreeView->getListBox().GetEntry(pRootEntry, CONTAINER_QUERIES); #ifdef DBG_UTIL String sTest; @@ -269,7 +269,7 @@ void SbaTableQueryBrowser::notifyHiContrastChanged() } // ----------------------------------------------------------------------------- // ......................................................................... -} // namespace dbaui +} // namespace dbaui // ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index 9497d08f5076..3e0452f6fd16 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -152,20 +152,20 @@ namespace dbaui m_nAsyncDrop = 0; m_aAsyncDrop.aDroppedData.clear(); - m_aAsyncDrop.nType = E_TABLE; - m_aAsyncDrop.nAction = _rEvt.mnAction; - m_aAsyncDrop.bError = sal_False; - m_aAsyncDrop.bHtml = sal_False; - m_aAsyncDrop.pDroppedAt = NULL; - m_aAsyncDrop.aUrl = ::rtl::OUString(); + m_aAsyncDrop.nType = E_TABLE; + m_aAsyncDrop.nAction = _rEvt.mnAction; + m_aAsyncDrop.bError = sal_False; + m_aAsyncDrop.bHtml = sal_False; + m_aAsyncDrop.pDroppedAt = NULL; + m_aAsyncDrop.aUrl = ::rtl::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()) ) { - m_aAsyncDrop.aDroppedData = ODataAccessObjectTransferable::extractObjectDescriptor(aDroppedData); - m_aAsyncDrop.pDroppedAt = pHitEntry; + m_aAsyncDrop.aDroppedData = ODataAccessObjectTransferable::extractObjectDescriptor(aDroppedData); + m_aAsyncDrop.pDroppedAt = pHitEntry; // asyncron because we some dialogs and we aren't allowed to show them while in D&D m_nAsyncDrop = Application::PostUserEvent(LINK(this, SbaTableQueryBrowser, OnAsyncDrop)); @@ -179,7 +179,7 @@ namespace dbaui && m_aTableCopyHelper.copyTagTable( aDroppedData, m_aAsyncDrop, xDestConnection ) ) { - m_aAsyncDrop.pDroppedAt = pHitEntry; + m_aAsyncDrop.pDroppedAt = pHitEntry; // asyncron because we some dialogs and we aren't allowed to show them while in D&D m_nAsyncDrop = Application::PostUserEvent(LINK(this, SbaTableQueryBrowser, OnAsyncDrop)); @@ -233,8 +233,8 @@ namespace dbaui TransferableHelper* pTransfer = NULL; Reference< XTransferable> aEnsureDelete; EntryType eType = getEntryType(_pEntry); - pTransfer = implCopyObject( _pEntry, eType == etQuery ? CommandType::QUERY : CommandType::TABLE); - aEnsureDelete = pTransfer; + pTransfer = implCopyObject( _pEntry, eType == etQuery ? CommandType::QUERY : CommandType::TABLE); + aEnsureDelete = pTransfer; if (pTransfer) pTransfer->CopyToClipboard(getView()); } @@ -291,7 +291,7 @@ namespace dbaui m_pCurrentlyDisplayed = NULL; } // ......................................................................... -} // namespace dbaui +} // namespace dbaui // ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 6526592112fc..8ae902785475 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -196,7 +196,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U // create the col Reference< ::com::sun::star::form::XGridColumnFactory > xColFactory(getControlModel(), UNO_QUERY); - Reference< ::com::sun::star::beans::XPropertySet > xNewCol = xColFactory->createColumn(sControlType); + Reference< ::com::sun::star::beans::XPropertySet > xNewCol = xColFactory->createColumn(sControlType); Reference< XPropertySetInfo > xNewColProperties; if (xNewCol.is()) xNewColProperties = xNewCol->getPropertySetInfo(); @@ -214,9 +214,9 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U catch(Exception&) { OSL_ENSURE(sal_False, - ( ByteString("SbaExternalSourceBrowser::dispatch : could not set a column property (") - += ByteString(pControlProps->Name.getStr(), (sal_uInt16)pControlProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US) - += ByteString(")!")).GetBuffer()); + ( ByteString("SbaExternalSourceBrowser::dispatch : could not set a column property (") + += ByteString(pControlProps->Name.getStr(), (sal_uInt16)pControlProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US) + += ByteString(")!")).GetBuffer()); } } } @@ -272,22 +272,22 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows m_bInQueryDispatch = sal_True; - if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AttachToForm"))) + if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AttachToForm"))) // attach a new external form - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AddGridColumn"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AddGridColumn"))) // add a column to the grid - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/ClearView"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/ClearView"))) // clear the grid ) xReturn = (::com::sun::star::frame::XDispatch*)this; - if ( !xReturn.is() - && ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToFirst"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToPrev"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNext"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToLast"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNew"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/undoRecord"))) + if ( !xReturn.is() + && ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToFirst"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToPrev"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNext"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToLast"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNew"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/undoRecord"))) ) ) { @@ -361,8 +361,8 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) { Any aOldPos; sal_Bool bWasInsertRow = sal_False; - sal_Bool bBeforeFirst = sal_True; - sal_Bool bAfterLast = sal_True; + sal_Bool bBeforeFirst = sal_True; + sal_Bool bAfterLast = sal_True; Reference< XResultSet > xResultSet(xMaster, UNO_QUERY); Reference< XRowLocate > xCursor(xMaster, UNO_QUERY); Reference< XPropertySet > xMasterProps(xMaster, UNO_QUERY); @@ -378,7 +378,7 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) if (xCursor.is() && xResultSet.is()) { bBeforeFirst = xResultSet->isBeforeFirst(); - bAfterLast = xResultSet->isAfterLast(); + bAfterLast = xResultSet->isAfterLast(); if(!bBeforeFirst && !bAfterLast) aOldPos = xCursor->getBookmark(); } @@ -460,7 +460,7 @@ void SbaExternalSourceBrowser::startListening() { if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) { - Reference< ::com::sun::star::form::XLoadable > xLoadable(m_pDataSourceImpl->getAttachedForm(), UNO_QUERY); + Reference< ::com::sun::star::form::XLoadable > xLoadable(m_pDataSourceImpl->getAttachedForm(), UNO_QUERY); xLoadable->addLoadListener((::com::sun::star::form::XLoadListener*)this); } } @@ -470,7 +470,7 @@ void SbaExternalSourceBrowser::stopListening() { if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) { - Reference< ::com::sun::star::form::XLoadable > xLoadable(m_pDataSourceImpl->getAttachedForm(), UNO_QUERY); + Reference< ::com::sun::star::form::XLoadable > xLoadable(m_pDataSourceImpl->getAttachedForm(), UNO_QUERY); xLoadable->removeLoadListener((::com::sun::star::form::XLoadListener*)this); } } diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 2a02d3827f56..70fb1adf9071 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1151,7 +1151,7 @@ void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException ) m_aContainerListeners.disposeAndClear(aEvt); // dispose all childs - for ( ::std::vector< Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = m_aChildren.begin(); + for ( ::std::vector< Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = m_aChildren.begin(); aIter != m_aChildren.end(); ++aIter ) @@ -1520,7 +1520,7 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const :: // ------------------------------------------------------------------------- sal_Int32 SbaXFormAdapter::implGetPos(const ::rtl::OUString& rName) { - ::std::vector< ::rtl::OUString>::iterator aIter = ::std::find_if( m_aChildNames.begin(), + ::std::vector< ::rtl::OUString>::iterator aIter = ::std::find_if( m_aChildNames.begin(), m_aChildNames.end(), ::std::bind2nd(::std::equal_to< rtl::OUString>(),rName)); @@ -1743,7 +1743,7 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::Pro { if (evt.PropertyName.equals(PROPERTY_NAME)) { - ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = ::std::find_if( m_aChildren.begin(), + ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = ::std::find_if( m_aChildren.begin(), m_aChildren.end(), ::std::bind2nd(::std::equal_to< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >(),evt.Source)); @@ -1764,7 +1764,7 @@ void SAL_CALL SbaXFormAdapter::disposing(const ::com::sun::star::lang::EventObje if (Source.Source == m_xMainForm) dispose(); - ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = ::std::find_if( m_aChildren.begin(), + ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = ::std::find_if( m_aChildren.begin(), m_aChildren.end(), ::std::bind2nd(::std::equal_to< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >(),Source.Source)); if(aIter != m_aChildren.end()) diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 6bac728cad62..c6451a13a55f 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -85,7 +85,7 @@ using namespace ::dbtools; using namespace ::comphelper; // ------------------------------------------------------------------------- -#define ALL_FEATURES -1 +#define ALL_FEATURES -1 #define FIRST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() - 1000 ) #define LAST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() ) @@ -273,7 +273,7 @@ sal_Bool OGenericUnoController::Construct(Window* /*pParent*/) } if (!m_xDatabaseContext.is()) - { // at least notify the user. Though the whole component does not make any sense without the database context ... + { // at least notify the user. Though the whole component does not make any sense without the database context ... ShowServiceNotAvailableError(getView(), String(SERVICE_SDB_DATABASECONTEXT), sal_True); } return sal_True; @@ -295,12 +295,12 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - Reference< XWindow > xParent; + Reference< XWindow > xParent; Reference< XFrame > xFrame; PropertyValue aValue; - const Any* pIter = aArguments.getConstArray(); - const Any* pEnd = pIter + aArguments.getLength(); + const Any* pIter = aArguments.getConstArray(); + const Any* pEnd = pIter + aArguments.getLength(); for ( ; pIter != pEnd; ++pIter ) { @@ -503,7 +503,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF sal_uInt16 nFeat = m_aSupportedFeatures[ _rFeature ].nFeatureId; FeatureState aFeatState( GetState( nFeat ) ); - FeatureState& rCachedState = m_aStateCache[nFeat]; // creates if neccessary + FeatureState& rCachedState = m_aStateCache[nFeat]; // creates if neccessary if ( !_bIgnoreCache ) { // check if we really need to notify the listeners : this method may be called much more often than needed, so check @@ -523,8 +523,8 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF aEvent.FeatureURL.Complete = _rFeature; if (m_xUrlTransformer.is()) m_xUrlTransformer->parseStrict(aEvent.FeatureURL); - aEvent.Source = (XDispatch*)this; - aEvent.IsEnabled = aFeatState.bEnabled; + aEvent.Source = (XDispatch*)this; + aEvent.IsEnabled = aFeatState.bEnabled; // collect all states to be notified States aStates; @@ -534,7 +534,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF if ( xListener.is() ) lcl_notifyMultipleStates( *xListener.get(), aEvent, aStates ); else - { // no -> iterate through all listeners responsible for the URL + { // no -> iterate through all listeners responsible for the URL StringBag aFeatureCommands; ::std::for_each( m_aSupportedFeatures.begin(), @@ -692,7 +692,7 @@ void OGenericUnoController::InvalidateAll_Impl() } // ----------------------------------------------------------------------- -Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) +Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { Reference< XDispatch > xReturn; @@ -727,9 +727,9 @@ Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const if ( nLen ) { aReturn.realloc( nLen ); - Reference< XDispatch >* pReturn = aReturn.getArray(); - const Reference< XDispatch >* pReturnEnd = aReturn.getArray() + nLen; - const DispatchDescriptor* pDescripts = aDescripts.getConstArray(); + Reference< XDispatch >* pReturn = aReturn.getArray(); + const Reference< XDispatch >* pReturnEnd = aReturn.getArray() + nLen; + const DispatchDescriptor* pDescripts = aDescripts.getConstArray(); for ( ; pReturn != pReturnEnd; ++ pReturn, ++pDescripts ) { @@ -741,7 +741,7 @@ Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const } // ----------------------------------------------------------------------- -Reference< XDispatchProvider > OGenericUnoController::getSlaveDispatchProvider(void) throw( RuntimeException ) +Reference< XDispatchProvider > OGenericUnoController::getSlaveDispatchProvider(void) throw( RuntimeException ) { return m_xSlaveDispatcher; } @@ -753,7 +753,7 @@ void OGenericUnoController::setSlaveDispatchProvider(const Reference< XDispatchP } // ----------------------------------------------------------------------- -Reference< XDispatchProvider > OGenericUnoController::getMasterDispatchProvider(void) throw( RuntimeException ) +Reference< XDispatchProvider > OGenericUnoController::getMasterDispatchProvider(void) throw( RuntimeException ) { return m_xMasterDispatcher; } @@ -810,9 +810,9 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene while ( iterSearch != m_arrStatusListener.end() ) { DispatchTarget& rCurrent = *iterSearch; - if ( (rCurrent.xListener == aListener) - && ( bRemoveForAll - || (rCurrent.aURL.Complete.equals(_rURL.Complete)) + if ( (rCurrent.xListener == aListener) + && ( bRemoveForAll + || (rCurrent.aURL.Complete.equals(_rURL.Complete)) ) ) { @@ -831,7 +831,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find(_rURL.Complete); if (aIter != m_aSupportedFeatures.end()) - { // clear the cache for that feature + { // clear the cache for that feature StateCacheIterator aCachePos = m_aStateCache.find( aIter->second.nFeatureId ); if ( aCachePos != m_aStateCache.end() ) m_aStateCache.erase( aCachePos ); @@ -840,7 +840,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene // now remove the listener from the deque ::osl::MutexGuard aGuard( m_aFeatureMutex ); m_aFeaturesToInvalidate.erase( - ::std::remove_if( m_aFeaturesToInvalidate.begin(), + ::std::remove_if( m_aFeaturesToInvalidate.begin(), m_aFeaturesToInvalidate.end(), ::std::bind2nd(FindFeatureListener(),aListener)) ,m_aFeaturesToInvalidate.end()); @@ -1217,7 +1217,7 @@ namespace Reference< XServiceInfo > xSI( xModel, UNO_QUERY ); if ( !xSI.is() ) - { // try to go up the frame hierarchy + { // try to go up the frame hierarchy Reference< XFrame > xParentFrame; if ( _rxFrame.is() ) @@ -1243,7 +1243,7 @@ namespace static const sal_Char* pTransTable[] = { "com.sun.star.sdb.OfficeDatabaseDocument","sdatabase", "com.sun.star.report.ReportDefinition","sdatabase", - "com.sun.star.text.TextDocument", "swriter", + "com.sun.star.text.TextDocument", "swriter", "com.sun.star.sheet.SpreadsheetDocument", "scalc", "com.sun.star.presentation.PresentationDocument", "simpress", "com.sun.star.drawing.DrawingDocument", "sdraw", @@ -1260,7 +1260,7 @@ namespace for ( sal_Int32 j=0; j<nTableEntries; ++j ) { if ( xSI->supportsService( ::rtl::OUString::createFromAscii( *pDocumentService ) ) ) - { // found a table entry which matches the model's services + { // found a table entry which matches the model's services pReturn = *pHelpModuleName; break; } diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src index 747a2d7ac8cf..fc28c1de325f 100644 --- a/dbaccess/source/ui/browser/sbabrw.src +++ b/dbaccess/source/ui/browser/sbabrw.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ #ifndef DBACCESS_UI_BROWSER_ID_HXX #include "browserids.hxx" #endif -// #include <sfx2/sfx.hrc> +// #include <sfx2/sfx.hrc> #ifndef _GLOBLMN_HRC #include <svx/globlmn.hrc> #endif @@ -83,45 +83,45 @@ String RID_STR_TABLES_CONTAINER Text [ en-US ] = "Tables"; }; -#define MID_EDIT_DATABASE \ - Identifier = ID_TREE_EDIT_DATABASE ; \ - HelpId = HID_BROWSER_EDIT_DATABASE; \ +#define MID_EDIT_DATABASE \ + Identifier = ID_TREE_EDIT_DATABASE ; \ + HelpId = HID_BROWSER_EDIT_DATABASE; \ Text [ en-US ] = "Edit ~Database File..." ;\ -#define MID_ADMINISTRATE \ - Identifier = ID_TREE_ADMINISTRATE ; \ - HelpId = HID_BROWSER_ADMINISTRATE; \ +#define MID_ADMINISTRATE \ + Identifier = ID_TREE_ADMINISTRATE ; \ + HelpId = HID_BROWSER_ADMINISTRATE; \ Text [ en-US ] = "Registered databases ..." ;\ -#define MID_CLOSECONN \ - Identifier = ID_TREE_CLOSE_CONN ; \ - HelpId = HID_BROWSER_CLOSECONN ; \ - Text [ en-US ] = "Disco~nnect" ; \ +#define MID_CLOSECONN \ + Identifier = ID_TREE_CLOSE_CONN ; \ + HelpId = HID_BROWSER_CLOSECONN ; \ + Text [ en-US ] = "Disco~nnect" ; \ Menu MENU_BROWSER_DEFAULTCONTEXT { ItemList = { - MenuItem \ - { \ - MID_EDIT_DATABASE \ - }; \ - MenuItem \ - { \ - MID_CLOSECONN \ - }; \ - MenuItem \ - { \ - Separator = TRUE; \ + MenuItem \ + { \ + MID_EDIT_DATABASE \ + }; \ + MenuItem \ + { \ + MID_CLOSECONN \ + }; \ + MenuItem \ + { \ + Separator = TRUE; \ }; \ - MenuItem { ITEM_EDIT_COPY }; - MenuItem \ - { \ - Separator = TRUE; \ + MenuItem { ITEM_EDIT_COPY }; + MenuItem \ + { \ + Separator = TRUE; \ }; \ - MenuItem \ - { \ - MID_ADMINISTRATE \ + MenuItem \ + { \ + MID_ADMINISTRATE \ }; }; }; diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 1652ed46b094..62353cd5456b 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,11 +33,11 @@ #include <svx/svxids.hrc> -#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY -#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY -#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK -#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN -#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO +#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY +#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY +#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK +#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN +#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO #define _ZFORLIST_DECLARE_TABLE @@ -172,9 +172,9 @@ Sequence< ::rtl::OUString> SbaXGridControl::getSupportedServiceNames_Static(void aSupported[2] = ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControl"); return aSupported; } -DBG_NAME(SbaXGridControl ); +DBG_NAME(SbaXGridControl ); //--------------------------------------------------------------------------------------- -SbaXGridControl::SbaXGridControl(const Reference< XMultiServiceFactory >& _rM) +SbaXGridControl::SbaXGridControl(const Reference< XMultiServiceFactory >& _rM) : FmXGridControl(_rM) { DBG_CTOR(SbaXGridControl ,NULL); @@ -183,7 +183,7 @@ SbaXGridControl::SbaXGridControl(const Reference< XMultiServiceFactory >& _rM) //--------------------------------------------------------------------------------------- SbaXGridControl::~SbaXGridControl() { - DBG_DTOR(SbaXGridControl ,NULL); + DBG_DTOR(SbaXGridControl ,NULL); } //--------------------------------------------------------------------------------------- @@ -204,7 +204,7 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent) catch(Exception&) { } - + } pReturn->Create(pParent, nStyle); @@ -212,7 +212,7 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent) } //------------------------------------------------------------------------------ -Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException) +Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = FmXGridControl::queryInterface(_rType); return aRet.hasValue() ? aRet : ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); @@ -257,10 +257,10 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt // TODO: why the hell this whole class does not use any mutex? -// if (0 == m_nPeerCreationLevel) +// if (0 == m_nPeerCreationLevel) { Reference< ::com::sun::star::frame::XDispatch > xDisp(getPeer(), UNO_QUERY); - for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin(); + for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin(); aIter != m_aStatusMultiplexer.end(); ++aIter) { @@ -294,12 +294,12 @@ void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListen if ( getPeer().is() ) { if ( 1 == pMultiplexer->getLength() ) - { // the first external listener for this URL + { // the first external listener for this URL Reference< XDispatch > xDisp( getPeer(), UNO_QUERY ); xDisp->addStatusListener( pMultiplexer, _rURL ); } else - { // already have other listeners for this URL + { // already have other listeners for this URL _rxListener->statusChanged( pMultiplexer->getLastEvent() ); } } @@ -334,7 +334,7 @@ void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException ) EventObject aEvt; aEvt.Source = *this; - for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin(); + for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin(); aIter != m_aStatusMultiplexer.end(); ++aIter) { @@ -365,7 +365,7 @@ SbaXGridPeer::SbaXGridPeer(const Reference< XMultiServiceFactory >& _rM) //--------------------------------------------------------------------------------------- SbaXGridPeer::~SbaXGridPeer() { - DBG_DTOR(SbaXGridPeer ,NULL); + DBG_DTOR(SbaXGridPeer ,NULL); } //--------------------------------------------------------------------------------------- @@ -401,7 +401,7 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, else { ::cppu::OInterfaceContainerHelper * pIter = m_aStatusListeners.getContainer(_rUrl); - + if (pIter) { ::cppu::OInterfaceIteratorHelper aListIter(*pIter); @@ -412,7 +412,7 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, } //------------------------------------------------------------------------------ -Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException) +Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); if(aRet.hasValue()) @@ -423,10 +423,10 @@ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeExce //--------------------------------------------------------------------------------------- Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { - if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/BrowserAttribs"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/RowHeight"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnAttribs"))) - || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnWidth"))) + if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/BrowserAttribs"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/RowHeight"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnAttribs"))) + || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnWidth"))) ) { return (::com::sun::star::frame::XDispatch*)this; @@ -439,7 +439,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDis IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ ) { SbaGridControl* pGrid = static_cast< SbaGridControl* >( GetWindow() ); - if ( pGrid ) // if this fails, we were disposing before arriving here + if ( pGrid ) // if this fails, we were disposing before arriving here { if ( Application::GetMainThreadIdentifier() != ::osl::Thread::getCurrentIdentifier() ) { @@ -595,17 +595,17 @@ void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< ::com::sun::st //--------------------------------------------------------------------------------------- const Sequence< sal_Int8 > & SbaXGridPeer::getUnoTunnelId() { - static Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) + static Sequence< sal_Int8 > * pSeq = 0; + if( !pSeq ) { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) + if( !pSeq ) { static Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0,sal_True ); - pSeq = &aSeq; - } - } + rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0,sal_True ); + pSeq = &aSeq; + } + } return *pSeq; } @@ -626,7 +626,7 @@ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId { if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast< sal_Int64 >( this ); - + return FmXGridPeer::getSomething(rId); } @@ -675,10 +675,10 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt ) // the base class will start a column move here, which we don't want to allow // (at the moment. If we store relative positions with the columns, we can allow column moves ....) -// sal_uInt16 nPos(0); -// sal_uInt16 nHitTest = ImplHitTest( _rMEvt.GetPosPixel(), mnMouseOff, nPos ); -// if (!nHitTest & HEAD_HITTEST_DIVIDER) -// return; +// sal_uInt16 nPos(0); +// sal_uInt16 nHitTest = ImplHitTest( _rMEvt.GetPosPixel(), mnMouseOff, nPos ); +// if (!nHitTest & HEAD_HITTEST_DIVIDER) +// return; } FmGridHeader::MouseButtonDown(_rMEvt); @@ -692,7 +692,7 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo if (HEADERBAR_ITEM_NOTFOUND != nId) { Rectangle aColRect = GetItemRect(nId); - aColRect.Left() += nId ? 3 : 0; // the handle col (nId == 0) does not have a left margin for resizing + aColRect.Left() += nId ? 3 : 0; // the handle col (nId == 0) does not have a left margin for resizing aColRect.Right() -= 3; bResizingCol = !aColRect.IsInside(_rMousePos); } @@ -708,7 +708,7 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo static_cast<SbaGridControl*>(GetParent())->StartDrag(_nAction, Point( - _rMousePos.X() + GetPosPixel().X(), // we aren't left-justified with our parent, in contrast to the data window + _rMousePos.X() + GetPosPixel().X(), // we aren't left-justified with our parent, in contrast to the data window _rMousePos.Y() - GetSizePixel().Height() ) ); @@ -740,7 +740,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, sal_False); } } - + // prepend some new items sal_Bool bColAttrs = (nColId != (sal_uInt16)-1) && (nColId != 0); if ( bColAttrs && !bDBIsReadOnly) @@ -811,7 +811,7 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM //================================================================== // SbaGridControl //================================================================== -DBG_NAME(SbaGridControl ); +DBG_NAME(SbaGridControl ); //--------------------------------------------------------------------------------------- SbaGridControl::SbaGridControl(Reference< XMultiServiceFactory > _rM, Window* pParent, FmXGridPeer* _pPeer, WinBits nBits) @@ -827,9 +827,9 @@ SbaGridControl::SbaGridControl(Reference< XMultiServiceFactory > _rM, //--------------------------------------------------------------------------------------- SbaGridControl::~SbaGridControl() { - DBG_DTOR(SbaGridControl ,NULL); + DBG_DTOR(SbaGridControl ,NULL); if (m_nAsyncDropEvent) - Application::RemoveUserEvent(m_nAsyncDropEvent); + Application::RemoveUserEvent(m_nAsyncDropEvent); } //--------------------------------------------------------------------------------------- @@ -864,7 +864,7 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) rMenu.SetHelpId(ID_BROWSER_ROWHEIGHT, aNewItems.GetHelpId(ID_BROWSER_ROWHEIGHT)); rMenu.InsertSeparator(nPos++); } // if (!IsReadOnlyDB()) - + if ( GetSelectRowCount() > 0 ) { rMenu.InsertItem(ID_BROWSER_COPY, aNewItems.GetItemText(SID_COPY), 0, nPos++); @@ -902,13 +902,13 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId) Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH); sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1; - DlgSize aDlgColWidth(this, nCurWidth, sal_False); + DlgSize aDlgColWidth(this, nCurWidth, sal_False); if (aDlgColWidth.Execute()) { sal_Int32 nValue = aDlgColWidth.GetValue(); Any aNewWidth; if (-1 == nValue) - { // set to default + { // set to default Reference< XPropertyState > xPropState(xAffectedCol, UNO_QUERY); if (xPropState.is()) { @@ -938,26 +938,26 @@ void SbaGridControl::SetRowHeight() sal_Int32 nValue = aDlgRowHeight.GetValue(); Any aNewHeight; if ((sal_Int16)-1 == nValue) - { // set to default + { // set to default Reference< XPropertyState > xPropState(xCols, UNO_QUERY); if (xPropState.is()) { - try - { - aNewHeight = xPropState->getPropertyDefault(PROPERTY_ROW_HEIGHT); - } + try + { + aNewHeight = xPropState->getPropertyDefault(PROPERTY_ROW_HEIGHT); + } catch(Exception&) { } } } else aNewHeight <<= nValue; - try - { - xCols->setPropertyValue(PROPERTY_ROW_HEIGHT, aNewHeight); - } - catch(Exception&) - { + try + { + xCols->setPropertyValue(PROPERTY_ROW_HEIGHT, aNewHeight); + } + catch(Exception&) + { OSL_ENSURE(0,"setPropertyValue: PROPERTY_ROW_HEIGHT throws a exception"); } } @@ -1058,7 +1058,7 @@ void SbaGridControl::CursorMoved() } //--------------------------------------------------------------------------------------- -void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ ) +void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ ) { FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus); if (m_pMasterListener) @@ -1122,7 +1122,7 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos) { OSL_ENSURE(0,"SbaGridControl::getField Exception occured!"); } - + return xEmptyReturn; } @@ -1194,7 +1194,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) long nCorrectRowCount = GetRowCount(); if (GetOptions() & OPT_INSERT) - --nCorrectRowCount; // there is a empty row for inserting records + --nCorrectRowCount; // there is a empty row for inserting records if (bCurrentRowVirtual) --nCorrectRowCount; @@ -1204,20 +1204,20 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) sal_Bool bHitHandle = (nColPos == 0); // check which kind of dragging has to be initiated - if ( bHitHandle // the handle column + if ( bHitHandle // the handle column // AND - && ( GetSelectRowCount() // at least one row is selected + && ( GetSelectRowCount() // at least one row is selected // OR - || ( (nRow >= 0) // a row below the header - && !bCurrentRowVirtual // we aren't appending a new record - && (nRow != GetCurrentPos()) // a row which is not the current one - ) // OR - || ( (0 == GetSelectRowCount()) // no rows selected - && (-1 == nRow) // hit the header + || ( (nRow >= 0) // a row below the header + && !bCurrentRowVirtual // we aren't appending a new record + && (nRow != GetCurrentPos()) // a row which is not the current one + ) // OR + || ( (0 == GetSelectRowCount()) // no rows selected + && (-1 == nRow) // hit the header ) ) ) - { // => start dragging the row + { // => start dragging the row if (GetDataWindow().IsMouseCaptured()) GetDataWindow().ReleaseMouse(); @@ -1231,11 +1231,11 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) bHandled = sal_True; } - else if ( (nRow < 0) // the header - && (!bHitHandle) // non-handle column - && (nViewPos < GetViewColCount()) // valid (existing) column + else if ( (nRow < 0) // the header + && (!bHitHandle) // non-handle column + && (nViewPos < GetViewColCount()) // valid (existing) column ) - { // => start dragging the column + { // => start dragging the column if (GetDataWindow().IsMouseCaptured()) GetDataWindow().ReleaseMouse(); @@ -1244,10 +1244,10 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) bHandled = sal_True; } - else if ( !bHitHandle // non-handle column - && (nRow >= 0) // non-header row + else if ( !bHitHandle // non-handle column + && (nRow >= 0) // non-header row ) - { // => start dragging the field content + { // => start dragging the field content if (GetDataWindow().IsMouseCaptured()) GetDataWindow().ReleaseMouse(); @@ -1300,7 +1300,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) } if (0 == sField.getLength()) return; - + OColumnTransferable* pDataTransfer = new OColumnTransferable(xDataSource, sField, xAffectedField, xActiveConnection, CTF_FIELD_DESCRIPTOR | CTF_COLUMN_DESCRIPTOR); Reference< XTransferable > xEnsureDelete = pDataTransfer; pDataTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK); @@ -1385,10 +1385,10 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) } /// unary_function Functor object for class ZZ returntype is void - struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool> + struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool> { - sal_Bool bQueryDrop; - SbaGridControlPrec(sal_Bool _bQueryDrop) + sal_Bool bQueryDrop; + SbaGridControlPrec(sal_Bool _bQueryDrop) : bQueryDrop(_bQueryDrop) { } @@ -1397,13 +1397,13 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) { switch (_aType.mnSotId) { -// case SOT_FORMAT_RTF: // RTF data descriptions -// case SOT_FORMATSTR_ID_HTML: // HTML data descriptions - case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor - case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor - case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command +// case SOT_FORMAT_RTF: // RTF data descriptions +// case SOT_FORMATSTR_ID_HTML: // HTML data descriptions + case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor + case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor + case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command return true; - } + } return false; } }; @@ -1417,25 +1417,25 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) return nAction; if ( IsDropFormatSupported( FORMAT_STRING ) ) do - { // odd construction, but spares us a lot of (explicit ;) goto's + { // odd construction, but spares us a lot of (explicit ;) goto's if (!GetEmptyRow().Is()) // without an empty row we're not in update mode break; - long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False); - sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False); + long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False); + sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False); long nCorrectRowCount = GetRowCount(); if (GetOptions() & OPT_INSERT) - --nCorrectRowCount; // there is a empty row for inserting records + --nCorrectRowCount; // there is a empty row for inserting records if (IsCurrentAppending()) - --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one + --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one if ((nCol == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount) || GetColumnId(nCol) == 0 ) // no valid cell under the mouse cursor break; - + Rectangle aRect = GetCellRect(nRow, nCol, sal_False); if (!aRect.IsInside(rEvt.maPosPixel)) // not dropped within a cell (a cell isn't as wide as the column - the are small spaces) @@ -1467,7 +1467,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) // assume RO break; } - + try { // assume that text can be dropped into a field if the column has a ::com::sun::star::awt::XTextComponent interface @@ -1531,14 +1531,14 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) if ( IsDropFormatSupported( FORMAT_STRING ) ) { - long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False); - sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False); + long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False); + sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False); long nCorrectRowCount = GetRowCount(); if (GetOptions() & OPT_INSERT) - --nCorrectRowCount; // there is a empty row for inserting records + --nCorrectRowCount; // there is a empty row for inserting records if (IsCurrentAppending()) - --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one + --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one DBG_ASSERT((nCol != BROWSER_INVALIDID) && (nRow < nCorrectRowCount), "SbaGridControl::Drop : dropped on an invalid position !"); // AcceptDrop should have caught this @@ -1609,9 +1609,9 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) { sal_Bool bCountFinal = sal_False; xDataSource->getPropertyValue(PROPERTY_ISROWCOUNTFINAL) >>= bCountFinal; - if ( !bCountFinal ) + if ( !bCountFinal ) setDataSource(NULL); // deattach from grid control - Reference< XResultSetUpdate > xResultSetUpdate(xDataSource,UNO_QUERY); + Reference< XResultSetUpdate > xResultSetUpdate(xDataSource,UNO_QUERY); ODatabaseImportExport* pImExport = new ORowSetImportExport(this,xResultSetUpdate,m_aDataDescriptor,getServiceManager()); Reference<XEventListener> xHolder = pImExport; Hide(); @@ -1639,11 +1639,11 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) Show(); DBG_UNHANDLED_EXCEPTION(); } - if ( !bCountFinal ) + if ( !bCountFinal ) setDataSource(Reference< XRowSet >(xDataSource,UNO_QUERY)); } - m_aDataDescriptor.clear(); - + m_aDataDescriptor.clear(); + return 0L; } // ------------------------------------------------------------------------- @@ -1657,7 +1657,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) } else sRet = FmGridControl::GetAccessibleObjectDescription( eObjType,_nPosition); - return sRet; + return sRet; } // ----------------------------------------------------------------------------- void SbaGridControl::DeleteSelectedRows() diff --git a/dbaccess/source/ui/browser/sbagrid.src b/dbaccess/source/ui/browser/sbagrid.src index 1362944d5847..6c53941d0be3 100644 --- a/dbaccess/source/ui/browser/sbagrid.src +++ b/dbaccess/source/ui/browser/sbagrid.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx index 65733d7ae563..b637035eafa3 100644 --- a/dbaccess/source/ui/browser/sbamultiplex.cxx +++ b/dbaccess/source/ui/browser/sbamultiplex.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,7 +46,7 @@ void SAL_CALL SbaXStatusMultiplexer::statusChanged(const ::com::sun::star::frame ::cppu::OInterfaceIteratorHelper aIt( *this ); while ( aIt.hasMoreElements() ) static_cast< ::com::sun::star::frame::XStatusListener* >( aIt.next() )->statusChanged( m_aLastKnownStatus ); -} \ +} \ // LoadListener IMPLEMENT_LISTENER_MULTIPLEXER_CORE(SbaXLoadMultiplexer, ::com::sun::star::form::XLoadListener) diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index f963afecab31..6f7d72824243 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -381,7 +381,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) { // create controls and set sizes - const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width(); + const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width(); m_pSplitter = new Splitter(getBrowserView(),WB_HSCROLL); m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) ); @@ -442,27 +442,27 @@ sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star: { sal_Int32 nPos = 0; // is the filter intially applied ? - aProperties.getArray()[nPos] = PROPERTY_APPLYFILTER; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_APPLYFILTER); + aProperties.getArray()[nPos] = PROPERTY_APPLYFILTER; + aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_APPLYFILTER); // the initial filter - aProperties.getArray()[nPos] = PROPERTY_FILTER; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_FILTER); + aProperties.getArray()[nPos] = PROPERTY_FILTER; + aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_FILTER); if ( pData->xObjectProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_HAVING_CLAUSE) ) { aProperties.realloc(aProperties.getLength()+1); aValues.realloc(aValues.getLength()+1); // the initial having clause - aProperties.getArray()[nPos] = PROPERTY_HAVING_CLAUSE; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_HAVING_CLAUSE); + aProperties.getArray()[nPos] = PROPERTY_HAVING_CLAUSE; + aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_HAVING_CLAUSE); } // the initial ordering - aProperties.getArray()[nPos] = PROPERTY_ORDER; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_ORDER); + aProperties.getArray()[nPos] = PROPERTY_ORDER; + aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_ORDER); - Reference< XMultiPropertySet > xFormMultiSet(_rxForm, UNO_QUERY); + Reference< XMultiPropertySet > xFormMultiSet(_rxForm, UNO_QUERY); xFormMultiSet->setPropertyValues(aProperties, aValues); } } @@ -524,38 +524,38 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: Any* pValueIter = aValues.getArray(); if ( m_bPreview ) { - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor")); - *pValueIter++ <<= sal_False; - *pStringIter++ = PROPERTY_BORDER; - *pValueIter++ <<= sal_Int16(0); + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor")); + *pValueIter++ <<= sal_False; + *pStringIter++ = PROPERTY_BORDER; + *pValueIter++ <<= sal_Int16(0); } - *pStringIter++ = PROPERTY_FONT; - *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_FONT); - *pStringIter++ = PROPERTY_TEXTEMPHASIS; - *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTEMPHASIS); - *pStringIter++ = PROPERTY_TEXTRELIEF; - *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTRELIEF); + *pStringIter++ = PROPERTY_FONT; + *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_FONT); + *pStringIter++ = PROPERTY_TEXTEMPHASIS; + *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTEMPHASIS); + *pStringIter++ = PROPERTY_TEXTRELIEF; + *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTRELIEF); if ( m_bPreview ) { - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar")); - *pValueIter++ <<= sal_False; - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker")); - *pValueIter++ <<= sal_False; + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar")); + *pValueIter++ <<= sal_False; + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker")); + *pValueIter++ <<= sal_False; } - *pStringIter++ = PROPERTY_ROW_HEIGHT; - *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_ROW_HEIGHT); + *pStringIter++ = PROPERTY_ROW_HEIGHT; + *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_ROW_HEIGHT); if ( m_bPreview ) { - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")); - *pValueIter++ <<= sal_False; + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")); + *pValueIter++ <<= sal_False; } - *pStringIter++ = PROPERTY_TEXTCOLOR; - *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTCOLOR); - *pStringIter++ = PROPERTY_TEXTLINECOLOR; - *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTLINECOLOR); + *pStringIter++ = PROPERTY_TEXTCOLOR; + *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTCOLOR); + *pStringIter++ = PROPERTY_TEXTLINECOLOR; + *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTLINECOLOR); - Reference< XMultiPropertySet > xFormMultiSet(xGrid, UNO_QUERY); + Reference< XMultiPropertySet > xFormMultiSet(xGrid, UNO_QUERY); xFormMultiSet->setPropertyValues(aProperties, aValues); } @@ -576,10 +576,10 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: // insert the column into the gridcontrol so that we see something :-) ::rtl::OUString aCurrentModelType; Reference<XColumnsSupplier> xSupCols(getRowSet(),UNO_QUERY); - Reference<XNameAccess> xColumns = xSupCols->getColumns(); - Sequence< ::rtl::OUString> aNames = xColumns->getElementNames(); - const ::rtl::OUString* pIter = aNames.getConstArray(); - const ::rtl::OUString* pEnd = pIter + aNames.getLength(); + Reference<XNameAccess> xColumns = xSupCols->getColumns(); + Sequence< ::rtl::OUString> aNames = xColumns->getElementNames(); + const ::rtl::OUString* pIter = aNames.getConstArray(); + const ::rtl::OUString* pEnd = pIter + aNames.getLength(); ::rtl::OUString sDefaultProperty; Reference< XPropertySet > xColumn; @@ -597,7 +597,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: continue; // use the result set column's type to determine the type of grid column to create - sal_Bool bFormattedIsNumeric = sal_True; + sal_Bool bFormattedIsNumeric = sal_True; sal_Int32 nType = ::comphelper::getINT32( xColumn->getPropertyValue( PROPERTY_TYPE ) ); ::std::vector< NamedValue > aInitialValues; @@ -688,7 +688,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: aDescription >>= sTemp; if ( !sTemp.getLength() ) xColumn->getPropertyValue( PROPERTY_DESCRIPTION ) >>= sTemp; - + aDescription <<= sTemp; aInitialValues.push_back( NamedValue( PROPERTY_HELPTEXT, aDescription ) ); @@ -773,7 +773,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( // one of the many properties which require us to update the definition ? // a column's width ? else if (evt.PropertyName.equals(PROPERTY_WIDTH)) - { // a column width has changed -> update the model + { // a column width has changed -> update the model // (the update of the view is done elsewhere) Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource); if(xProp.is()) @@ -820,8 +820,8 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( } // a column's format ? - else if ( (evt.PropertyName.equals(PROPERTY_FORMATKEY)) - && (TypeClass_LONG == evt.NewValue.getValueTypeClass()) + else if ( (evt.PropertyName.equals(PROPERTY_FORMATKEY)) + && (TypeClass_LONG == evt.NewValue.getValueTypeClass()) ) { // update the model (means the definition object) @@ -847,15 +847,15 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( } } - else if ( evt.PropertyName.equals(PROPERTY_FONT) // the font ? - || evt.PropertyName.equals(PROPERTY_TEXTCOLOR) // the text color ? - || evt.PropertyName.equals(PROPERTY_FILTER) // the filter ? - || evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE) // the having clause ? - || evt.PropertyName.equals(PROPERTY_ORDER) // the sort ? - || evt.PropertyName.equals(PROPERTY_APPLYFILTER) // the appliance of the filter ? - || evt.PropertyName.equals(PROPERTY_TEXTLINECOLOR) // the text line color ? - || evt.PropertyName.equals(PROPERTY_TEXTEMPHASIS) // the text emphasis ? - || evt.PropertyName.equals(PROPERTY_TEXTRELIEF) // the text relief ? + else if ( evt.PropertyName.equals(PROPERTY_FONT) // the font ? + || evt.PropertyName.equals(PROPERTY_TEXTCOLOR) // the text color ? + || evt.PropertyName.equals(PROPERTY_FILTER) // the filter ? + || evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE) // the having clause ? + || evt.PropertyName.equals(PROPERTY_ORDER) // the sort ? + || evt.PropertyName.equals(PROPERTY_APPLYFILTER) // the appliance of the filter ? + || evt.PropertyName.equals(PROPERTY_TEXTLINECOLOR) // the text line color ? + || evt.PropertyName.equals(PROPERTY_TEXTEMPHASIS) // the text emphasis ? + || evt.PropertyName.equals(PROPERTY_TEXTRELIEF) // the text relief ? ) { transferChangedControlProperty(evt.PropertyName, evt.NewValue); @@ -955,14 +955,14 @@ void SbaTableQueryBrowser::checkDocumentDataSource() if (!bKnownDocDataSource) { if (NULL != pDataSourceEntry) - { // at least the data source is know + { // at least the data source is know if (NULL != pContainerEntry) bKnownDocDataSource = sal_True; // assume we know it. // TODO: should we expand the object container? This may be too expensive just for checking .... else { if ((NULL == pObjectEntry) && m_aDocumentDataSource.has(daCommandType) && m_aDocumentDataSource.has(daCommand)) - { // maybe we have a command to be displayed ? + { // maybe we have a command to be displayed ? sal_Int32 nCommandType = CommandType::TABLE; m_aDocumentDataSource[daCommandType] >>= nCommandType; @@ -1006,7 +1006,7 @@ namespace if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) { _rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET); - // _rDisplayName = aURL.getName(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET); + // _rDisplayName = aURL.getName(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET); _rUniqueId = aURL.GetMainURL( INetURLObject::NO_DECODE ); return true; } @@ -1176,7 +1176,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescri // ------------------------------------------------------------------------- void SbaTableQueryBrowser::connectExternalDispatches() { - Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY ); + Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY ); DBG_ASSERT(xProvider.is(), "SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !"); if (xProvider.is()) { @@ -1299,7 +1299,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) thr { Reference<XConnection> xCon(_rSource.Source, UNO_QUERY); if ( xCon.is() && m_pTreeView ) - { // our connection is in dispose so we have to find the entry equal with this connection + { // our connection is in dispose so we have to find the entry equal with this connection // and close it what means to collapse the entry // get the top-level representing the removed data source SvLBoxEntry* pDSLoop = m_pTreeView->getListBox().FirstChild(NULL); @@ -1552,7 +1552,7 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) if (isValid() && !loadingCancelled()) { // did we load a query? - sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference) + sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference) if ( implGetQuerySignature( m_sQueryCommand, bTemporary ) ) m_bQueryEscapeProcessing = bTemporary; } @@ -1618,8 +1618,8 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const SvLBoxEntry* pDataSourceEntry = m_pTreeView->getListBox().GetRootLevelParent( pCurrentEntry ); DBTreeListUserData* pDSData = pDataSourceEntry - ? static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() ) - : NULL; + ? static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() ) + : NULL; if ( nId == ID_TREE_CLOSE_CONN ) { @@ -1738,7 +1738,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const case ID_BROWSER_COLATTRSET: case ID_BROWSER_COLWIDTH: aReturn.bEnabled = getBrowserView() && getBrowserView()->getVclControl() && isValid() && isValidCursor(); - // aReturn.bEnabled &= getDefinition() && !getDefinition()->GetDatabase()->IsReadOnly(); + // aReturn.bEnabled &= getDefinition() && !getDefinition()->GetDatabase()->IsReadOnly(); break; case ID_BROWSER_COPY: @@ -1873,7 +1873,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue MultiSelection* pSelection = (MultiSelection*)pGrid->GetSelection(); Sequence< Any > aSelection; if ( !pGrid->IsAllSelected() ) - { // transfer the selected rows only if not all rows are selected + { // transfer the selected rows only if not all rows are selected // (all rows means the whole table) // i3832 - 03.04.2002 - fs@openoffice.org if (pSelection != NULL) @@ -1914,14 +1914,14 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue xProp->getPropertyValue(PROPERTY_DATASOURCENAME) >>= sDataSourceName; aDescriptor.setDataSource(sDataSourceName); - aDescriptor[daCommand] = xProp->getPropertyValue(PROPERTY_COMMAND); - aDescriptor[daCommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE); - aDescriptor[daConnection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION); - aDescriptor[daCursor] <<= xCursorClone; + aDescriptor[daCommand] = xProp->getPropertyValue(PROPERTY_COMMAND); + aDescriptor[daCommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE); + aDescriptor[daConnection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION); + aDescriptor[daCursor] <<= xCursorClone; if ( aSelection.getLength() ) { - aDescriptor[daSelection] <<= aSelection; - aDescriptor[daBookmarkSelection] <<= sal_False; + aDescriptor[daSelection] <<= aSelection; + aDescriptor[daBookmarkSelection] <<= sal_False; // these are selection indicies // before we change this, all clients have to be adjusted // so that they recognize the new BookmarkSelection property! @@ -2031,8 +2031,8 @@ void SbaTableQueryBrowser::initializeTreeModel() // fill the model with the names of the registered datasources Sequence< ::rtl::OUString > aDatasources = m_xDatabaseContext->getElementNames(); - const ::rtl::OUString* pIter = aDatasources.getConstArray(); - const ::rtl::OUString* pEnd = pIter + aDatasources.getLength(); + const ::rtl::OUString* pIter = aDatasources.getConstArray(); + const ::rtl::OUString* pEnd = pIter + aDatasources.getLength(); for (; pIter != pEnd; ++pIter) implAddDatasource( *pIter, aDBImage, sQueriesName, aQueriesImage, sTablesName, aTablesImage, SharedConnection() ); } @@ -2049,8 +2049,8 @@ void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAcce try { Sequence< ::rtl::OUString > aNames = _xNameAccess->getElementNames(); - const ::rtl::OUString* pIter = aNames.getConstArray(); - const ::rtl::OUString* pEnd = pIter + aNames.getLength(); + const ::rtl::OUString* pIter = aNames.getConstArray(); + const ::rtl::OUString* pEnd = pIter + aNames.getLength(); for (; pIter != pEnd; ++pIter) { if( !m_pTreeView->getListBox().GetEntryPosByName(*pIter,_pParent)) @@ -2181,7 +2181,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent) // 0 indicates that an error occured } else - { // we have to expand the queries or bookmarks + { // we have to expand the queries or bookmarks if (ensureEntryObject(_pParent)) { DBTreeListUserData* pParentData = static_cast< DBTreeListUserData* >( _pParent->GetUserData() ); @@ -2236,7 +2236,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry ) { DBG_UNHANDLED_EXCEPTION(); } - + bSuccess = pEntryData->xContainer.is(); } else @@ -2297,7 +2297,7 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSou Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY); if(xProp.is()) { - Reference< ::com::sun::star::form::XLoadable > xLoadable(xProp,UNO_QUERY); + Reference< ::com::sun::star::form::XLoadable > xLoadable(xProp,UNO_QUERY); try { // the values allowing the RowSet to re-execute @@ -2403,7 +2403,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::rtl::OUString& _rDataSourceNam else if (!pCommandType) { if ( m_pCurrentlyDisplayed ) - { // tell the old entry (if any) it has been deselected + { // tell the old entry (if any) it has been deselected selectPath(m_pCurrentlyDisplayed, sal_False); m_pCurrentlyDisplayed = NULL; } @@ -2469,7 +2469,7 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry ) sal_Int32 nOldType = 0; xRowSetProps->getPropertyValue(PROPERTY_COMMAND_TYPE) >>= nOldType; Reference<XConnection> xOldConnection(xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY); - + // the name of the table or query SvLBoxString* pString = (SvLBoxString*)_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING); OSL_ENSURE(pString,"There must be a string item!"); @@ -2489,16 +2489,16 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry ) } ::rtl::OUString aName = sNameBuffer.makeStringAndClear(); - sal_Int32 nCommandType = ( etTableContainer == pContainerData->eType) - ? CommandType::TABLE - : CommandType::QUERY; + sal_Int32 nCommandType = ( etTableContainer == pContainerData->eType) + ? CommandType::TABLE + : CommandType::QUERY; // check if need to rebuild the rowset sal_Bool bRebuild = ( xOldConnection != pConData->xConnection ) || ( nOldType != nCommandType ) || ( aName != aOldName ); - Reference< ::com::sun::star::form::XLoadable > xLoadable = getLoadable(); + Reference< ::com::sun::star::form::XLoadable > xLoadable = getLoadable(); bRebuild |= !xLoadable->isLoaded(); bool bSuccess = true; if ( bRebuild ) @@ -2612,7 +2612,7 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry ) String sDataSourceName( getDataSourceAcessor( pConnection ) ); bSuccess = implLoadAnything( sDataSourceName, aName, nCommandType, sal_True, pConData->xConnection ); if ( !bSuccess ) - { // clean up + { // clean up criticalFail(); } } @@ -2652,18 +2652,18 @@ SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAc SvLBoxEntry* pDSLoop = rListBox.FirstChild(NULL); while (pDSLoop) { - pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_QUERIES); + pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_QUERIES); DBTreeListUserData* pQueriesData = static_cast<DBTreeListUserData*>(pContainer->GetUserData()); if ( pQueriesData && pQueriesData->xContainer == _rxNameAccess ) break; - pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_TABLES); + pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_TABLES); DBTreeListUserData* pTablesData = static_cast<DBTreeListUserData*>(pContainer->GetUserData()); if ( pTablesData && pTablesData->xContainer == _rxNameAccess ) break; - pDSLoop = rListBox.NextSibling(pDSLoop); - pContainer = NULL; + pDSLoop = rListBox.NextSibling(pDSLoop); + pContainer = NULL; } return pContainer; } @@ -2677,7 +2677,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve // first search for a definition container where we can insert this element SvLBoxEntry* pEntry = getEntryFromContainer(xNames); - if(pEntry) // found one + if(pEntry) // found one { // insert the new entry into the tree DBTreeListUserData* pContainerData = static_cast<DBTreeListUserData*>(pEntry->GetUserData()); @@ -2709,9 +2709,9 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const String& _sName,SvLBoxEntry* _pContainer) { return m_pCurrentlyDisplayed - && getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer) - && m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer - && m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName; + && getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer) + && m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer + && m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName; } // ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) @@ -2727,7 +2727,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven String aName = ::comphelper::getString(_rEvent.Accessor).getStr(); if ( isCurrentlyDisplayedChanged( aName, pContainer) ) - { // the element displayed currently has been replaced + { // the element displayed currently has been replaced // we need to remember the old value SvLBoxEntry* pTemp = m_pCurrentlyDisplayed; @@ -2774,11 +2774,11 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY); SvLBoxEntry* pContainer = getEntryFromContainer(xNames); if ( pContainer ) - { // a table or query as been replaced + { // a table or query as been replaced String aName = ::comphelper::getString(_rEvent.Accessor).getStr(); if ( isCurrentlyDisplayedChanged( aName, pContainer) ) - { // the element displayed currently has been replaced + { // the element displayed currently has been replaced // we need to remember the old value SvLBoxEntry* pTemp = m_pCurrentlyDisplayed; @@ -2829,7 +2829,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve checkDocumentDataSource(); } else if (xNames.get() == m_xDatabaseContext.get()) - { // a datasource has been replaced in the context + { // a datasource has been replaced in the context DBG_ERROR("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!"); // very suspicious: the database context should not allow to replace data source, only to register // and revoke them @@ -3064,20 +3064,20 @@ void SbaTableQueryBrowser::impl_initialize() ::rtl::OUString* pStringIter = aProperties.getArray(); Any* pValueIter = aValues.getArray(); - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor")); - *pValueIter++ <<= sal_False; - *pStringIter++ = PROPERTY_BORDER; - *pValueIter++ <<= sal_Int16(0); + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor")); + *pValueIter++ <<= sal_False; + *pStringIter++ = PROPERTY_BORDER; + *pValueIter++ <<= sal_Int16(0); - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar")); - *pValueIter++ <<= sal_False; - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker")); - *pValueIter++ <<= sal_False; + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar")); + *pValueIter++ <<= sal_False; + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker")); + *pValueIter++ <<= sal_False; - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")); - *pValueIter++ <<= sal_False; + *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop")); + *pValueIter++ <<= sal_False; - Reference< XMultiPropertySet > xFormMultiSet(getFormComponent(), UNO_QUERY); + Reference< XMultiPropertySet > xFormMultiSet(getFormComponent(), UNO_QUERY); if ( xFormMultiSet.is() ) xFormMultiSet->setPropertyValues(aProperties, aValues); } @@ -3220,8 +3220,8 @@ sal_Bool SbaTableQueryBrowser::ensureConnection(SvLBoxEntry* _pAnyEntry, SharedC SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry); DBTreeListUserData* pDSData = pDSEntry - ? static_cast<DBTreeListUserData*>(pDSEntry->GetUserData()) - : NULL; + ? static_cast<DBTreeListUserData*>(pDSEntry->GetUserData()) + : NULL; return ensureConnection( pDSEntry, pDSData, _rConnection ); } @@ -3242,8 +3242,8 @@ sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvLBoxEntry* _pAnyEntry SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry ); DBTreeListUserData* pDSData = pDSEntry - ? static_cast< DBTreeListUserData* >( pDSEntry->GetUserData() ) - : NULL; + ? static_cast< DBTreeListUserData* >( pDSEntry->GetUserData() ) + : NULL; if ( pDSData ) _rConnection = pDSData->xConnection; return _rConnection.is(); @@ -3340,7 +3340,7 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa String sLeftText = pLeftTextItem->GetText(); String sRightText = pRightTextItem->GetText(); - sal_Int32 nCompareResult = 0; // equal by default + sal_Int32 nCompareResult = 0; // equal by default if (m_xCollator.is()) { @@ -3503,12 +3503,12 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( ::rtl::OUString& _rCommand // ontain the dss (data source signature) of the form ::rtl::OUString sDataSourceName; ::rtl::OUString sCommand; - sal_Int32 nCommandType = CommandType::COMMAND; + sal_Int32 nCommandType = CommandType::COMMAND; Reference< XPropertySet > xRowsetProps( getRowSet(), UNO_QUERY ); ODataAccessDescriptor aDesc( xRowsetProps ); sDataSourceName = aDesc.getDataSource(); - aDesc[ daCommand ] >>= sCommand; - aDesc[ daCommandType ] >>= nCommandType; + aDesc[ daCommand ] >>= sCommand; + aDesc[ daCommandType ] >>= nCommandType; // do we need to do anything? if ( CommandType::QUERY != nCommandType ) @@ -3559,8 +3559,8 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _ { // first we have to clear the grid Sequence< ::rtl::OUString > aNames = _xColContainer->getElementNames(); - const ::rtl::OUString* pIter = aNames.getConstArray(); - const ::rtl::OUString* pEnd = pIter + aNames.getLength(); + const ::rtl::OUString* pIter = aNames.getConstArray(); + const ::rtl::OUString* pEnd = pIter + aNames.getLength(); Reference< XInterface > xColumn; for (; pIter != pEnd;++pIter) { @@ -3723,7 +3723,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour return; if ( isSelected( pDataSourceEntry ) ) - { // a table or query belonging to the deleted data source is currently beeing displayed. + { // a table or query belonging to the deleted data source is currently beeing displayed. OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry, "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" ); unloadAndCleanup( sal_True ); @@ -3731,7 +3731,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour else OSL_ENSURE( ( NULL == m_pCurrentlyDisplayed ) - || ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ), + || ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ), "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (2)!"); // delete any user data of the child entries of the to-be-removed entry @@ -3779,7 +3779,7 @@ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegis // ......................................................................... -} // namespace dbaui +} // namespace dbaui // ......................................................................... |