V801: Decreased performance
Change-Id: Id8cd45d2844c121f63684734ab3546c24a1aab32
This commit is contained in:
parent
d44168795a
commit
d22519f62b
@ -92,7 +92,7 @@ class ImplEventAttacherManager
|
||||
sal_Int16 nVersion;
|
||||
public:
|
||||
ImplEventAttacherManager( const Reference< XIntrospection > & rIntrospection,
|
||||
const Reference< XComponentContext > xContext );
|
||||
const Reference< XComponentContext >& rContext );
|
||||
virtual ~ImplEventAttacherManager();
|
||||
|
||||
// Methods of XEventAttacherManager
|
||||
@ -358,21 +358,21 @@ Reference< XEventAttacherManager > createEventAttacherManager( const Reference<
|
||||
|
||||
|
||||
ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospection > & rIntrospection,
|
||||
const Reference< XComponentContext > xContext )
|
||||
const Reference< XComponentContext >& rContext )
|
||||
: aScriptListeners( aLock )
|
||||
, mxContext( xContext )
|
||||
, mxContext( rContext )
|
||||
, mxIntrospection( rIntrospection )
|
||||
, nVersion(0)
|
||||
{
|
||||
if ( xContext.is() )
|
||||
if ( rContext.is() )
|
||||
{
|
||||
Reference< XInterface > xIFace( xContext->getServiceManager()->createInstanceWithContext(
|
||||
OUString( "com.sun.star.script.EventAttacher" ), xContext) );
|
||||
Reference< XInterface > xIFace( rContext->getServiceManager()->createInstanceWithContext(
|
||||
OUString( "com.sun.star.script.EventAttacher" ), rContext) );
|
||||
if ( xIFace.is() )
|
||||
{
|
||||
xAttacher = Reference< XEventAttacher2 >::query( xIFace );
|
||||
}
|
||||
xConverter = Converter::create(xContext);
|
||||
xConverter = Converter::create(rContext);
|
||||
}
|
||||
|
||||
Reference< XInitialization > xInit( xAttacher, UNO_QUERY );
|
||||
|
@ -239,9 +239,9 @@ uno::Reference< uno::XInterface > SAL_CALL OInstanceLocker::Create(
|
||||
OLockListener::OLockListener( const uno::WeakReference< lang::XComponent >& xWrapper,
|
||||
const uno::Reference< uno::XInterface >& xInstance,
|
||||
sal_Int32 nMode,
|
||||
const uno::Reference< embed::XActionsApproval > xApproval )
|
||||
const uno::Reference< embed::XActionsApproval >& rApproval )
|
||||
: m_xInstance( xInstance )
|
||||
, m_xApproval( xApproval )
|
||||
, m_xApproval( rApproval )
|
||||
, m_xWrapper( xWrapper )
|
||||
, m_bDisposed( false )
|
||||
, m_bInitialized( false )
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
OLockListener( const ::com::sun::star::uno::WeakReference< ::com::sun::star::lang::XComponent >& xWrapper,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInstance,
|
||||
sal_Int32 nMode,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XActionsApproval > xApproval );
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XActionsApproval >& rApproval );
|
||||
|
||||
virtual ~OLockListener();
|
||||
|
||||
|
@ -37,31 +37,30 @@ using namespace ::com::sun::star;
|
||||
|
||||
namespace comphelper {
|
||||
|
||||
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString & aStreamName, const uno::Reference< uno::XComponentContext > xContext )
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString & aStreamName, const uno::Reference< uno::XComponentContext >& rContext )
|
||||
throw( uno::Exception )
|
||||
{
|
||||
OUString aStringID = "_rels/";
|
||||
aStringID += aStreamName;
|
||||
return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, xContext );
|
||||
return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, rContext );
|
||||
}
|
||||
|
||||
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadContentTypeSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext )
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadContentTypeSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& rContext )
|
||||
throw( uno::Exception )
|
||||
{
|
||||
OUString aStringID = "[Content_Types].xml";
|
||||
return ReadSequence_Impl( xInStream, aStringID, CONTENTTYPE_FORMAT, xContext );
|
||||
return ReadSequence_Impl( xInStream, aStringID, CONTENTTYPE_FORMAT, rContext );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< uno::Sequence< beans::StringPair > >& aSequence, const uno::Reference< uno::XComponentContext > xContext )
|
||||
void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< uno::Sequence< beans::StringPair > >& aSequence, const uno::Reference< uno::XComponentContext >& rContext )
|
||||
throw( uno::Exception )
|
||||
{
|
||||
if ( !xOutStream.is() )
|
||||
throw uno::RuntimeException();
|
||||
|
||||
uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
|
||||
uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(rContext);
|
||||
|
||||
xWriter->setOutputStream( xOutStream );
|
||||
|
||||
@ -116,13 +115,13 @@ void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< i
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< beans::StringPair >& aDefaultsSequence, const uno::Sequence< beans::StringPair >& aOverridesSequence, const uno::Reference< uno::XComponentContext > xContext )
|
||||
void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< beans::StringPair >& aDefaultsSequence, const uno::Sequence< beans::StringPair >& aOverridesSequence, const uno::Reference< uno::XComponentContext >& rContext )
|
||||
throw( uno::Exception )
|
||||
{
|
||||
if ( !xOutStream.is() )
|
||||
throw uno::RuntimeException();
|
||||
|
||||
uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
|
||||
uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(rContext);
|
||||
|
||||
xWriter->setOutputStream( xOutStream );
|
||||
|
||||
@ -176,16 +175,13 @@ void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOu
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const uno::Reference< uno::XComponentContext > xContext )
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const uno::Reference< uno::XComponentContext >& rContext )
|
||||
throw( uno::Exception )
|
||||
{
|
||||
if ( !xContext.is() || !xInStream.is() || nFormat > FORMAT_MAX_ID )
|
||||
if ( !rContext.is() || !xInStream.is() || nFormat > FORMAT_MAX_ID )
|
||||
throw uno::RuntimeException();
|
||||
|
||||
uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
|
||||
uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( rContext );
|
||||
|
||||
OFOPXMLHelper* pHelper = new OFOPXMLHelper( nFormat );
|
||||
uno::Reference< xml::sax::XDocumentHandler > xHelper( static_cast< xml::sax::XDocumentHandler* >( pHelper ) );
|
||||
@ -199,7 +195,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::Read
|
||||
return pHelper->GetParsingResult();
|
||||
}
|
||||
|
||||
|
||||
OFOPXMLHelper::OFOPXMLHelper( sal_uInt16 nFormat )
|
||||
: m_nFormat( nFormat )
|
||||
, m_aRelListElement( "Relationships" )
|
||||
|
@ -226,7 +226,7 @@ class UpdateInformationEnumeration : public ::cppu::WeakImplHelper1< container::
|
||||
{
|
||||
public:
|
||||
UpdateInformationEnumeration(const uno::Reference< xml::dom::XNodeList >& xNodeList,
|
||||
const uno::Reference< UpdateInformationProvider > xUpdateInformationProvider) :
|
||||
const uno::Reference< UpdateInformationProvider >& xUpdateInformationProvider) :
|
||||
m_xUpdateInformationProvider(xUpdateInformationProvider),
|
||||
m_xNodeList(xNodeList),
|
||||
m_nNodes(xNodeList.is() ? xNodeList->getLength() : 0),
|
||||
|
@ -126,7 +126,7 @@ namespace fs
|
||||
void append(const std::string &in) { append(in.c_str()); }
|
||||
};
|
||||
|
||||
void create_directory(const fs::path indexDirName);
|
||||
void create_directory(const fs::path& indexDirName);
|
||||
void copy(const fs::path &src, const fs::path &dest);
|
||||
}
|
||||
|
||||
|
@ -519,7 +519,7 @@ namespace fs
|
||||
return nThreadTextEncoding;
|
||||
}
|
||||
|
||||
void create_directory(const fs::path indexDirName)
|
||||
void create_directory(const fs::path& indexDirName)
|
||||
{
|
||||
HCDBG(
|
||||
std::cerr << "creating " <<
|
||||
|
@ -156,7 +156,7 @@ private:
|
||||
class HwpImportFilter : public WeakImplHelper4< XFilter, XImporter, XServiceInfo, XExtendedFilterDetection >
|
||||
{
|
||||
public:
|
||||
HwpImportFilter( const Reference< XMultiServiceFactory > xFact );
|
||||
HwpImportFilter(const Reference< XMultiServiceFactory >& rFact);
|
||||
virtual ~HwpImportFilter();
|
||||
|
||||
public:
|
||||
@ -201,12 +201,12 @@ Sequence< OUString > HwpImportFilter::getSupportedServiceNames_Static() throw ()
|
||||
return aRet;
|
||||
}
|
||||
|
||||
HwpImportFilter::HwpImportFilter( const Reference< XMultiServiceFactory > xFact )
|
||||
HwpImportFilter::HwpImportFilter(const Reference< XMultiServiceFactory >& rFact)
|
||||
{
|
||||
OUString sService( WRITER_IMPORTER_NAME );
|
||||
try {
|
||||
Reference< XDocumentHandler >
|
||||
xHandler( xFact->createInstance( sService ), UNO_QUERY );
|
||||
xHandler( rFact->createInstance( sService ), UNO_QUERY );
|
||||
|
||||
HwpReader *p = new HwpReader;
|
||||
p->setDocumentHandler( xHandler );
|
||||
|
@ -58,7 +58,7 @@ class COMPHELPER_DLLPUBLIC OFOPXMLHelper : public cppu::WeakImplHelper1 < com::s
|
||||
OFOPXMLHelper( sal_uInt16 nFormat ); // must not be created directly
|
||||
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > GetParsingResult();
|
||||
|
||||
static COMPHELPER_DLLPRIVATE ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > SAL_CALL ReadSequence_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext )
|
||||
static COMPHELPER_DLLPRIVATE ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > SAL_CALL ReadSequence_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext )
|
||||
throw( ::com::sun::star::uno::Exception );
|
||||
|
||||
public:
|
||||
@ -73,7 +73,7 @@ public:
|
||||
ReadRelationsInfoSequence(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream,
|
||||
const OUString & aStreamName,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext )
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext )
|
||||
throw( ::com::sun::star::uno::Exception );
|
||||
|
||||
// returns sequence containing two entries of type sequence<StringPair>
|
||||
@ -86,7 +86,7 @@ public:
|
||||
SAL_CALL
|
||||
ReadContentTypeSequence(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext )
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext )
|
||||
throw( ::com::sun::star::uno::Exception );
|
||||
|
||||
// writes sequence of elements, where each element is described by sequence of tags,
|
||||
@ -96,7 +96,7 @@ public:
|
||||
void SAL_CALL WriteRelationsInfoSequence(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutStream,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > >& aSequence,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext )
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext )
|
||||
throw( ::com::sun::star::uno::Exception );
|
||||
|
||||
// writes two entries of type sequence<StringPair>
|
||||
@ -109,7 +109,7 @@ public:
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutStream,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aDefaultsSequence,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aOverridesSequence,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext )
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext )
|
||||
throw( ::com::sun::star::uno::Exception );
|
||||
|
||||
// XDocumentHandler
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
* @param pCertificate contaisn the server certificate.
|
||||
*/
|
||||
SimpleCertificateValidationRequest( const sal_Int32 & lCertificateValidity,
|
||||
const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> pCertificate,
|
||||
const com::sun::star::uno::Reference<com::sun::star::security::XCertificate>& certificate,
|
||||
const OUString & hostname );
|
||||
};
|
||||
|
||||
|
@ -157,14 +157,14 @@ private:
|
||||
typedef std::unordered_set< OUString, OUStringHash > UniqueSubstHash;
|
||||
mutable UniqueSubstHash maSubstHash;
|
||||
|
||||
void fillSubstVector( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
|
||||
void fillSubstVector( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& rFont,
|
||||
const OUString& rType,
|
||||
std::vector< OUString >& rSubstVector ) const;
|
||||
FontWeight getSubstWeight( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
|
||||
FontWeight getSubstWeight( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& rFont,
|
||||
const OUString& rType ) const;
|
||||
FontWidth getSubstWidth( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
|
||||
FontWidth getSubstWidth( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& rFont,
|
||||
const OUString& rType ) const;
|
||||
unsigned long getSubstType( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
|
||||
unsigned long getSubstType( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& rFont,
|
||||
const OUString& rType ) const;
|
||||
void readLocaleSubst( const OUString& rBcp47 ) const;
|
||||
public:
|
||||
|
@ -205,12 +205,12 @@ bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentContex
|
||||
return bRet;
|
||||
}
|
||||
|
||||
OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xContext )
|
||||
OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext >& rContext )
|
||||
{
|
||||
OUString aTempURL;
|
||||
|
||||
uno::Reference < beans::XPropertySet > xTempFile(
|
||||
io::TempFile::create(xContext),
|
||||
io::TempFile::create(rContext),
|
||||
uno::UNO_QUERY_THROW );
|
||||
|
||||
try {
|
||||
@ -230,10 +230,10 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xCont
|
||||
return aTempURL;
|
||||
}
|
||||
|
||||
uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XComponentContext >& xContext )
|
||||
uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XComponentContext >& rContext )
|
||||
{
|
||||
return uno::Reference< io::XStream >(
|
||||
xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream", xContext),
|
||||
rContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream", rContext),
|
||||
uno::UNO_QUERY_THROW);
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XCo
|
||||
OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
|
||||
const uno::Reference< packages::XDataSinkEncrSupport >& xPackageStream,
|
||||
const uno::Reference< lang::XSingleServiceFactory >& xPackage,
|
||||
const uno::Reference< uno::XComponentContext >& xContext,
|
||||
const uno::Reference< uno::XComponentContext >& rContext,
|
||||
bool bForceEncrypted,
|
||||
sal_Int32 nStorageType,
|
||||
bool bDefaultCompress,
|
||||
@ -251,7 +251,7 @@ OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
|
||||
, m_bHasDataToFlush( false )
|
||||
, m_bFlushed( false )
|
||||
, m_xPackageStream( xPackageStream )
|
||||
, m_xContext( xContext )
|
||||
, m_xContext( rContext )
|
||||
, m_pParent( pParent )
|
||||
, m_bForceEncrypted( bForceEncrypted )
|
||||
, m_bUseCommonEncryption( !bForceEncrypted && nStorageType == embed::StorageFormats::PACKAGE )
|
||||
|
@ -81,7 +81,7 @@ struct WSInternalData_Impl
|
||||
sal_Int32 m_nStorageType;
|
||||
|
||||
// the mutex reference MUST NOT be empty
|
||||
WSInternalData_Impl( const SotMutexHolderRef rMutexRef, sal_Int32 nStorageType )
|
||||
WSInternalData_Impl( const SotMutexHolderRef& rMutexRef, sal_Int32 nStorageType )
|
||||
: m_rSharedMutexRef( rMutexRef )
|
||||
, m_pTypeCollection( NULL )
|
||||
, m_aListenersContainer( rMutexRef->GetMutex() )
|
||||
|
@ -126,7 +126,7 @@ OUString InsertImage(
|
||||
}
|
||||
|
||||
OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString& rControlName,
|
||||
const Reference< XItemListener > xItemListener, const OUString& rLabel,
|
||||
const Reference< XItemListener >& rItemListener, const OUString& rLabel,
|
||||
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
|
||||
{
|
||||
OUString pNames[] = {
|
||||
@ -155,8 +155,8 @@ OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString&
|
||||
Sequence< Any > aValues( pValues, nCount );
|
||||
|
||||
Reference< XCheckBox > xCheckBox( rInformationDialog.insertCheckBox( rControlName, aNames, aValues ) );
|
||||
if ( xItemListener.is() )
|
||||
xCheckBox->addItemListener( xItemListener );
|
||||
if ( rItemListener.is() )
|
||||
xCheckBox->addItemListener( rItemListener );
|
||||
return rControlName;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const OUString& rCo
|
||||
|
||||
|
||||
OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
|
||||
const Reference< XItemListener > xItemListener, const OUString& rLabel,
|
||||
const Reference< XItemListener >& xItemListener, const OUString& rLabel,
|
||||
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
|
||||
{
|
||||
OUString pNames[] = {
|
||||
@ -201,7 +201,7 @@ OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& rCon
|
||||
|
||||
|
||||
OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
|
||||
const Reference< XTextListener > xTextListener, const Reference< XSpinListener > xSpinListener, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth,
|
||||
const Reference< XTextListener >& xTextListener, const Reference< XSpinListener >& xSpinListener, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth,
|
||||
double fEffectiveMin, double fEffectiveMax, sal_Int16 nTabIndex )
|
||||
{
|
||||
OUString pNames[] = {
|
||||
@ -249,7 +249,7 @@ OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUString
|
||||
|
||||
|
||||
OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
|
||||
const Reference< XTextListener > xTextListener, const bool bEnabled, const Sequence< OUString >& rItemList,
|
||||
const Reference< XTextListener >& rTextListener, const bool bEnabled, const Sequence< OUString >& rItemList,
|
||||
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
|
||||
{
|
||||
OUString pNames[] = {
|
||||
@ -282,14 +282,14 @@ OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& rCon
|
||||
Sequence< Any > aValues( pValues, nCount );
|
||||
|
||||
Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW );
|
||||
if ( xTextListener.is() )
|
||||
xTextComponent->addTextListener( xTextListener );
|
||||
if ( rTextListener.is() )
|
||||
xTextComponent->addTextListener( rTextListener );
|
||||
return rControlName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, const Reference< XItemListener > xItemListener,
|
||||
OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, const Reference< XItemListener >& rItemListener,
|
||||
const OUString& rLabel, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, bool bMultiLine, sal_Int16 nTabIndex )
|
||||
{
|
||||
OUString pNames[] = {
|
||||
@ -318,15 +318,15 @@ OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const OUString& r
|
||||
Sequence< Any > aValues( pValues, nCount );
|
||||
|
||||
Reference< XRadioButton > xRadioButton( rOptimizerDialog.insertRadioButton( rControlName, aNames, aValues ) );
|
||||
if ( xItemListener.is() )
|
||||
xRadioButton->addItemListener( xItemListener );
|
||||
if ( rItemListener.is() )
|
||||
xRadioButton->addItemListener( rItemListener );
|
||||
return rControlName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
|
||||
const Reference< XActionListener > xActionListener, const bool bEnabled, const Sequence< OUString >& rItemList,
|
||||
const Reference< XActionListener >& rActionListener, const bool bEnabled, const Sequence< OUString >& rItemList,
|
||||
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
|
||||
{
|
||||
OUString pNames[] = {
|
||||
@ -362,7 +362,7 @@ OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& rCont
|
||||
|
||||
Reference< XListBox > xListBox( rOptimizerDialog.insertListBox( rControlName, aNames, aValues ) );
|
||||
if ( xListBox.is() )
|
||||
xListBox->addActionListener( xActionListener );
|
||||
xListBox->addActionListener( rActionListener );
|
||||
return rControlName;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ protected:
|
||||
|
||||
/** get a style's locale field.
|
||||
*/
|
||||
LocaleSet_t const & getLocale( const StyleName_t Style );
|
||||
LocaleSet_t const & getLocale( const StyleName_t& Style );
|
||||
|
||||
private:
|
||||
std::stack<ITag*> m_TagBuilderStack;
|
||||
|
@ -151,7 +151,7 @@ void CContentReader::addChunk( LocaleSet_t const & Locale, Content_t const & Con
|
||||
/** get a style's locale field.
|
||||
*/
|
||||
|
||||
LocaleSet_t const & CContentReader::getLocale( const StyleName_t Style )
|
||||
LocaleSet_t const & CContentReader::getLocale( const StyleName_t& Style )
|
||||
{
|
||||
if ( m_StyleMap.empty() )
|
||||
return m_DefaultLocale;
|
||||
|
@ -57,15 +57,15 @@ rtl::Reference< StgPage > StgPage::Create( short nData, sal_Int32 nPage )
|
||||
return rtl::Reference< StgPage >( new StgPage( nData, nPage ) );
|
||||
}
|
||||
|
||||
void StgCache::SetToPage ( const rtl::Reference< StgPage > xPage, short nOff, sal_Int32 nVal )
|
||||
void StgCache::SetToPage ( const rtl::Reference< StgPage >& rPage, short nOff, sal_Int32 nVal )
|
||||
{
|
||||
if( ( nOff < (short) ( xPage->GetSize() / sizeof( sal_Int32 ) ) ) && nOff >= 0 )
|
||||
if( ( nOff < (short) ( rPage->GetSize() / sizeof( sal_Int32 ) ) ) && nOff >= 0 )
|
||||
{
|
||||
#ifdef OSL_BIGENDIAN
|
||||
nVal = OSL_SWAPDWORD(nVal);
|
||||
#endif
|
||||
((sal_Int32*) xPage->GetData() )[ nOff ] = nVal;
|
||||
SetDirty( xPage );
|
||||
((sal_Int32*) rPage->GetData() )[ nOff ] = nVal;
|
||||
SetDirty( rPage );
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,10 +272,10 @@ void StgCache::SetStrm( UCBStorageStream* pStgStream )
|
||||
bMyStream = false;
|
||||
}
|
||||
|
||||
void StgCache::SetDirty( const rtl::Reference< StgPage > &xPage )
|
||||
void StgCache::SetDirty( const rtl::Reference< StgPage > &rPage )
|
||||
{
|
||||
assert( IsWritable() );
|
||||
maDirtyPages[ xPage->GetPage() ] = xPage;
|
||||
maDirtyPages[ rPage->GetPage() ] = rPage;
|
||||
}
|
||||
|
||||
// Open/close the disk file
|
||||
|
@ -86,9 +86,9 @@ public:
|
||||
|
||||
// two routines for accessing FAT pages
|
||||
// Assume that the data is a FAT page and get/put FAT data.
|
||||
void SetToPage ( const rtl::Reference< StgPage > xPage, short nOff, sal_Int32 nVal );
|
||||
inline sal_Int32 GetFromPage ( const rtl::Reference< StgPage > xPage, short nOff );
|
||||
void SetDirty ( const rtl::Reference< StgPage > &xPage );
|
||||
void SetToPage ( const rtl::Reference< StgPage >& rPage, short nOff, sal_Int32 nVal );
|
||||
inline sal_Int32 GetFromPage ( const rtl::Reference< StgPage >& rPage, short nOff );
|
||||
void SetDirty ( const rtl::Reference< StgPage > &rPage );
|
||||
bool SetSize( sal_Int32 nPages );
|
||||
rtl::Reference< StgPage > Find( sal_Int32 ); // find a cached page
|
||||
rtl::Reference< StgPage > Get( sal_Int32, bool ); // get a cached page
|
||||
@ -115,11 +115,11 @@ public:
|
||||
static bool IsPageGreater( const StgPage *pA, const StgPage *pB );
|
||||
};
|
||||
|
||||
inline sal_Int32 StgCache::GetFromPage ( const rtl::Reference< StgPage > xPage, short nOff )
|
||||
inline sal_Int32 StgCache::GetFromPage ( const rtl::Reference< StgPage >& rPage, short nOff )
|
||||
{
|
||||
if( ( nOff >= (short) ( xPage->GetSize() / sizeof( sal_Int32 ) ) ) || nOff < 0 )
|
||||
if( ( nOff >= (short) ( rPage->GetSize() / sizeof( sal_Int32 ) ) ) || nOff < 0 )
|
||||
return -1;
|
||||
sal_Int32 n = ((sal_Int32*) xPage->GetData() )[ nOff ];
|
||||
sal_Int32 n = ((sal_Int32*) rPage->GetData() )[ nOff ];
|
||||
#ifdef OSL_BIGENDIAN
|
||||
return OSL_SWAPDWORD(n);
|
||||
#else
|
||||
|
@ -25,13 +25,13 @@ using namespace ucbhelper;
|
||||
|
||||
|
||||
SimpleCertificateValidationRequest::SimpleCertificateValidationRequest( const sal_Int32 & lCertificateValidity,
|
||||
const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> pCertificate,
|
||||
const com::sun::star::uno::Reference<com::sun::star::security::XCertificate>& certificate,
|
||||
const OUString & hostname)
|
||||
{
|
||||
// Fill request...
|
||||
ucb::CertificateValidationRequest aRequest;
|
||||
aRequest.CertificateValidity = lCertificateValidity;
|
||||
aRequest.Certificate = pCertificate;
|
||||
aRequest.Certificate = certificate;
|
||||
aRequest.HostName = hostname;
|
||||
|
||||
setRequest( uno::makeAny( aRequest ) );
|
||||
@ -41,7 +41,7 @@ SimpleCertificateValidationRequest::SimpleCertificateValidationRequest( const sa
|
||||
aContinuations[ 1 ] = new InteractionApprove( this );
|
||||
|
||||
setContinuations( aContinuations );
|
||||
pCertificate.get();
|
||||
certificate.get();
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -456,7 +456,7 @@ struct MapEntry {
|
||||
Memory32 data;
|
||||
};
|
||||
|
||||
bool operator <(Map const map1, Map const map2) {
|
||||
bool operator <(const Map& map1, const Map& map2) {
|
||||
return map1.begin < map2.begin
|
||||
|| (map1.begin == map2.begin && map1.size < map2.size);
|
||||
}
|
||||
|
@ -870,13 +870,13 @@ static const enum_convert pWidthNames[] =
|
||||
{ "ultraexpanded", WIDTH_ULTRA_EXPANDED }
|
||||
};
|
||||
|
||||
void FontSubstConfiguration::fillSubstVector( const com::sun::star::uno::Reference< XNameAccess > xFont,
|
||||
void FontSubstConfiguration::fillSubstVector( const com::sun::star::uno::Reference< XNameAccess >& rFont,
|
||||
const OUString& rType,
|
||||
std::vector< OUString >& rSubstVector ) const
|
||||
{
|
||||
try
|
||||
{
|
||||
Any aAny = xFont->getByName( rType );
|
||||
Any aAny = rFont->getByName( rType );
|
||||
if( aAny.getValueTypeClass() == TypeClass_STRING )
|
||||
{
|
||||
const OUString* pLine = (const OUString*)aAny.getValue();
|
||||
@ -919,13 +919,13 @@ void FontSubstConfiguration::fillSubstVector( const com::sun::star::uno::Referen
|
||||
}
|
||||
}
|
||||
|
||||
FontWeight FontSubstConfiguration::getSubstWeight( const com::sun::star::uno::Reference< XNameAccess > xFont,
|
||||
FontWeight FontSubstConfiguration::getSubstWeight( const com::sun::star::uno::Reference< XNameAccess >& rFont,
|
||||
const OUString& rType ) const
|
||||
{
|
||||
int weight = -1;
|
||||
try
|
||||
{
|
||||
Any aAny = xFont->getByName( rType );
|
||||
Any aAny = rFont->getByName( rType );
|
||||
if( aAny.getValueTypeClass() == TypeClass_STRING )
|
||||
{
|
||||
const OUString* pLine = (const OUString*)aAny.getValue();
|
||||
@ -951,13 +951,13 @@ FontWeight FontSubstConfiguration::getSubstWeight( const com::sun::star::uno::Re
|
||||
return (FontWeight)( weight >= 0 ? pWeightNames[weight].nEnum : WEIGHT_DONTKNOW );
|
||||
}
|
||||
|
||||
FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Reference< XNameAccess > xFont,
|
||||
FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Reference< XNameAccess >& rFont,
|
||||
const OUString& rType ) const
|
||||
{
|
||||
int width = -1;
|
||||
try
|
||||
{
|
||||
Any aAny = xFont->getByName( rType );
|
||||
Any aAny = rFont->getByName( rType );
|
||||
if( aAny.getValueTypeClass() == TypeClass_STRING )
|
||||
{
|
||||
const OUString* pLine = (const OUString*)aAny.getValue();
|
||||
@ -983,13 +983,13 @@ FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Refe
|
||||
return (FontWidth)( width >= 0 ? pWidthNames[width].nEnum : WIDTH_DONTKNOW );
|
||||
}
|
||||
|
||||
unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::Reference< XNameAccess > xFont,
|
||||
unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::Reference< XNameAccess >& rFont,
|
||||
const OUString& rType ) const
|
||||
{
|
||||
unsigned long type = 0;
|
||||
try
|
||||
{
|
||||
Any aAny = xFont->getByName( rType );
|
||||
Any aAny = rFont->getByName( rType );
|
||||
if( aAny.getValueTypeClass() == TypeClass_STRING )
|
||||
{
|
||||
const OUString* pLine = (const OUString*)aAny.getValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user