summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/recovery
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2013-08-17 23:43:14 +0200
committerPetr Mladek <pmladek@suse.cz>2013-08-27 16:11:09 +0000
commit2ec606730bc95b58390a609df0a88958869a4066 (patch)
tree9c530b3f6b200305ba224dda2d02c9bf5aca2233 /dbaccess/source/core/recovery
parent434f3c8e7fac0644cfe1d7a15f97f0c267bac048 (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/core/recovery')
-rw-r--r--dbaccess/source/core/recovery/dbdocrecovery.cxx27
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx39
-rw-r--r--dbaccess/source/core/recovery/settingsimport.hxx24
-rw-r--r--dbaccess/source/core/recovery/storagestream.cxx19
-rw-r--r--dbaccess/source/core/recovery/storagestream.hxx12
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.cxx23
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.hxx8
-rw-r--r--dbaccess/source/core/recovery/storagexmlstream.cxx32
-rw-r--r--dbaccess/source/core/recovery/storagexmlstream.hxx12
-rw-r--r--dbaccess/source/core/recovery/subcomponentloader.cxx26
-rw-r--r--dbaccess/source/core/recovery/subcomponentloader.hxx8
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx48
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.hxx9
-rw-r--r--dbaccess/source/core/recovery/subcomponents.hxx8
14 files changed, 36 insertions, 259 deletions
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 45a09f76692c..312a6862fc18 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "recovery/dbdocrecovery.hxx"
#include "sdbcoretools.hxx"
#include "storagetextstream.hxx"
@@ -41,10 +40,8 @@
#include <algorithm>
-//........................................................................
namespace dbaccess
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -76,12 +73,9 @@ namespace dbaccess
namespace ElementModes = ::com::sun::star::embed::ElementModes;
- //====================================================================
- //= helpers
- //====================================================================
+ // helpers
namespace
{
- // .........................................................................
static void lcl_getPersistentRepresentation( const MapStringToCompDesc::value_type& i_rComponentDesc, OUStringBuffer& o_rBuffer )
{
o_rBuffer.append( i_rComponentDesc.first );
@@ -91,7 +85,6 @@ namespace dbaccess
o_rBuffer.append( sal_Unicode( i_rComponentDesc.second.bForEditing ? '1' : '0' ) );
}
- // .........................................................................
static bool lcl_extractCompDesc( const OUString& i_rIniLine, OUString& o_rStorName, SubComponentDescriptor& o_rCompDesc )
{
const sal_Int32 nEqualSignPos = i_rIniLine.indexOf( sal_Unicode( '=' ) );
@@ -156,7 +149,6 @@ namespace dbaccess
aTextOutput.writeLine();
}
- // .........................................................................
static bool lcl_isSectionStart( const OUString& i_rIniLine, OUString& o_rSectionName )
{
const sal_Int32 nLen = i_rIniLine.getLength();
@@ -168,7 +160,6 @@ namespace dbaccess
return false;
}
- // .........................................................................
static void lcl_stripTrailingLineFeed( OUString& io_rLine )
{
const sal_Int32 nLen = io_rLine.getLength();
@@ -176,7 +167,6 @@ namespace dbaccess
io_rLine = io_rLine.copy( 0, nLen - 1 );
}
- // .........................................................................
static void lcl_readObjectMap_throw( const Reference<XComponentContext> & i_rxContext, const Reference< XStorage >& i_rStorage,
MapStringToCompDesc& o_mapStorageToObjectName )
{
@@ -228,7 +218,6 @@ namespace dbaccess
}
}
- // .........................................................................
static void lcl_markModified( const Reference< XComponent >& i_rSubComponent )
{
const Reference< XModifiable > xModify( i_rSubComponent, UNO_QUERY );
@@ -242,9 +231,7 @@ namespace dbaccess
}
}
- //====================================================================
- //= DatabaseDocumentRecovery_Data
- //====================================================================
+ // DatabaseDocumentRecovery_Data
struct DBACCESS_DLLPRIVATE DatabaseDocumentRecovery_Data
{
const Reference<XComponentContext> aContext;
@@ -255,21 +242,16 @@ namespace dbaccess
}
};
- //====================================================================
- //= DatabaseDocumentRecovery
- //====================================================================
- //--------------------------------------------------------------------
+ // DatabaseDocumentRecovery
DatabaseDocumentRecovery::DatabaseDocumentRecovery( const Reference<XComponentContext> & i_rContext )
:m_pData( new DatabaseDocumentRecovery_Data( i_rContext ) )
{
}
- //--------------------------------------------------------------------
DatabaseDocumentRecovery::~DatabaseDocumentRecovery()
{
}
- //--------------------------------------------------------------------
void DatabaseDocumentRecovery::saveModifiedSubComponents( const Reference< XStorage >& i_rTargetStorage,
const ::std::vector< Reference< XController > >& i_rControllers )
{
@@ -324,7 +306,6 @@ namespace dbaccess
tools::stor::commitStorageIfWriteable( xRecoveryStorage );
}
- //--------------------------------------------------------------------
void DatabaseDocumentRecovery::recoverSubDocuments( const Reference< XStorage >& i_rDocumentStorage,
const Reference< XController >& i_rTargetController )
{
@@ -412,8 +393,6 @@ namespace dbaccess
}
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index bd9c8b2d09c8..fc5cdc6bafea 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -23,10 +23,8 @@
#include <sax/tools/converter.hxx>
#include <xmloff/xmltoken.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -41,16 +39,12 @@ namespace dbaccess
using ::com::sun::star::uno::Type;
using ::com::sun::star::xml::sax::XAttributeList;
- //====================================================================
- //= SettingsImport
- //====================================================================
- //--------------------------------------------------------------------
+ // SettingsImport
SettingsImport::SettingsImport()
:m_refCount( 0 )
{
}
- //--------------------------------------------------------------------
SettingsImport::~SettingsImport()
{
}
@@ -103,31 +97,23 @@ namespace dbaccess
// If there is, then just ignore it ...
}
- //====================================================================
- //= IgnoringSettingsImport
- //====================================================================
- //--------------------------------------------------------------------
+ // IgnoringSettingsImport
::rtl::Reference< SettingsImport > IgnoringSettingsImport::nextState( const OUString& i_rElementName )
{
(void)i_rElementName;
return this;
}
- //====================================================================
- //= OfficeSettingsImport
- //====================================================================
- //--------------------------------------------------------------------
+ // OfficeSettingsImport
OfficeSettingsImport::OfficeSettingsImport( ::comphelper::NamedValueCollection& o_rSettings )
:m_rSettings( o_rSettings )
{
}
- //--------------------------------------------------------------------
OfficeSettingsImport::~OfficeSettingsImport()
{
}
- //--------------------------------------------------------------------
::rtl::Reference< SettingsImport > OfficeSettingsImport::nextState( const OUString& i_rElementName )
{
// separate the namespace part from the element name
@@ -147,21 +133,16 @@ namespace dbaccess
return new IgnoringSettingsImport;
}
- //====================================================================
- //= ConfigItemImport
- //====================================================================
- //--------------------------------------------------------------------
+ // ConfigItemImport
ConfigItemImport::ConfigItemImport( ::comphelper::NamedValueCollection& o_rSettings )
:m_rSettings( o_rSettings )
{
}
- //--------------------------------------------------------------------
ConfigItemImport::~ConfigItemImport()
{
}
- //--------------------------------------------------------------------
::rtl::Reference< SettingsImport > ConfigItemImport::nextState( const OUString& i_rElementName )
{
OSL_FAIL( "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" );
@@ -169,7 +150,6 @@ namespace dbaccess
return new IgnoringSettingsImport;
}
- //--------------------------------------------------------------------
void ConfigItemImport::endElement()
{
SettingsImport::endElement();
@@ -181,7 +161,6 @@ namespace dbaccess
m_rSettings.put( sItemName, aValue );
}
- //--------------------------------------------------------------------
void ConfigItemImport::getItemValue( ::com::sun::star::uno::Any& o_rValue ) const
{
o_rValue.clear();
@@ -232,21 +211,16 @@ namespace dbaccess
#endif
}
- //====================================================================
- //= ConfigItemSetImport
- //====================================================================
- //--------------------------------------------------------------------
+ // ConfigItemSetImport
ConfigItemSetImport::ConfigItemSetImport( ::comphelper::NamedValueCollection& o_rSettings )
:ConfigItemImport( o_rSettings )
{
}
- //--------------------------------------------------------------------
ConfigItemSetImport::~ConfigItemSetImport()
{
}
- //--------------------------------------------------------------------
::rtl::Reference< SettingsImport > ConfigItemSetImport::nextState( const OUString& i_rElementName )
{
// separate the namespace part from the element name
@@ -268,14 +242,11 @@ namespace dbaccess
return new IgnoringSettingsImport;
}
- //--------------------------------------------------------------------
void ConfigItemSetImport::getItemValue( Any& o_rValue ) const
{
o_rValue <<= m_aChildSettings.getPropertyValues();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/settingsimport.hxx b/dbaccess/source/core/recovery/settingsimport.hxx
index accad5c714b0..832bd516a93c 100644
--- a/dbaccess/source/core/recovery/settingsimport.hxx
+++ b/dbaccess/source/core/recovery/settingsimport.hxx
@@ -26,14 +26,10 @@
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
- //====================================================================
- //= SettingsImport
- //====================================================================
+ // SettingsImport
/** a simplified version of xmloff/DocumentSettingsContext
It would be nice if the DocumentSettingsContext would not be that tightly interwoven with the SvXMLImport
@@ -79,9 +75,7 @@ namespace dbaccess
OUStringBuffer m_aCharacters;
};
- //====================================================================
- //= IgnoringSettingsImport
- //====================================================================
+ // IgnoringSettingsImport
class IgnoringSettingsImport : public SettingsImport
{
public:
@@ -100,9 +94,7 @@ namespace dbaccess
}
};
- //====================================================================
- //= OfficeSettingsImport
- //====================================================================
+ // OfficeSettingsImport
class OfficeSettingsImport : public SettingsImport
{
public:
@@ -121,9 +113,7 @@ namespace dbaccess
::comphelper::NamedValueCollection& m_rSettings;
};
- //====================================================================
- //= ConfigItemSetImport
- //====================================================================
+ // ConfigItemSetImport
class ConfigItemImport : public SettingsImport
{
public:
@@ -149,9 +139,7 @@ namespace dbaccess
::comphelper::NamedValueCollection& m_rSettings;
};
- //====================================================================
- //= ConfigItemSetImport
- //====================================================================
+ // ConfigItemSetImport
class ConfigItemSetImport : public ConfigItemImport
{
public:
@@ -175,9 +163,7 @@ namespace dbaccess
::comphelper::NamedValueCollection m_aChildSettings;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // SETTINGSIMPORT_HXX
diff --git a/dbaccess/source/core/recovery/storagestream.cxx b/dbaccess/source/core/recovery/storagestream.cxx
index bac839e28f09..90761120e6bc 100644
--- a/dbaccess/source/core/recovery/storagestream.cxx
+++ b/dbaccess/source/core/recovery/storagestream.cxx
@@ -17,17 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "storagestream.hxx"
#include <com/sun/star/embed/ElementModes.hpp>
#include <tools/diagnose_ex.h>
-//........................................................................
namespace dbaccess
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -46,10 +43,7 @@ namespace dbaccess
namespace ElementModes = ::com::sun::star::embed::ElementModes;
- //====================================================================
- //= StorageOutputStream
- //====================================================================
- //--------------------------------------------------------------------
+ // StorageOutputStream
StorageOutputStream::StorageOutputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const OUString& i_rStreamName
@@ -63,12 +57,10 @@ namespace dbaccess
m_xOutputStream.set( xStream->getOutputStream(), UNO_SET_THROW );
}
- //--------------------------------------------------------------------
StorageOutputStream::~StorageOutputStream()
{
}
- //--------------------------------------------------------------------
void StorageOutputStream::close()
{
ENSURE_OR_RETURN_VOID( m_xOutputStream.is(), "already closed" );
@@ -79,10 +71,7 @@ namespace dbaccess
// (legitimately) do not call this method here.
}
- //====================================================================
- //= StorageInputStream
- //====================================================================
- //--------------------------------------------------------------------
+ // StorageInputStream
StorageInputStream::StorageInputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const OUString& i_rStreamName
@@ -96,12 +85,10 @@ namespace dbaccess
m_xInputStream.set( xStream->getInputStream(), UNO_SET_THROW );
}
- //--------------------------------------------------------------------
StorageInputStream::~StorageInputStream()
{
}
- //--------------------------------------------------------------------
void StorageInputStream::close()
{
ENSURE_OR_RETURN_VOID( m_xInputStream.is(), "already closed" );
@@ -112,8 +99,6 @@ namespace dbaccess
// (legitimately) do not call this method here.
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagestream.hxx b/dbaccess/source/core/recovery/storagestream.hxx
index cf227d118d89..64b051969df9 100644
--- a/dbaccess/source/core/recovery/storagestream.hxx
+++ b/dbaccess/source/core/recovery/storagestream.hxx
@@ -25,14 +25,10 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
- //====================================================================
- //= StorageOutputStream
- //====================================================================
+ // StorageOutputStream
/** convenience wrapper around a stream living in a storage
*/
class DBACCESS_DLLPRIVATE StorageOutputStream
@@ -62,9 +58,7 @@ namespace dbaccess
m_xOutputStream;
};
- //====================================================================
- //= StorageInputStream
- //====================================================================
+ // StorageInputStream
/** convenience wrapper around a stream living in a storage
*/
class DBACCESS_DLLPRIVATE StorageInputStream
@@ -94,9 +88,7 @@ namespace dbaccess
m_xInputStream;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // STORAGESTREAM_HXX
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index 241e336f2652..c835c2134977 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -17,17 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "storagetextstream.hxx"
#include <com/sun/star/io/TextOutputStream.hpp>
#include <tools/diagnose_ex.h>
-//......................................................................................................................
namespace dbaccess
{
-//......................................................................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -46,27 +43,21 @@ namespace dbaccess
using ::com::sun::star::io::XTextOutputStream2;
using ::com::sun::star::io::XActiveDataSource;
- //==================================================================================================================
- //= StorageTextOutputStream_Data
- //==================================================================================================================
+ // StorageTextOutputStream_Data
struct StorageTextOutputStream_Data
{
Reference< XTextOutputStream2 > xTextOutput;
};
- //==================================================================================================================
- //= helper
- //==================================================================================================================
+ // helper
namespace
{
- //--------------------------------------------------------------------------------------------------------------
static const OUString& lcl_getTextStreamEncodingName()
{
static const OUString s_sMapStreamEncodingName( "UTF-8" );
return s_sMapStreamEncodingName;
}
- //--------------------------------------------------------------------------------------------------------------
static const OUString& lcl_getLineFeed()
{
static const OUString s_sLineFeed( sal_Unicode( '\n' ) );
@@ -74,10 +65,7 @@ namespace dbaccess
}
}
- //==================================================================================================================
- //= StorageTextOutputStream
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+ // StorageTextOutputStream
StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const OUString& i_rStreamName
@@ -90,26 +78,21 @@ namespace dbaccess
m_pData->xTextOutput->setOutputStream( getOutputStream() );
}
- //------------------------------------------------------------------------------------------------------------------
StorageTextOutputStream::~StorageTextOutputStream()
{
}
- //------------------------------------------------------------------------------------------------------------------
void StorageTextOutputStream::writeLine( const OUString& i_rLine )
{
m_pData->xTextOutput->writeString( i_rLine );
m_pData->xTextOutput->writeString( lcl_getLineFeed() );
}
- //------------------------------------------------------------------------------------------------------------------
void StorageTextOutputStream::writeLine()
{
m_pData->xTextOutput->writeString( lcl_getLineFeed() );
}
-//......................................................................................................................
} // namespace dbaccess
-//......................................................................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagetextstream.hxx b/dbaccess/source/core/recovery/storagetextstream.hxx
index 57c4599a05ba..289031cb20a8 100644
--- a/dbaccess/source/core/recovery/storagetextstream.hxx
+++ b/dbaccess/source/core/recovery/storagetextstream.hxx
@@ -24,14 +24,10 @@
#include <memory>
-//......................................................................................................................
namespace dbaccess
{
-//......................................................................................................................
- //==================================================================================================================
- //= StorageTextStream
- //==================================================================================================================
+ // StorageTextStream
struct StorageTextOutputStream_Data;
class DBACCESS_DLLPRIVATE StorageTextOutputStream : public StorageOutputStream
{
@@ -50,9 +46,7 @@ namespace dbaccess
::std::auto_ptr< StorageTextOutputStream_Data > m_pData;
};
-//......................................................................................................................
} // namespace dbaccess
-//......................................................................................................................
#endif // STORAGETEXTSTREAM_HXX
diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx
index 39a828ea589e..06ef1bdea858 100644
--- a/dbaccess/source/core/recovery/storagexmlstream.cxx
+++ b/dbaccess/source/core/recovery/storagexmlstream.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "storagexmlstream.hxx"
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -32,10 +31,8 @@
#include <stack>
-//......................................................................................................................
namespace dbaccess
{
-//......................................................................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -61,9 +58,7 @@ namespace dbaccess
using ::com::sun::star::xml::sax::XParser;
using ::com::sun::star::xml::sax::InputSource;
- //==================================================================================================================
- //= StorageXMLOutputStream_Data
- //==================================================================================================================
+ // StorageXMLOutputStream_Data
struct StorageXMLOutputStream_Data
{
Reference< XDocumentHandler > xHandler;
@@ -71,10 +66,7 @@ namespace dbaccess
::rtl::Reference< SvXMLAttributeList > xAttributes;
};
- //==================================================================================================================
- //= StorageXMLOutputStream
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+ // StorageXMLOutputStream
StorageXMLOutputStream::StorageXMLOutputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const OUString& i_rStreamName )
@@ -90,12 +82,10 @@ namespace dbaccess
m_pData->xAttributes = new SvXMLAttributeList;
}
- //------------------------------------------------------------------------------------------------------------------
StorageXMLOutputStream::~StorageXMLOutputStream()
{
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLOutputStream::close()
{
ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "illegal document handler" );
@@ -104,13 +94,11 @@ namespace dbaccess
// endDocument
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLOutputStream::addAttribute( const OUString& i_rName, const OUString& i_rValue ) const
{
m_pData->xAttributes->AddAttribute( i_rName, i_rValue );
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLOutputStream::startElement( const OUString& i_rElementName ) const
{
ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" );
@@ -120,7 +108,6 @@ namespace dbaccess
m_pData->aElements.push( i_rElementName );
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLOutputStream::endElement() const
{
ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" );
@@ -131,7 +118,6 @@ namespace dbaccess
m_pData->aElements.pop();
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLOutputStream::ignorableWhitespace( const OUString& i_rWhitespace ) const
{
ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" );
@@ -139,7 +125,6 @@ namespace dbaccess
m_pData->xHandler->ignorableWhitespace( i_rWhitespace );
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLOutputStream::characters( const OUString& i_rCharacters ) const
{
ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" );
@@ -147,18 +132,13 @@ namespace dbaccess
m_pData->xHandler->characters( i_rCharacters );
}
- //==================================================================================================================
- //= StorageXMLInputStream_Data
- //==================================================================================================================
+ // StorageXMLInputStream_Data
struct StorageXMLInputStream_Data
{
Reference< XParser > xParser;
};
- //==================================================================================================================
- //= StorageXMLInputStream
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+ // StorageXMLInputStream
StorageXMLInputStream::StorageXMLInputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const OUString& i_rStreamName )
@@ -168,7 +148,6 @@ namespace dbaccess
m_pData->xParser.set( Parser::create(i_rContext) );
}
- //------------------------------------------------------------------------------------------------------------------
void StorageXMLInputStream::import( const Reference< XDocumentHandler >& i_rHandler )
{
ENSURE_OR_THROW( i_rHandler.is(), "illegal document handler (NULL)" );
@@ -180,13 +159,10 @@ namespace dbaccess
m_pData->xParser->parseStream( aInputSource );
}
- //------------------------------------------------------------------------------------------------------------------
StorageXMLInputStream::~StorageXMLInputStream()
{
}
-//......................................................................................................................
} // namespace dbaccess
-//......................................................................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagexmlstream.hxx b/dbaccess/source/core/recovery/storagexmlstream.hxx
index 8fdb7305e274..435246a634f0 100644
--- a/dbaccess/source/core/recovery/storagexmlstream.hxx
+++ b/dbaccess/source/core/recovery/storagexmlstream.hxx
@@ -27,14 +27,10 @@
#include <memory>
-//........................................................................
namespace dbaccess
{
-//........................................................................
- //====================================================================
- //= StorageXMLOutputStream
- //====================================================================
+ // StorageXMLOutputStream
struct StorageXMLOutputStream_Data;
class DBACCESS_DLLPRIVATE StorageXMLOutputStream : public StorageOutputStream
{
@@ -66,9 +62,7 @@ namespace dbaccess
::std::auto_ptr< StorageXMLOutputStream_Data > m_pData;
};
- //====================================================================
- //= StorageXMLInputStream
- //====================================================================
+ // StorageXMLInputStream
struct StorageXMLInputStream_Data;
class DBACCESS_DLLPRIVATE StorageXMLInputStream : public StorageInputStream
{
@@ -93,9 +87,7 @@ namespace dbaccess
::std::auto_ptr< StorageXMLInputStream_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // STORAGEXMLSTREAM_HXX
diff --git a/dbaccess/source/core/recovery/subcomponentloader.cxx b/dbaccess/source/core/recovery/subcomponentloader.cxx
index 5dd294daa6c2..25bf9d8f4bb2 100644
--- a/dbaccess/source/core/recovery/subcomponentloader.cxx
+++ b/dbaccess/source/core/recovery/subcomponentloader.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "subcomponentloader.hxx"
#include <com/sun/star/ucb/Command.hpp>
@@ -25,10 +24,8 @@
#include <tools/diagnose_ex.h>
-//........................................................................
namespace dbaccess
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -51,9 +48,7 @@ namespace dbaccess
using ::com::sun::star::frame::XController2;
using ::com::sun::star::lang::XComponent;
- //====================================================================
- //= SubComponentLoader
- //====================================================================
+ // SubComponentLoader
struct DBACCESS_DLLPRIVATE SubComponentLoader_Data
{
const Reference< XCommandProcessor > xDocDefCommands;
@@ -73,12 +68,9 @@ namespace dbaccess
}
};
- //====================================================================
- //= helper
- //====================================================================
+ // helper
namespace
{
- //................................................................
void lcl_onWindowShown_nothrow( const SubComponentLoader_Data& i_rData )
{
try
@@ -106,10 +98,7 @@ namespace dbaccess
}
}
- //====================================================================
- //= SubComponentLoader
- //====================================================================
- //--------------------------------------------------------------------
+ // SubComponentLoader
SubComponentLoader::SubComponentLoader( const Reference< XController >& i_rApplicationController,
const Reference< XCommandProcessor >& i_rSubDocumentDefinition )
:m_pData( new SubComponentLoader_Data( i_rSubDocumentDefinition ) )
@@ -125,7 +114,6 @@ namespace dbaccess
osl_atomic_decrement( &m_refCount );
}
- //--------------------------------------------------------------------
SubComponentLoader::SubComponentLoader( const Reference< XController >& i_rApplicationController,
const Reference< XComponent >& i_rNonDocumentComponent )
:m_pData( new SubComponentLoader_Data( i_rNonDocumentComponent ) )
@@ -141,27 +129,23 @@ namespace dbaccess
osl_atomic_decrement( &m_refCount );
}
- //--------------------------------------------------------------------
SubComponentLoader::~SubComponentLoader()
{
delete m_pData, m_pData = NULL;
}
- //--------------------------------------------------------------------
void SAL_CALL SubComponentLoader::windowResized( const WindowEvent& i_rEvent ) throw (RuntimeException)
{
// not interested in
(void)i_rEvent;
}
- //--------------------------------------------------------------------
void SAL_CALL SubComponentLoader::windowMoved( const WindowEvent& i_rEvent ) throw (RuntimeException)
{
// not interested in
(void)i_rEvent;
}
- //--------------------------------------------------------------------
void SAL_CALL SubComponentLoader::windowShown( const EventObject& i_rEvent ) throw (RuntimeException)
{
(void)i_rEvent;
@@ -170,22 +154,18 @@ namespace dbaccess
m_pData->xAppComponentWindow->removeWindowListener( this );
}
- //--------------------------------------------------------------------
void SAL_CALL SubComponentLoader::windowHidden( const EventObject& i_rEvent ) throw (RuntimeException)
{
// not interested in
(void)i_rEvent;
}
- //--------------------------------------------------------------------
void SAL_CALL SubComponentLoader::disposing( const EventObject& i_rEvent ) throw (RuntimeException)
{
// not interested in
(void)i_rEvent;
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponentloader.hxx b/dbaccess/source/core/recovery/subcomponentloader.hxx
index decae4450f50..bbe02b9f1105 100644
--- a/dbaccess/source/core/recovery/subcomponentloader.hxx
+++ b/dbaccess/source/core/recovery/subcomponentloader.hxx
@@ -29,14 +29,10 @@
#include <cppuhelper/implbase1.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
- //====================================================================
- //= SubComponentLoader
- //====================================================================
+ // SubComponentLoader
typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XWindowListener
> SubComponentLoader_Base;
struct SubComponentLoader_Data;
@@ -72,9 +68,7 @@ namespace dbaccess
SubComponentLoader_Data* m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // SUBCOMPONENTLOADER_HXX
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 09817873241a..c755d8458a75 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "subcomponentrecovery.hxx"
#include "sdbcoretools.hxx"
@@ -40,10 +39,8 @@
#include <xmloff/XMLSettingsExportContext.hxx>
#include <xmloff/SettingsExportHelper.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -80,13 +77,9 @@ namespace dbaccess
namespace ElementModes = ::com::sun::star::embed::ElementModes;
-
- //====================================================================
- //= helper
- //====================================================================
+ // helper
namespace
{
- // .........................................................................
static const OUString& lcl_getComponentStorageBaseName( const SubComponentType i_eType )
{
static const OUString s_sFormBaseName( "form" );
@@ -113,7 +106,6 @@ namespace dbaccess
return s_sFallback;
}
- // .........................................................................
static SubComponentType lcl_databaseObjectToSubComponentType( const sal_Int32 i_nObjectType )
{
switch ( i_nObjectType )
@@ -128,7 +120,6 @@ namespace dbaccess
return UNKNOWN;
}
- // .........................................................................
static bool lcl_determineReadOnly( const Reference< XComponent >& i_rComponent )
{
Reference< XModel > xDocument( i_rComponent, UNO_QUERY );
@@ -145,7 +136,6 @@ namespace dbaccess
return aDocArgs.getOrDefault( "ReadOnly", false );
}
- // .........................................................................
static Reference< XCommandProcessor > lcl_getSubComponentDef_nothrow( const Reference< XDatabaseDocumentUI >& i_rAppUI,
const SubComponentType i_eType, const OUString& i_rName )
{
@@ -188,9 +178,7 @@ namespace dbaccess
}
}
- //====================================================================
- //= SettingsExportContext
- //====================================================================
+ // SettingsExportContext
class DBACCESS_DLLPRIVATE SettingsExportContext : public ::xmloff::XMLSettingsExportContext
{
public:
@@ -227,19 +215,16 @@ namespace dbaccess
const OUStringBuffer m_aNamespace;
};
- //--------------------------------------------------------------------
void SettingsExportContext::AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName, const OUString& i_rValue )
{
m_rDelegator.addAttribute( impl_prefix( i_eName ), i_rValue );
}
- //--------------------------------------------------------------------
void SettingsExportContext::AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName, enum ::xmloff::token::XMLTokenEnum i_eValue )
{
m_rDelegator.addAttribute( impl_prefix( i_eName ), ::xmloff::token::GetXMLToken( i_eValue ) );
}
- //--------------------------------------------------------------------
void SettingsExportContext::StartElement( enum ::xmloff::token::XMLTokenEnum i_eName, const sal_Bool i_bIgnoreWhitespace )
{
if ( i_bIgnoreWhitespace )
@@ -248,7 +233,6 @@ namespace dbaccess
m_rDelegator.startElement( impl_prefix( i_eName ) );
}
- //--------------------------------------------------------------------
void SettingsExportContext::EndElement( const sal_Bool i_bIgnoreWhitespace )
{
if ( i_bIgnoreWhitespace )
@@ -256,21 +240,17 @@ namespace dbaccess
m_rDelegator.endElement();
}
- //--------------------------------------------------------------------
void SettingsExportContext::Characters( const OUString& i_rCharacters )
{
m_rDelegator.characters( i_rCharacters );
}
- //--------------------------------------------------------------------
Reference< com::sun::star::uno::XComponentContext > SettingsExportContext::GetComponentContext() const
{
return m_rContext;
}
- //==================================================================================================================
- //= SettingsDocumentHandler
- //==================================================================================================================
+ // SettingsDocumentHandler
typedef ::cppu::WeakImplHelper1 < XDocumentHandler
> SettingsDocumentHandler_Base;
class DBACCESS_DLLPRIVATE SettingsDocumentHandler : public SettingsDocumentHandler_Base
@@ -303,17 +283,14 @@ namespace dbaccess
::comphelper::NamedValueCollection m_aSettings;
};
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::startDocument( ) throw (SAXException, RuntimeException)
{
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::endDocument( ) throw (SAXException, RuntimeException)
{
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::startElement( const OUString& i_Name, const Reference< XAttributeList >& i_Attribs ) throw (SAXException, RuntimeException)
{
::rtl::Reference< SettingsImport > pNewState;
@@ -345,7 +322,6 @@ namespace dbaccess
m_aStates.push( pNewState );
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::endElement( const OUString& i_Name ) throw (SAXException, RuntimeException)
{
ENSURE_OR_THROW( !m_aStates.empty(), "no active element" );
@@ -356,7 +332,6 @@ namespace dbaccess
m_aStates.pop();
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::characters( const OUString& i_Chars ) throw (SAXException, RuntimeException)
{
ENSURE_OR_THROW( !m_aStates.empty(), "no active element" );
@@ -365,14 +340,12 @@ namespace dbaccess
pCurrentState->characters( i_Chars );
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::ignorableWhitespace( const OUString& aWhitespaces ) throw (SAXException, RuntimeException)
{
// ignore them - that's why they're called "ignorable"
(void)aWhitespaces;
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::processingInstruction( const OUString& i_Target, const OUString& i_Data ) throw (SAXException, RuntimeException)
{
OSL_FAIL( "SettingsDocumentHandler::processingInstruction: unexpected ..." );
@@ -380,16 +353,12 @@ namespace dbaccess
(void)i_Data;
}
- //--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::setDocumentLocator( const Reference< XLocator >& i_Locator ) throw (SAXException, RuntimeException)
{
(void)i_Locator;
}
- //====================================================================
- //= SubComponentRecovery
- //====================================================================
- //--------------------------------------------------------------------
+ // SubComponentRecovery
const OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType )
{
static const OUString s_sFormsStorageName( "forms" );
@@ -419,7 +388,6 @@ namespace dbaccess
return s_sFallback;
}
- //--------------------------------------------------------------------
void SubComponentRecovery::saveToRecoveryStorage( const Reference< XStorage >& i_rRecoveryStorage,
MapCompTypeToCompDescs& io_mapCompDescs )
{
@@ -466,7 +434,6 @@ namespace dbaccess
rMapCompDescs[ sStorName ] = m_aCompDesc;
}
- //--------------------------------------------------------------------
void SubComponentRecovery::impl_identifyComponent_throw()
{
// ask the controller
@@ -518,7 +485,6 @@ namespace dbaccess
"SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the component!" );
}
- //--------------------------------------------------------------------
void SubComponentRecovery::impl_saveQueryDesign_throw( const Reference< XStorage >& i_rObjectStorage )
{
ENSURE_OR_THROW( m_eType == QUERY, "illegal sub component type" );
@@ -547,7 +513,6 @@ namespace dbaccess
aDesignOutput.close();
}
- //--------------------------------------------------------------------
void SubComponentRecovery::impl_saveSubDocument_throw( const Reference< XStorage >& i_rObjectStorage )
{
ENSURE_OR_THROW( ( m_eType == FORM ) || ( m_eType == REPORT ), "illegal sub component type" );
@@ -558,7 +523,6 @@ namespace dbaccess
xStorageDocument->storeToStorage( i_rObjectStorage, Sequence< PropertyValue >() );
}
- //--------------------------------------------------------------------
Reference< XComponent > SubComponentRecovery::impl_recoverSubDocument_throw( const Reference< XStorage >& i_rRecoveryStorage,
const OUString& i_rComponentName, const bool i_bForEditing )
{
@@ -608,7 +572,6 @@ namespace dbaccess
return xSubComponent;
}
- //--------------------------------------------------------------------
Reference< XComponent > SubComponentRecovery::impl_recoverQueryDesign_throw( const Reference< XStorage >& i_rRecoveryStorage,
const OUString& i_rComponentName, const bool i_bForEditing )
{
@@ -662,7 +625,6 @@ namespace dbaccess
return xSubComponent;
}
- //--------------------------------------------------------------------
Reference< XComponent > SubComponentRecovery::recoverFromStorage( const Reference< XStorage >& i_rRecoveryStorage,
const OUString& i_rComponentName, const bool i_bForEditing )
{
@@ -683,8 +645,6 @@ namespace dbaccess
return xSubComponent;
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.hxx b/dbaccess/source/core/recovery/subcomponentrecovery.hxx
index 6c4cac5f99f1..81146f7d5f04 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.hxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.hxx
@@ -26,14 +26,10 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
- //====================================================================
- //= SubComponentRecovery
- //====================================================================
+ // SubComponentRecovery
class DBACCESS_DLLPRIVATE SubComponentRecovery
{
public:
@@ -114,10 +110,7 @@ namespace dbaccess
SubComponentDescriptor m_aCompDesc;
};
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // SUBCOMPONENTRECOVERY_HXX
diff --git a/dbaccess/source/core/recovery/subcomponents.hxx b/dbaccess/source/core/recovery/subcomponents.hxx
index fe9e9d8a3011..0afd22ceaf41 100644
--- a/dbaccess/source/core/recovery/subcomponents.hxx
+++ b/dbaccess/source/core/recovery/subcomponents.hxx
@@ -29,14 +29,11 @@
#include <boost/unordered_map.hpp>
#include <map>
-//........................................................................
namespace dbaccess
{
-//........................................................................
namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
- // -------------------------------------------------------------------
enum SubComponentType
{
TABLE = DatabaseObject::TABLE,
@@ -49,7 +46,6 @@ namespace dbaccess
UNKNOWN = 10001
};
- // -------------------------------------------------------------------
struct DBACCESS_DLLPRIVATE SubComponentDescriptor
{
OUString sName;
@@ -68,14 +64,10 @@ namespace dbaccess
}
};
- // -------------------------------------------------------------------
typedef ::boost::unordered_map< OUString, SubComponentDescriptor, OUStringHash > MapStringToCompDesc;
typedef ::std::map< SubComponentType, MapStringToCompDesc > MapCompTypeToCompDescs;
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // SUBCOMPONENTS_HXX