diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2013-08-17 23:43:14 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-08-27 16:11:09 +0000 |
commit | 2ec606730bc95b58390a609df0a88958869a4066 (patch) | |
tree | 9c530b3f6b200305ba224dda2d02c9bf5aca2233 /dbaccess/source/ext | |
parent | 434f3c8e7fac0644cfe1d7a15f97f0c267bac048 (diff) |
fdo#62475 removed pointless comments
Conflicts:
dbaccess/source/filter/xml/xmlfilter.cxx
dbaccess/source/ui/dlg/ConnectionPage.cxx
dbaccess/source/ui/dlg/detailpages.cxx
dbaccess/source/ui/dlg/odbcconfig.cxx
dbaccess/source/ui/querydesign/querycontroller.cxx
Change-Id: I3a05649efa3a43dd8d8fb069fc1bce14ca0a6338
Reviewed-on: https://gerrit.libreoffice.org/5484
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'dbaccess/source/ext')
23 files changed, 54 insertions, 419 deletions
diff --git a/dbaccess/source/ext/macromigration/dbmm_module.cxx b/dbaccess/source/ext/macromigration/dbmm_module.cxx index 0dbda35fe84a..826e945ae167 100644 --- a/dbaccess/source/ext/macromigration/dbmm_module.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_module.cxx @@ -17,20 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" #include <rtl/instance.hxx> -//........................................................................ namespace dbmm { -//........................................................................ IMPLEMENT_MODULE( MacroMigrationModule, "dbmm" ); -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/dbmm_module.hxx b/dbaccess/source/ext/macromigration/dbmm_module.hxx index 1831c8175a45..bc725a09c8d4 100644 --- a/dbaccess/source/ext/macromigration/dbmm_module.hxx +++ b/dbaccess/source/ext/macromigration/dbmm_module.hxx @@ -22,16 +22,12 @@ #include <unotools/componentresmodule.hxx> -//........................................................................ namespace dbmm { -//........................................................................ DEFINE_MODULE( MacroMigrationModule, MacroMigrationModuleClient, MacroMigrationResId ) -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MACROMIGRATION_MODULE_HXX diff --git a/dbaccess/source/ext/macromigration/dbmm_services.cxx b/dbaccess/source/ext/macromigration/dbmm_services.cxx index 42178799bbe3..e73b33451ca3 100644 --- a/dbaccess/source/ext/macromigration/dbmm_services.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_services.cxx @@ -17,15 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" -//........................................................................ namespace dbmm { -//........................................................................ - //-------------------------------------------------------------------- extern void createRegistryInfo_MacroMigrationDialogService(); static void initializeModule() @@ -34,9 +30,7 @@ namespace dbmm createRegistryInfo_MacroMigrationDialogService(); } -//........................................................................ } // namespace dbmm -//........................................................................ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbmm_component_getFactory( const sal_Char* pImplementationName, SAL_UNUSED_PARAMETER void*, diff --git a/dbaccess/source/ext/macromigration/dbmm_types.cxx b/dbaccess/source/ext/macromigration/dbmm_types.cxx index e275de6e1552..87f7311ec952 100644 --- a/dbaccess/source/ext/macromigration/dbmm_types.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_types.cxx @@ -17,21 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_types.hxx" #include "dbmm_global.hrc" #include "dbmm_module.hxx" -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper OUString getScriptTypeDisplayName( const ScriptType _eType ) { sal_uInt16 nResId( 0 ); @@ -49,8 +43,6 @@ namespace dbmm return nResId ? OUString( MacroMigrationResId( nResId ) ) : OUString(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/dbmm_types.hxx b/dbaccess/source/ext/macromigration/dbmm_types.hxx index a8d0027916f5..7ae52e987935 100644 --- a/dbaccess/source/ext/macromigration/dbmm_types.hxx +++ b/dbaccess/source/ext/macromigration/dbmm_types.hxx @@ -22,14 +22,10 @@ #include <tools/string.hxx> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= ScriptType - //==================================================================== + // ScriptType enum ScriptType { eBasic, @@ -40,23 +36,17 @@ namespace dbmm eDialog }; - //==================================================================== - //= SubDocumentType - //==================================================================== + // SubDocumentType enum SubDocumentType { eForm, eReport }; - //==================================================================== - //= helper - //==================================================================== + // helper OUString getScriptTypeDisplayName( const ScriptType _eType ); -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_DBMM_TYPES_HXX diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx b/dbaccess/source/ext/macromigration/docinteraction.cxx index c811340f7df1..c5a9766999af 100644 --- a/dbaccess/source/ext/macromigration/docinteraction.cxx +++ b/dbaccess/source/ext/macromigration/docinteraction.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "docinteraction.hxx" #include <com/sun/star/frame/XModel.hpp> @@ -29,10 +28,8 @@ #include <rtl/ref.hxx> #include <tools/diagnose_ex.h> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -51,9 +48,7 @@ namespace dbmm using ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER; using ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER; - //==================================================================== - //= InteractionHandler_Data - //==================================================================== + // InteractionHandler_Data struct InteractionHandler_Data { Reference< XInteractionHandler > xHandler; @@ -69,10 +64,7 @@ namespace dbmm } }; - //==================================================================== - //= InteractionHandler - //==================================================================== - //-------------------------------------------------------------------- + // InteractionHandler InteractionHandler::InteractionHandler( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument ) :m_pData( new InteractionHandler_Data( _rContext ) ) { @@ -81,12 +73,10 @@ namespace dbmm m_pData->xHandler = aDocArgs.getOrDefault( "InteractionHandler", m_pData->xHandler ); } - //-------------------------------------------------------------------- InteractionHandler::~InteractionHandler() { } - //-------------------------------------------------------------------- bool InteractionHandler::requestDocumentPassword( const OUString& _rDocumentName, OUString& _io_rPassword ) { // create request @@ -114,7 +104,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- void InteractionHandler::reportError( const Any& _rError ) { ::rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rError ) ); @@ -124,8 +113,6 @@ namespace dbmm m_pData->xHandler->handle( pRequest.get() ); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/docinteraction.hxx b/dbaccess/source/ext/macromigration/docinteraction.hxx index 895bf0e785de..b67d95676823 100644 --- a/dbaccess/source/ext/macromigration/docinteraction.hxx +++ b/dbaccess/source/ext/macromigration/docinteraction.hxx @@ -26,14 +26,10 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= DocumentErrorHandling - //==================================================================== + // DocumentErrorHandling struct InteractionHandler_Data; /** wraps common operations with an interaction handler. */ @@ -77,9 +73,7 @@ namespace dbmm ::std::auto_ptr< InteractionHandler_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_DOCERRORHANDLING_HXX diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 93a1bdf8294c..e14f0baf7204 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_global.hrc" #include "dbmm_module.hxx" #include "docinteraction.hxx" @@ -48,10 +47,8 @@ #include <list> -//........................................................................ namespace dbmm { -//........................................................................ #define STATE_CLOSE_SUB_DOCS 0 #define STATE_BACKUP_DBDOC 1 @@ -92,10 +89,7 @@ namespace dbmm using ::com::sun::star::ucb::XContent; using ::com::sun::star::ucb::XContentIdentifier; - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper static void lcl_getControllers_throw(const Reference< XModel2 >& _rxDocument, ::std::list< Reference< XController2 > >& _out_rControllers ) { @@ -105,9 +99,7 @@ namespace dbmm _out_rControllers.push_back( Reference< XController2 >( xControllerEnum->nextElement(), UNO_QUERY_THROW ) ); } - //==================================================================== - //= MacroMigrationDialog_Data - //==================================================================== + // MacroMigrationDialog_Data struct MacroMigrationDialog_Data { Reference<XComponentContext> aContext; @@ -133,10 +125,7 @@ namespace dbmm } }; - //==================================================================== - //= MacroMigrationDialog - //==================================================================== - //-------------------------------------------------------------------- + // MacroMigrationDialog MacroMigrationDialog::MacroMigrationDialog( Window* _pParent, const Reference<XComponentContext>& _rContext, const Reference< XOfficeDatabaseDocument >& _rxDocument ) :MacroMigrationDialog_Base( _pParent, MacroMigrationResId( DLG_MACRO_MIGRATION ) ) @@ -166,24 +155,20 @@ namespace dbmm OSL_PRECOND( m_pData->xDocumentModel.is(), "MacroMigrationDialog::MacroMigrationDialog: illegal document!" ); } - //-------------------------------------------------------------------- MacroMigrationDialog::~MacroMigrationDialog() { } - //-------------------------------------------------------------------- const Reference<XComponentContext>& MacroMigrationDialog::getComponentContext() const { return m_pData->aContext; } - //-------------------------------------------------------------------- const Reference< XOfficeDatabaseDocument >& MacroMigrationDialog::getDocument() const { return m_pData->xDocument; } - //-------------------------------------------------------------------- short MacroMigrationDialog::Execute() { short nResult = MacroMigrationDialog_Base::Execute(); @@ -198,7 +183,6 @@ namespace dbmm return nResult; } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::Close() { if ( m_pData->bMigrationIsRunning ) @@ -206,7 +190,6 @@ namespace dbmm return MacroMigrationDialog_Base::Close(); } - //-------------------------------------------------------------------- void MacroMigrationDialog::enterState( WizardState _nState ) { MacroMigrationDialog_Base::enterState( _nState ); @@ -260,7 +243,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::prepareLeaveCurrentState( CommitPageReason _eReason ) { if ( !MacroMigrationDialog_Base::prepareLeaveCurrentState( _eReason ) ) @@ -287,25 +269,21 @@ namespace dbmm return sal_True; } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::leaveState( WizardState _nState ) { return MacroMigrationDialog_Base::leaveState( _nState ); } - //-------------------------------------------------------------------- MacroMigrationDialog::WizardState MacroMigrationDialog::determineNextState( WizardState _nCurrentState ) const { return MacroMigrationDialog_Base::determineNextState( _nCurrentState ); } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::onFinish() { return MacroMigrationDialog_Base::onFinish(); } - //-------------------------------------------------------------------- IMPL_LINK( MacroMigrationDialog, OnStartMigration, void*, /*_pNotInterestedIn*/ ) { // prevent closing @@ -340,7 +318,6 @@ namespace dbmm return 0L; } - //-------------------------------------------------------------------- void MacroMigrationDialog::impl_showCloseDocsError( bool _bShow ) { PreparationPage* pPreparationPage = dynamic_cast< PreparationPage* >( GetPage( STATE_CLOSE_SUB_DOCS ) ); @@ -349,7 +326,6 @@ namespace dbmm pPreparationPage->showCloseDocsError( _bShow ); } - //-------------------------------------------------------------------- bool MacroMigrationDialog::impl_closeSubDocs_nothrow() { OSL_PRECOND( m_pData->xDocument.is(), "MacroMigrationDialog::impl_closeSubDocs_nothrow: no document!" ); @@ -391,7 +367,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- namespace { bool lcl_equalURLs_nothrow( @@ -422,7 +397,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MacroMigrationDialog::impl_backupDocument_nothrow() const { if ( !m_pData->xDocumentModel.is() ) @@ -473,7 +447,6 @@ namespace dbmm return false; } - //-------------------------------------------------------------------- void MacroMigrationDialog::impl_reloadDocument_nothrow( bool _bMigrationSuccess ) { typedef ::std::pair< Reference< XFrame >, OUString > ViewDescriptor; @@ -607,8 +580,6 @@ namespace dbmm } } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx index 51e04e4204c2..b8090606d12c 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx @@ -26,14 +26,10 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= MacroMigrationDialog - //==================================================================== + // MacroMigrationDialog struct MacroMigrationDialog_Data; typedef ::svt::RoadmapWizard MacroMigrationDialog_Base; class MacroMigrationDialog : public MacroMigrationDialog_Base @@ -76,9 +72,7 @@ namespace dbmm ::std::auto_ptr< MacroMigrationDialog_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MACROMIGRATIONDIALOG_HXX diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx index f95cdd7e7458..d76ade61dbcc 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbaccess_helpid.hrc" #include "dbmm_module.hxx" #include "dbmm_global.hrc" @@ -31,10 +30,8 @@ #include <tools/diagnose_ex.h> #include <vcl/metric.hxx> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -48,10 +45,7 @@ namespace dbmm using ::com::sun::star::uno::Sequence; using ::com::sun::star::frame::XModel; - //==================================================================== - //= MacroMigrationPage - //==================================================================== - //-------------------------------------------------------------------- + // MacroMigrationPage MacroMigrationPage::MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes ) :MacroMigrationPage_Base( &_rParentDialog, _rRes ) ,m_aHeader( this, MacroMigrationResId( FT_HEADER ) ) @@ -61,27 +55,21 @@ namespace dbmm m_aHeader.SetFont( aFont ); } - //-------------------------------------------------------------------- MacroMigrationPage::~MacroMigrationPage() { } - //-------------------------------------------------------------------- const MacroMigrationDialog& MacroMigrationPage::getDialog() const { return *dynamic_cast< const MacroMigrationDialog* >( GetParentDialog() ); } - //-------------------------------------------------------------------- MacroMigrationDialog& MacroMigrationPage::getDialog() { return *dynamic_cast< MacroMigrationDialog* >( GetParentDialog() ); } - //==================================================================== - //= PreparationPage - //==================================================================== - //-------------------------------------------------------------------- + // PreparationPage PreparationPage::PreparationPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_PREPARE ) ) ,m_aIntroduction ( this, MacroMigrationResId( FT_INTRODUCTION ) ) @@ -90,22 +78,17 @@ namespace dbmm FreeResource(); } - //-------------------------------------------------------------------- void PreparationPage::showCloseDocsError( bool _bShow ) { m_aCloseDocError.Show( _bShow ); } - //-------------------------------------------------------------------- TabPage* PreparationPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new PreparationPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //==================================================================== - //= SaveDBDocPage - //==================================================================== - //-------------------------------------------------------------------- + // SaveDBDocPage SaveDBDocPage::SaveDBDocPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_SAVE_DBDOC_AS ) ) ,m_aExplanation ( this, MacroMigrationResId( FT_EXPLANATION ) ) @@ -125,21 +108,18 @@ namespace dbmm impl_updateLocationDependentItems(); } - //-------------------------------------------------------------------- void SaveDBDocPage::impl_updateLocationDependentItems() { updateDialogTravelUI(); m_aStartMigration.Show( !m_aSaveAsLocation.GetText().isEmpty() ); } - //-------------------------------------------------------------------- IMPL_LINK( SaveDBDocPage, OnLocationModified, Edit*, /**/ ) { impl_updateLocationDependentItems(); return 0L; } - //-------------------------------------------------------------------- void SaveDBDocPage::initializePage() { OWizardPage::initializePage(); @@ -164,7 +144,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool SaveDBDocPage::canAdvance() const { if ( !MacroMigrationPage::canAdvance() ) @@ -173,7 +152,6 @@ namespace dbmm return !m_aSaveAsLocation.GetText().isEmpty(); } - //-------------------------------------------------------------------- sal_Bool SaveDBDocPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if ( !MacroMigrationPage::commitPage( _eReason ) ) @@ -188,16 +166,12 @@ namespace dbmm return sal_True; } - //-------------------------------------------------------------------- TabPage* SaveDBDocPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new SaveDBDocPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //==================================================================== - //= ProgressPage - //==================================================================== - //-------------------------------------------------------------------- + // ProgressPage ProgressPage::ProgressPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_MIGRATE ) ) ,m_aObjectCount ( this, MacroMigrationResId( FT_OBJECT_COUNT ) ) @@ -214,13 +188,11 @@ namespace dbmm FreeResource(); } - //-------------------------------------------------------------------- TabPage* ProgressPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new ProgressPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //-------------------------------------------------------------------- void ProgressPage::setDocumentCounts( const sal_Int32 _nForms, const sal_Int32 _nReports ) { OUString sText( m_aObjectCount.GetText() ); @@ -229,13 +201,11 @@ namespace dbmm m_aObjectCount.SetText( sText ); } - //-------------------------------------------------------------------- void ProgressPage::onFinishedSuccessfully() { m_aMigrationDone.Show(); } - //-------------------------------------------------------------------- void ProgressPage::startObject( const OUString& _rObjectName, const OUString& _rCurrentAction, const sal_uInt32 _nRange ) { m_aCurrentObject.SetText( _rObjectName ); @@ -250,7 +220,6 @@ namespace dbmm Update(); } - //-------------------------------------------------------------------- void ProgressPage::setObjectProgressText( const OUString& _rText ) { m_aCurrentAction.SetText( _rText ); @@ -258,14 +227,12 @@ namespace dbmm Update(); } - //-------------------------------------------------------------------- void ProgressPage::setObjectProgressValue( const sal_uInt32 _nValue ) { m_aCurrentProgress.SetValue( _nValue ); Update(); } - //-------------------------------------------------------------------- void ProgressPage::endObject() { m_aCurrentAction.SetText( OUString() ); @@ -274,31 +241,25 @@ namespace dbmm Update(); } - //-------------------------------------------------------------------- void ProgressPage::start( const sal_uInt32 _nOverallRange ) { m_aAllProgress.SetRange( _nOverallRange ); Update(); } - //-------------------------------------------------------------------- void ProgressPage::setOverallProgressText( const OUString& _rText ) { m_aAllProgressText.SetText( _rText ); Update(); } - //-------------------------------------------------------------------- void ProgressPage::setOverallProgressValue( const sal_uInt32 _nValue ) { m_aAllProgress.SetValue( _nValue ); Update(); } - //==================================================================== - //= ResultPage - //==================================================================== - //-------------------------------------------------------------------- + // ResultPage ResultPage::ResultPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_SUMMARY ) ) ,m_aChangesLabel( this, MacroMigrationResId( FT_CHANGES_LABEL ) ) @@ -309,13 +270,11 @@ namespace dbmm FreeResource(); } - //-------------------------------------------------------------------- TabPage* ResultPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new ResultPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //-------------------------------------------------------------------- void ResultPage::displayMigrationLog( const bool _bSuccessful, const OUString& _rSummary ) { m_aChangesLabel.SetText( _bSuccessful ? m_aSuccessful : m_aUnsuccessful ); @@ -342,8 +301,6 @@ namespace dbmm m_aChanges.SetPosPixel( aChangesPos ); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx index 0bb8c589ae12..082c49d733ad 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx @@ -35,16 +35,12 @@ namespace svt class RoadmapWizard; } -//........................................................................ namespace dbmm { -//........................................................................ class MacroMigrationDialog; - //==================================================================== - //= MacroMigrationPage - //==================================================================== + // MacroMigrationPage typedef ::svt::OWizardPage MacroMigrationPage_Base; class MacroMigrationPage : public MacroMigrationPage_Base { @@ -60,9 +56,7 @@ namespace dbmm FixedText m_aHeader; }; - //==================================================================== - //= PreparationPage - //==================================================================== + // PreparationPage class PreparationPage : public MacroMigrationPage { public: @@ -78,9 +72,7 @@ namespace dbmm FixedText m_aCloseDocError; }; - //==================================================================== - //= SaveDBDocPage - //==================================================================== + // SaveDBDocPage class SaveDBDocPage : public MacroMigrationPage { public: @@ -111,9 +103,7 @@ namespace dbmm void impl_updateLocationDependentItems(); }; - //==================================================================== - //= ProgressPage - //==================================================================== + // ProgressPage class ProgressPage : public MacroMigrationPage, public IMigrationProgress { public: @@ -147,9 +137,7 @@ namespace dbmm FixedText m_aMigrationDone; }; - //==================================================================== - //= ResultPage - //==================================================================== + // ResultPage class ResultPage : public MacroMigrationPage { public: @@ -166,9 +154,7 @@ namespace dbmm OUString m_aUnsuccessful; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MACROMIGRATIONPAGES_HXX diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx index 0485a1293f32..4c2212271779 100644 --- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" #include "dbmm_global.hrc" #include "macromigrationdialog.hxx" @@ -28,10 +27,8 @@ #include <svtools/genericunodialog.hxx> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -51,9 +48,7 @@ namespace dbmm using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::frame::XStorable; - //==================================================================== - //= MacroMigrationDialogService - //==================================================================== + // MacroMigrationDialogService class MacroMigrationDialogService; typedef ::svt::OGenericUnoDialog MacroMigrationDialogService_Base; typedef ::comphelper::OPropertyArrayUsageHelper< MacroMigrationDialogService > MacroMigrationDialogService_PBase; @@ -100,10 +95,7 @@ namespace dbmm Reference< XOfficeDatabaseDocument > m_xDocument; }; - //==================================================================== - //= MacroMigrationDialogService - //==================================================================== - //-------------------------------------------------------------------- + // MacroMigrationDialogService MacroMigrationDialogService::MacroMigrationDialogService( const Reference< XComponentContext >& _rxContext ) :MacroMigrationDialogService_Base( _rxContext ) ,m_aContext( _rxContext ) @@ -111,7 +103,6 @@ namespace dbmm m_bNeedInitialization = true; } - //-------------------------------------------------------------------- MacroMigrationDialogService::~MacroMigrationDialogService() { // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor, @@ -124,25 +115,21 @@ namespace dbmm } } - //-------------------------------------------------------------------- Reference< XInterface > SAL_CALL MacroMigrationDialogService::Create( const Reference< XComponentContext >& _rxContext ) { return *(new MacroMigrationDialogService( _rxContext ) ); } - //-------------------------------------------------------------------- Dialog* MacroMigrationDialogService::createDialog( Window* _pParent ) { return new MacroMigrationDialog( _pParent, m_aContext, m_xDocument ); } - //-------------------------------------------------------------------- void MacroMigrationDialogService::destroyDialog() { MacroMigrationDialogService_Base::destroyDialog(); } - //-------------------------------------------------------------------- Sequence< sal_Int8 > SAL_CALL MacroMigrationDialogService::getImplementationId() throw(RuntimeException) { static ::cppu::OImplementationId* pId = NULL; @@ -158,13 +145,11 @@ namespace dbmm return pId->getImplementationId(); } - //-------------------------------------------------------------------- OUString SAL_CALL MacroMigrationDialogService::getImplementationName_static() throw(RuntimeException) { return OUString( "com.sun.star.comp.dbaccess.macromigration.MacroMigrationDialogService" ); } - //-------------------------------------------------------------------- Sequence< OUString > SAL_CALL MacroMigrationDialogService::getSupportedServiceNames_static() throw(RuntimeException) { Sequence< OUString > aServices(1); @@ -172,19 +157,16 @@ namespace dbmm return aServices; } - //-------------------------------------------------------------------- OUString SAL_CALL MacroMigrationDialogService::getImplementationName() throw(RuntimeException) { return getImplementationName_static(); } - //-------------------------------------------------------------------- Sequence< OUString > SAL_CALL MacroMigrationDialogService::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_static(); } - //-------------------------------------------------------------------- void SAL_CALL MacroMigrationDialogService::initialize( const Sequence< Any >& _rArguments ) throw(Exception, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -217,19 +199,16 @@ namespace dbmm m_bInitialized = true; } - //-------------------------------------------------------------------- Reference< XPropertySetInfo > SAL_CALL MacroMigrationDialogService::getPropertySetInfo() throw(RuntimeException) { return createPropertySetInfo( getInfoHelper() ); } - //-------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& SAL_CALL MacroMigrationDialogService::getInfoHelper() { return *const_cast< MacroMigrationDialogService* >( this )->getArrayHelper(); } - //-------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* MacroMigrationDialogService::createArrayHelper( ) const { Sequence< Property > aProps; @@ -237,14 +216,11 @@ namespace dbmm return new ::cppu::OPropertyArrayHelper( aProps ); } - //-------------------------------------------------------------------- void createRegistryInfo_MacroMigrationDialogService() { static OAutoRegistration< MacroMigrationDialogService > aAutoRegistration; } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index b9a12d11362d..34040d6cc205 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_global.hrc" #include "dbmm_module.hxx" #include "dbmm_types.hxx" @@ -75,10 +74,8 @@ #define DEFAULT_DOC_PROGRESS_RANGE 100000 -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -144,9 +141,7 @@ namespace dbmm #define PHASE_BASIC 5 #define PHASE_DIALOGS 6 - //==================================================================== - //= SubDocument - //==================================================================== + // SubDocument struct SubDocument { Reference< XCommandProcessor > xCommandProcessor; @@ -168,22 +163,17 @@ namespace dbmm typedef ::std::vector< SubDocument > SubDocuments; - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper typedef ::utl::SharedUNOComponent< XStorage > SharedStorage; namespace { - //---------------------------------------------------------------- static const OUString& lcl_getScriptsStorageName() { static const OUString s_sScriptsStorageName( "Scripts" ); return s_sScriptsStorageName; } - //---------------------------------------------------------------- static const OUString& lcl_getScriptsSubStorageName( const ScriptType _eType ) { static const OUString s_sBeanShell ( "beanshell" ); @@ -206,7 +196,6 @@ namespace dbmm return s_sEmpty; } - //---------------------------------------------------------------- static bool lcl_getScriptTypeFromLanguage( const OUString& _rLanguage, ScriptType& _out_rScriptType ) { struct LanguageMapping @@ -240,7 +229,6 @@ namespace dbmm return false; } - //---------------------------------------------------------------- OUString lcl_getSubDocumentDescription( const SubDocument& _rDocument ) { OUString sObjectName( @@ -250,7 +238,6 @@ namespace dbmm return sObjectName; } - //---------------------------------------------------------------- static Any lcl_executeCommand_throw( const Reference< XCommandProcessor >& _rxCommandProc, const sal_Char* _pAsciiCommand ) { @@ -264,7 +251,6 @@ namespace dbmm aCommand, _rxCommandProc->createCommandIdentifier(), NULL ); } - //---------------------------------------------------------------- OUString lcl_getMimeType_nothrow( const Reference< XCommandProcessor >& _rxContent ) { OUString sMimeType; @@ -280,7 +266,6 @@ namespace dbmm return sMimeType; } - //---------------------------------------------------------------- enum OpenDocResult { eOpenedDoc, @@ -288,7 +273,6 @@ namespace dbmm eFailure }; - //---------------------------------------------------------------- static OpenDocResult lcl_loadSubDocument_nothrow( SubDocument& _rDocument, const Reference< XStatusIndicator >& _rxProgress, MigrationLog& _rLogger ) { @@ -343,7 +327,6 @@ namespace dbmm return _rDocument.xDocument.is() ? eOpenedDoc : eFailure; } - //---------------------------------------------------------------- static bool lcl_unloadSubDocument_nothrow( SubDocument& _rDocument, MigrationLog& _rLogger ) { bool bSuccess = false; @@ -371,7 +354,6 @@ namespace dbmm return bSuccess; } - //---------------------------------------------------------------- bool lcl_commitStorage_nothrow( const Reference< XStorage >& _rxStorage ) { try @@ -386,7 +368,6 @@ namespace dbmm return true; } - //---------------------------------------------------------------- bool lcl_commitDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) { bool bSuccess = false; @@ -414,7 +395,6 @@ namespace dbmm return bSuccess; } - //---------------------------------------------------------------- bool lcl_storeDocument_nothrow( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) { bool bSuccess = false; @@ -441,7 +421,6 @@ namespace dbmm return bSuccess; } - //---------------------------------------------------------------- bool lcl_storeEmbeddedDocument_nothrow( const SubDocument& _rDocument ) { try @@ -457,9 +436,7 @@ namespace dbmm } } - //==================================================================== - //= DrawPageIterator - //==================================================================== + // DrawPageIterator class DrawPageIterator { public: @@ -511,9 +488,7 @@ namespace dbmm sal_Int32 m_nCurrentPage; }; - //==================================================================== - //= FormComponentScripts - //==================================================================== + // FormComponentScripts class FormComponentScripts { public: @@ -549,9 +524,7 @@ namespace dbmm const sal_Int32 m_nIndex; }; - //==================================================================== - //= FormComponentIterator - //==================================================================== + // FormComponentIterator class FormComponentIterator { public: @@ -587,9 +560,7 @@ namespace dbmm }; - //==================================================================== - //= ScriptsStorage - declaration - //==================================================================== + // ScriptsStorage - declaration /** a helper class which encapsulates access to the storages for Java/Script, BeanShell, and Python scripts, i.e. all script types which can be manipulated on storage level. */ @@ -646,17 +617,13 @@ namespace dbmm SharedStorage m_xScriptsStorage; }; - //==================================================================== - //= ScriptsStorage - implementation - //==================================================================== - //-------------------------------------------------------------------- + // ScriptsStorage - implementation ScriptsStorage::ScriptsStorage( MigrationLog& _rLogger ) :m_rLogger( _rLogger ) ,m_xScriptsStorage() { } - //-------------------------------------------------------------------- ScriptsStorage::ScriptsStorage( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) :m_rLogger( _rLogger ) ,m_xScriptsStorage() @@ -664,18 +631,15 @@ namespace dbmm bind( _rxDocument ); } - //-------------------------------------------------------------------- ScriptsStorage::~ScriptsStorage() { } - //-------------------------------------------------------------------- bool ScriptsStorage::commit() { return lcl_commitStorage_nothrow( m_xScriptsStorage ); } - //-------------------------------------------------------------------- void ScriptsStorage::bind( const Reference< XModel >& _rxDocument ) { OSL_PRECOND( !isValid(), "ScriptsStorage:bind: did not bother, yet, to check whether this is allowed!" ); @@ -710,7 +674,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool ScriptsStorage::hasScripts( const ScriptType _eType ) const { OSL_PRECOND( isValid(), "ScriptsStorage::hasScripts: illegal call!" ); @@ -722,7 +685,6 @@ namespace dbmm && m_xScriptsStorage->isStorageElement( rSubStorageName ); } - //-------------------------------------------------------------------- SharedStorage ScriptsStorage::getScriptsRoot( const ScriptType _eType ) const { SharedStorage xStorage; @@ -735,7 +697,6 @@ namespace dbmm return xStorage; } - //-------------------------------------------------------------------- ::std::set< OUString > ScriptsStorage::getElementNames() const { Sequence< OUString > aElementNames; @@ -751,7 +712,6 @@ namespace dbmm return aNames; } - //-------------------------------------------------------------------- void ScriptsStorage::removeScriptTypeStorage( const ScriptType _eType ) const { OUString sSubStorageName( lcl_getScriptsSubStorageName( _eType ) ); @@ -759,7 +719,6 @@ namespace dbmm m_xScriptsStorage->removeElement( sSubStorageName ); } - //-------------------------------------------------------------------- bool ScriptsStorage::removeFromDocument( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) { try @@ -780,9 +739,7 @@ namespace dbmm return true; } - //==================================================================== - //= ProgressDelegator - //==================================================================== + // ProgressDelegator class ProgressDelegator : public IProgressConsumer { public: @@ -819,9 +776,7 @@ namespace dbmm OUString m_sAction; }; - //==================================================================== - //= PhaseGuard - //==================================================================== + // PhaseGuard class PhaseGuard { public: @@ -850,9 +805,7 @@ namespace dbmm ProgressMixer& m_rMixer; }; - //==================================================================== - //= MigrationEngine_Impl - declaration - //==================================================================== + // MigrationEngine_Impl - declaration class MigrationEngine_Impl { public: @@ -979,10 +932,7 @@ namespace dbmm ) const; }; - //==================================================================== - //= MigrationEngine_Impl - implementation - //==================================================================== - //-------------------------------------------------------------------- + // MigrationEngine_Impl - implementation MigrationEngine_Impl::MigrationEngine_Impl( const Reference<XComponentContext>& _rContext, const Reference< XOfficeDatabaseDocument >& _rxDocument, IMigrationProgress& _rProgress, MigrationLog& _rLogger ) :m_aContext( _rContext ) @@ -998,12 +948,10 @@ namespace dbmm OSL_VERIFY( impl_collectSubDocuments_nothrow() ); } - //-------------------------------------------------------------------- MigrationEngine_Impl::~MigrationEngine_Impl() { } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::migrateAll() { if ( m_aSubDocs.empty() ) @@ -1053,7 +1001,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- namespace { void lcl_collectHierarchicalElementNames_throw( @@ -1091,7 +1038,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_collectSubDocuments_nothrow() { OSL_PRECOND( m_xDocument.is(), "MigrationEngine_Impl::impl_collectSubDocuments_nothrow: invalid document!" ); @@ -1119,7 +1065,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_handleDocument_nothrow( const SubDocument& _rDocument ) const { OSL_ENSURE( m_nCurrentDocumentID == -1, @@ -1130,7 +1075,6 @@ namespace dbmm OUString sObjectName( lcl_getSubDocumentDescription( _rDocument ) ); m_rProgress.startObject( sObjectName, OUString(), DEFAULT_DOC_PROGRESS_RANGE ); - // ----------------- // load the document Reference< ProgressCapture > pStatusIndicator( new ProgressCapture( sObjectName, m_rProgress ) ); SubDocument aSubDocument( _rDocument ); @@ -1144,7 +1088,6 @@ namespace dbmm return ( eResult == eIgnoreDoc ); } - // ----------------- // migrate the libraries ProgressDelegator aDelegator(m_rProgress, sObjectName, MacroMigrationResId(STR_MIGRATING_LIBS).toString()); ProgressMixer aProgressMixer( aDelegator ); @@ -1181,7 +1124,6 @@ namespace dbmm impl_adjustFormComponentEvents_nothrow( aSubDocument ); } - // ----------------- // clean up // store the sub document, including removal of the (now obsolete) "Scripts" sub folder if ( m_rLogger.movedAnyLibrary( m_nCurrentDocumentID ) ) @@ -1206,7 +1148,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- namespace { static OUString lcl_createTargetLibName( const SubDocument& _rDocument, @@ -1266,7 +1207,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_checkScriptStorageStructure_nothrow( const SubDocument& _rDocument ) const { OSL_PRECOND( _rDocument.xDocument.is(), "MigrationEngine_Impl::impl_checkScriptStorageStructure_nothrow: invalid document!" ); @@ -1311,7 +1251,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_migrateScriptStorage_nothrow( const SubDocument& _rDocument, const ScriptType _eScriptType, ProgressMixer& _rProgress, const PhaseID _nPhaseID ) const { @@ -1441,7 +1380,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_migrateContainerLibraries_nothrow( const SubDocument& _rDocument, const ScriptType _eScriptType, ProgressMixer& _rProgress, const PhaseID _nPhaseID ) const { @@ -1603,7 +1541,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( const OUString& _rScriptType, OUString& _inout_rScriptCode ) const { @@ -1696,7 +1633,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( ScriptEventDescriptor& _inout_rScriptEvent ) const { if ( !(_inout_rScriptEvent.ScriptType.isEmpty() || _inout_rScriptEvent.ScriptCode.isEmpty()) ) @@ -1704,7 +1640,6 @@ namespace dbmm return false; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( Any& _inout_rScriptDescriptor ) const { ::comphelper::NamedValueCollection aScriptDesc( _inout_rScriptDescriptor ); @@ -1733,7 +1668,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustDocumentEvents_nothrow( const SubDocument& _rDocument ) const { try @@ -1776,7 +1710,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- void MigrationEngine_Impl::impl_adjustDialogElementEvents_throw( const Reference< XInterface >& _rxElement ) const { Reference< XScriptEventsSupplier > xEventsSupplier( _rxElement, UNO_QUERY_THROW ); @@ -1798,7 +1731,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustDialogEvents_nothrow( Any& _inout_rDialogLibraryElement, const OUString& _rDocName, const OUString& _rDialogLibName, const OUString& _rDialogName ) const { @@ -1841,7 +1773,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- void MigrationEngine_Impl::impl_adjustFormComponentEvents_throw( const Reference< XIndexAccess >& _rxComponentContainer ) const { FormComponentIterator aCompIter( _rxComponentContainer ); @@ -1873,7 +1804,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustFormComponentEvents_nothrow( const SubDocument& _rDocument ) const { try @@ -1898,7 +1828,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_unprotectPasswordLibrary_throw( const Reference< XLibraryContainerPassword >& _rxPasswordManager, const ScriptType _eScriptType, const OUString& _rLibraryName ) const { @@ -1927,10 +1856,7 @@ namespace dbmm } - //==================================================================== - //= MigrationEngine - //==================================================================== - //-------------------------------------------------------------------- + // MigrationEngine MigrationEngine::MigrationEngine( const Reference<XComponentContext>& _rContext, const Reference< XOfficeDatabaseDocument >& _rxDocument, IMigrationProgress& _rProgress, MigrationLog& _rLogger ) @@ -1938,31 +1864,25 @@ namespace dbmm { } - //-------------------------------------------------------------------- MigrationEngine::~MigrationEngine() { } - //-------------------------------------------------------------------- sal_Int32 MigrationEngine::getFormCount() const { return m_pImpl->getFormCount(); } - //-------------------------------------------------------------------- sal_Int32 MigrationEngine::getReportCount() const { return m_pImpl->getReportCount(); } - //-------------------------------------------------------------------- bool MigrationEngine::migrateAll() { return m_pImpl->migrateAll(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/migrationengine.hxx b/dbaccess/source/ext/macromigration/migrationengine.hxx index 01f1116b699a..c4428939a283 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.hxx +++ b/dbaccess/source/ext/macromigration/migrationengine.hxx @@ -24,17 +24,13 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ class IMigrationProgress; class MigrationLog; - //==================================================================== - //= MigrationEngine - //==================================================================== + // MigrationEngine class MigrationEngine_Impl; class MigrationEngine { @@ -77,9 +73,7 @@ namespace dbmm ::std::auto_ptr< MigrationEngine_Impl > m_pImpl; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONENGINE_HXX diff --git a/dbaccess/source/ext/macromigration/migrationerror.hxx b/dbaccess/source/ext/macromigration/migrationerror.hxx index 0feca29d89b6..1c5b175d2d5f 100644 --- a/dbaccess/source/ext/macromigration/migrationerror.hxx +++ b/dbaccess/source/ext/macromigration/migrationerror.hxx @@ -24,10 +24,8 @@ #include <vector> -//........................................................................ namespace dbmm { -//........................................................................ enum MigrationErrorType { @@ -58,9 +56,7 @@ namespace dbmm ERR_NEW_STYLE_REPORT }; - //==================================================================== - //= MigrationError - //==================================================================== + // MigrationError /** encapsulates information about an error which happened during the migration */ struct MigrationError @@ -156,9 +152,7 @@ namespace dbmm } }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONERROR_HXX diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx index f4c1ac9068f5..6f45ad73d072 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.cxx +++ b/dbaccess/source/ext/macromigration/migrationlog.cxx @@ -17,13 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" #include "dbmm_global.hrc" #include "migrationerror.hxx" #include "migrationlog.hxx" - #include <comphelper/anytostring.hxx> #include <tools/string.hxx> #include <rtl/ustrbuf.hxx> @@ -32,12 +30,9 @@ #include <map> #include <list> -//........................................................................ namespace dbmm { - //==================================================================== - //= LibraryEntry - //==================================================================== + // LibraryEntry struct LibraryEntry { ScriptType eType; @@ -59,9 +54,7 @@ namespace dbmm } }; - //==================================================================== - //= DocumentEntry - //==================================================================== + // DocumentEntry struct DocumentEntry { SubDocumentType eType; @@ -82,19 +75,13 @@ namespace dbmm } }; - //==================================================================== - //= DocumentLogs - //==================================================================== + // DocumentLogs typedef ::std::map< DocumentID, DocumentEntry > DocumentLogs; - //==================================================================== - //= ErrorLog - //==================================================================== + // ErrorLog typedef ::std::list< MigrationError > ErrorLog; - //==================================================================== - //= MigrationLog_Data - //==================================================================== + // MigrationLog_Data struct MigrationLog_Data { OUString sBackupLocation; @@ -103,45 +90,36 @@ namespace dbmm ErrorLog aWarnings; }; - //==================================================================== - //= MigrationLog - //==================================================================== - //-------------------------------------------------------------------- + // MigrationLog MigrationLog::MigrationLog() :m_pData( new MigrationLog_Data ) { } - //-------------------------------------------------------------------- MigrationLog::~MigrationLog() { } - //-------------------------------------------------------------------- void MigrationLog::logFailure( const MigrationError& _rError ) { m_pData->aFailures.push_back( _rError ); } - //-------------------------------------------------------------------- void MigrationLog::logRecoverable( const MigrationError& _rError ) { m_pData->aWarnings.push_back( _rError ); } - //-------------------------------------------------------------------- bool MigrationLog::hadFailure() const { return !m_pData->aFailures.empty(); } - //-------------------------------------------------------------------- void MigrationLog::backedUpDocument( const OUString& _rNewDocumentLocation ) { m_pData->sBackupLocation = _rNewDocumentLocation; } - //-------------------------------------------------------------------- DocumentID MigrationLog::startedDocument( const SubDocumentType _eType, const OUString& _rName ) { #if OSL_DEBUG_LEVEL > 0 @@ -165,7 +143,6 @@ namespace dbmm return nID; } - //-------------------------------------------------------------------- void MigrationLog::movedLibrary( const DocumentID _nDocID, const ScriptType _eScriptType, const OUString& _rOriginalLibName, const OUString& _rNewLibName ) { @@ -176,7 +153,6 @@ namespace dbmm rDocEntry.aMovedLibraries.push_back( LibraryEntry( _eScriptType, _rOriginalLibName, _rNewLibName ) ); } - //-------------------------------------------------------------------- void MigrationLog::finishedDocument( const DocumentID _nDocID ) { OSL_ENSURE( m_pData->aDocumentLogs.find( _nDocID ) != m_pData->aDocumentLogs.end(), @@ -187,7 +163,6 @@ namespace dbmm // nothing to do here } - //-------------------------------------------------------------------- const OUString& MigrationLog::getNewLibraryName( DocumentID _nDocID, ScriptType _eScriptType, const OUString& _rOriginalLibName ) const { @@ -216,10 +191,8 @@ namespace dbmm return s_sEmptyString; } - //-------------------------------------------------------------------- namespace { - //---------------------------------------------------------------- static void lcl_appendErrorDescription( OUStringBuffer& _inout_rBuffer, const MigrationError& _rError ) { const sal_Char* pAsciiErrorDescription( NULL ); @@ -378,7 +351,6 @@ namespace dbmm } } - //---------------------------------------------------------------- void lcl_describeErrors( OUStringBuffer& _rBuffer, const ErrorLog& _rErrors, const sal_uInt16 _nHeadingResId ) { _rBuffer.appendAscii( "=== " ); @@ -408,7 +380,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationLog::movedAnyLibrary( const DocumentID _nDocID ) { DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID ); @@ -420,7 +391,6 @@ namespace dbmm return !docPos->second.aMovedLibraries.empty(); } - //-------------------------------------------------------------------- OUString MigrationLog::getCompleteLog() const { OUStringBuffer aBuffer; @@ -483,8 +453,6 @@ namespace dbmm return aBuffer.makeStringAndClear(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/migrationlog.hxx b/dbaccess/source/ext/macromigration/migrationlog.hxx index 5264505ffd1d..498739f2de6b 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.hxx +++ b/dbaccess/source/ext/macromigration/migrationlog.hxx @@ -26,17 +26,13 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ typedef sal_Int16 DocumentID; struct MigrationError; - //==================================================================== - //= MigrationLog - //==================================================================== + // MigrationLog struct MigrationLog_Data; class MigrationLog { @@ -44,7 +40,6 @@ namespace dbmm MigrationLog(); ~MigrationLog(); - //---------------------------------------------------------------- //- event logging /** logs an unrecoverable error during the migration process @@ -80,7 +75,6 @@ namespace dbmm */ void finishedDocument( const DocumentID _nDocID ); - //---------------------------------------------------------------- //- information retrieval /** retrieves the new name of a library @@ -110,9 +104,7 @@ namespace dbmm ::std::auto_ptr< MigrationLog_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONLOG_HXX diff --git a/dbaccess/source/ext/macromigration/migrationprogress.hxx b/dbaccess/source/ext/macromigration/migrationprogress.hxx index bf9943c7538a..804f2c24cb8d 100644 --- a/dbaccess/source/ext/macromigration/migrationprogress.hxx +++ b/dbaccess/source/ext/macromigration/migrationprogress.hxx @@ -20,14 +20,10 @@ #ifndef DBACCESS_MIGRATIONPROGRESS_HXX #define DBACCESS_MIGRATIONPROGRESS_HXX -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= IMigrationProgress - //==================================================================== + // IMigrationProgress class SAL_NO_VTABLE IMigrationProgress { public: @@ -43,9 +39,7 @@ namespace dbmm ~IMigrationProgress() {} }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONPROGRESS_HXX diff --git a/dbaccess/source/ext/macromigration/progresscapture.cxx b/dbaccess/source/ext/macromigration/progresscapture.cxx index efdb8af3c3d4..14cb911aeac7 100644 --- a/dbaccess/source/ext/macromigration/progresscapture.cxx +++ b/dbaccess/source/ext/macromigration/progresscapture.cxx @@ -23,10 +23,8 @@ #include <vcl/svapp.hxx> #include <osl/mutex.hxx> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -38,9 +36,7 @@ namespace dbmm using ::com::sun::star::uno::Any; using ::com::sun::star::uno::makeAny; - //==================================================================== - //= ProgressCapture_Data - //==================================================================== + // ProgressCapture_Data struct ProgressCapture_Data { ProgressCapture_Data( const OUString& _rObjectName, IMigrationProgress& _rMasterProgress ) @@ -55,28 +51,22 @@ namespace dbmm bool bDisposed; }; - //==================================================================== - //= ProgressCapture - //==================================================================== - //-------------------------------------------------------------------- + // ProgressCapture ProgressCapture::ProgressCapture( const OUString& _rObjectName, IMigrationProgress& _rMasterProgress ) :m_pData( new ProgressCapture_Data( _rObjectName, _rMasterProgress ) ) { } - //-------------------------------------------------------------------- ProgressCapture::~ProgressCapture() { } - //-------------------------------------------------------------------- void ProgressCapture::dispose() { SolarMutexGuard aGuard; m_pData->bDisposed = true; } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::start( const OUString& _rText, ::sal_Int32 _nRange ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -84,7 +74,6 @@ namespace dbmm m_pData->rMasterProgress.startObject( m_pData->sObjectName, _rText, _nRange ); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::end( ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -92,7 +81,6 @@ namespace dbmm m_pData->rMasterProgress.endObject(); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::setText( const OUString& _rText ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -100,7 +88,6 @@ namespace dbmm m_pData->rMasterProgress.setObjectProgressText( _rText ); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::setValue( ::sal_Int32 _nValue ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -108,14 +95,11 @@ namespace dbmm m_pData->rMasterProgress.setObjectProgressValue( _nValue ); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::reset( ) throw (RuntimeException) { OSL_FAIL( "ProgressCapture::reset: not implemented!" ); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/progresscapture.hxx b/dbaccess/source/ext/macromigration/progresscapture.hxx index c3a5b3a1b29a..f060d1147d59 100644 --- a/dbaccess/source/ext/macromigration/progresscapture.hxx +++ b/dbaccess/source/ext/macromigration/progresscapture.hxx @@ -26,16 +26,12 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ class IMigrationProgress; - //==================================================================== - //= ProgressCapture - //==================================================================== + // ProgressCapture typedef ::cppu::WeakImplHelper1 < ::com::sun::star::task::XStatusIndicator > ProgressCapture_Base; @@ -62,9 +58,7 @@ namespace dbmm ::std::auto_ptr< ProgressCapture_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_PROGRESSCAPTURE_HXX diff --git a/dbaccess/source/ext/macromigration/progressmixer.cxx b/dbaccess/source/ext/macromigration/progressmixer.cxx index 5f883d38f7bb..87c7d84579d1 100644 --- a/dbaccess/source/ext/macromigration/progressmixer.cxx +++ b/dbaccess/source/ext/macromigration/progressmixer.cxx @@ -23,14 +23,11 @@ #include <map> -//........................................................................ namespace dbmm { #define OVERALL_RANGE 100000 - //==================================================================== - //= misc types - //==================================================================== + // misc types struct PhaseData { // the weight of the phase, relative to all other phases @@ -63,9 +60,7 @@ namespace dbmm typedef ::std::map< PhaseID, PhaseData > Phases; - //==================================================================== - //= ProgressMixer_Data - //==================================================================== + // ProgressMixer_Data struct ProgressMixer_Data { Phases aPhases; @@ -84,17 +79,14 @@ namespace dbmm } }; - //-------------------------------------------------------------------- namespace { #if OSL_DEBUG_LEVEL > 0 - //---------------------------------------------------------------- bool lcl_isRunning( const ProgressMixer_Data& _rData ) { return _rData.pCurrentPhase != _rData.aPhases.end(); } #endif - //---------------------------------------------------------------- void lcl_ensureInitialized( ProgressMixer_Data& _rData ) { OSL_PRECOND( _rData.nWeightSum, "lcl_ensureInitialized: we have no phases, this will crash!" ); @@ -122,21 +114,16 @@ namespace dbmm } } - //==================================================================== - //= ProgressMixer - //==================================================================== - //-------------------------------------------------------------------- + // ProgressMixer ProgressMixer::ProgressMixer( IProgressConsumer& _rConsumer ) :m_pData( new ProgressMixer_Data( _rConsumer ) ) { } - //-------------------------------------------------------------------- ProgressMixer::~ProgressMixer() { } - //-------------------------------------------------------------------- void ProgressMixer::registerPhase( const PhaseID _nID, const PhaseWeight _nWeight ) { OSL_PRECOND( !lcl_isRunning( *m_pData ), "ProgressMixer::registerPhase: already running!" ); @@ -146,7 +133,6 @@ namespace dbmm m_pData->nWeightSum += _nWeight; } - //-------------------------------------------------------------------- void ProgressMixer::startPhase( const PhaseID _nID, const sal_uInt32 _nPhaseRange ) { OSL_ENSURE( m_pData->aPhases.find( _nID ) != m_pData->aPhases.end(), @@ -156,7 +142,6 @@ namespace dbmm m_pData->pCurrentPhase = m_pData->aPhases.find( _nID ); } - //-------------------------------------------------------------------- void ProgressMixer::advancePhase( const sal_uInt32 _nPhaseProgress ) { OSL_PRECOND( lcl_isRunning( *m_pData ), "ProgresMixer::advancePhase: not running!" ); @@ -174,7 +159,6 @@ namespace dbmm m_pData->rConsumer.advance( nOverallProgress ); } - //-------------------------------------------------------------------- void ProgressMixer::endPhase() { OSL_PRECOND( lcl_isRunning( *m_pData ), "ProgresMixer::endPhase: not running!" ); @@ -193,8 +177,6 @@ namespace dbmm m_pData->rConsumer.end(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/progressmixer.hxx b/dbaccess/source/ext/macromigration/progressmixer.hxx index 39d6ccd32135..5155d06d8563 100644 --- a/dbaccess/source/ext/macromigration/progressmixer.hxx +++ b/dbaccess/source/ext/macromigration/progressmixer.hxx @@ -24,17 +24,13 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ typedef sal_uInt32 PhaseID; typedef sal_uInt32 PhaseWeight; - //==================================================================== - //= IProgressConsumer - //==================================================================== + // IProgressConsumer class SAL_NO_VTABLE IProgressConsumer { public: @@ -46,9 +42,7 @@ namespace dbmm ~IProgressConsumer() {} }; - //==================================================================== - //= ProgressMixer - //==================================================================== + // ProgressMixer struct ProgressMixer_Data; /** a class which mixes (i.e. concatenates) progress values from different sources/phases, with different weight @@ -86,9 +80,7 @@ namespace dbmm ::std::auto_ptr< ProgressMixer_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_PROGRESSMIXER_HXX diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx index de9341636718..5e5614a7f498 100644 --- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx +++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx @@ -22,14 +22,10 @@ #include <vcl/prgsbar.hxx> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= RangeProgressBar - //==================================================================== + // RangeProgressBar /** a slight extension of the usual progress bar, which is able to remember a range */ class RangeProgressBar : public ProgressBar @@ -59,7 +55,6 @@ namespace dbmm using ProgressBar::GetValue; }; - //-------------------------------------------------------------------- inline void RangeProgressBar::SetRange( sal_uInt32 _nRange ) { m_nRange = _nRange; @@ -67,28 +62,22 @@ namespace dbmm m_nRange = 100; } - //-------------------------------------------------------------------- inline sal_uInt32 RangeProgressBar::GetRange() const { return m_nRange; } - //-------------------------------------------------------------------- inline void RangeProgressBar::SetValue( sal_uInt32 _nValue ) { ProgressBar::SetValue( (sal_uInt16)( 100.0 * _nValue / m_nRange ) ); } - //-------------------------------------------------------------------- inline sal_uInt32 RangeProgressBar::GetValue() const { return (sal_uInt32)( ProgressBar::GetValue() / 100.0 * m_nRange ); } - -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_RANGEPROGRESSBAR_HXX |