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