summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-10-26 18:10:33 +0100
committerMichael Stahl <mstahl@redhat.com>2015-10-27 14:39:56 +0100
commit03802af730d37ca4ca2a42d78906b713f39bb9e2 (patch)
treeed55874ecb60c76bf687e25f7efe6ae349d18a9a /xmlhelp
parent6a87d1d7a9fde5bc24cb16642d235044906fe0a8 (diff)
xmlhelp: apparently "picture.jar" hasn't existed for a long time
Change-Id: I9ac46ffcf21e8af2cb3b92d4068981cafb271ebc
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx6
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx84
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.hxx1
3 files changed, 9 insertions, 82 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index 922f9963562e..5604ee191ae0 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -421,11 +421,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
else if ( rProp.Name == "IsErrorDocument" )
xRow->appendBoolean( rProp, m_aURLParameter.isErrorDocument() );
else if ( rProp.Name == "MediaType" )
- if( m_aURLParameter.isPicture() )
- xRow->appendString(
- rProp,
- OUString( "image/gif" ) );
- else if( m_aURLParameter.isActive() )
+ if( m_aURLParameter.isActive() )
xRow->appendString(
rProp,
OUString( "text/plain" ) );
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 72a57d1d24f3..a716d12f6500 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -396,60 +396,16 @@ void URLParameter::open( const Command& aCommand,
if( ! xDataSink.is() )
return;
- if( isPicture() )
+ // a standard document or else an active help text, plug in the new input stream
+ InputStreamTransformer* p = new InputStreamTransformer( this,m_pDatabases,isRoot() );
+ try
{
- Reference< XInputStream > xStream;
- Reference< XHierarchicalNameAccess > xNA =
- m_pDatabases->jarFile( OUString( "picture.jar" ),
- get_language() );
-
- OUString path = get_path();
- if( xNA.is() )
- {
- try
- {
- Any aEntry = xNA->getByHierarchicalName( path );
- Reference< XActiveDataSink > xSink;
- if( ( aEntry >>= xSink ) && xSink.is() )
- xStream = xSink->getInputStream();
- }
- catch ( NoSuchElementException & )
- {
- }
- }
- if( xStream.is() )
- {
- sal_Int32 ret;
- Sequence< sal_Int8 > aSeq( 4096 );
- while( true )
- {
- try
- {
- ret = xStream->readBytes( aSeq,4096 );
- xDataSink->writeBytes( aSeq );
- if( ret < 4096 )
- break;
- }
- catch( const Exception& )
- {
- break;
- }
- }
- }
+ xDataSink->writeBytes( Sequence< sal_Int8 >( p->getData(),p->getLen() ) );
}
- else
+ catch( const Exception& )
{
- // a standard document or else an active help text, plug in the new input stream
- InputStreamTransformer* p = new InputStreamTransformer( this,m_pDatabases,isRoot() );
- try
- {
- xDataSink->writeBytes( Sequence< sal_Int8 >( p->getData(),p->getLen() ) );
- }
- catch( const Exception& )
- {
- }
- delete p;
}
+ delete p;
xDataSink->closeOutput();
}
@@ -464,32 +420,8 @@ void URLParameter::open( const Command& aCommand,
(void)CommandId;
(void)Environment;
- if( isPicture() )
- {
- Reference< XInputStream > xStream;
- Reference< XHierarchicalNameAccess > xNA =
- m_pDatabases->jarFile( OUString( "picture.jar" ),
- get_language() );
-
- OUString path = get_path();
- if( xNA.is() )
- {
- try
- {
- Any aEntry = xNA->getByHierarchicalName( path );
- Reference< XActiveDataSink > xSink;
- if( ( aEntry >>= xSink ) && xSink.is() )
- xStream = xSink->getInputStream();
- }
- catch ( NoSuchElementException & )
- {
- }
- }
- xDataSink->setInputStream( turnToSeekable(xStream) );
- }
- else
- // a standard document or else an active help text, plug in the new input stream
- xDataSink->setInputStream( new InputStreamTransformer( this,m_pDatabases,isRoot() ) );
+ // a standard document or else an active help text, plug in the new input stream
+ xDataSink->setInputStream( new InputStreamTransformer( this,m_pDatabases,isRoot() ) );
}
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
index a35e9410de44..a20c7a24acd4 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
@@ -116,7 +116,6 @@ namespace chelp {
Databases* pDatabases )
throw( com::sun::star::ucb::IllegalIdentifierException );
- bool isPicture() const { return m_aModule == "picture"; }
bool isActive() const { return !m_aActive.isEmpty() && m_aActive == "true"; }
bool isQuery() const { return m_aId.isEmpty() && !m_aQuery.isEmpty(); }
bool isFile() const { return !m_aId.isEmpty(); }