summaryrefslogtreecommitdiff
path: root/starmath/source/smdetect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/smdetect.cxx')
-rw-r--r--starmath/source/smdetect.cxx28
1 files changed, 12 insertions, 16 deletions
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index c497e393f513..4c8e0075a4ef 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -31,7 +31,7 @@
#include "smdetect.hxx"
-#include <framework/interaction.hxx>
+//#include <framework/interaction.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -170,7 +170,7 @@ SmFilterDetect::~SmFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -191,7 +191,7 @@ SmFilterDetect::~SmFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
aMedium.UseInteractionHandler( true );
bool bIsStorage = aMedium.IsStorage();
@@ -243,7 +243,7 @@ SmFilterDetect::~SmFilterDetect()
String aTmpFilterName;
if ( pFilter )
aTmpFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : FALSE, &aTmpFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : sal_False, &aTmpFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -263,20 +263,16 @@ SmFilterDetect::~SmFilterDetect()
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -311,7 +307,7 @@ SmFilterDetect::~SmFilterDetect()
aTypeName.Erase();
if (pStrm && !pStrm->GetError())
{
- SotStorageRef aStorage = new SotStorage ( pStrm, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStrm, sal_False );
if ( !aStorage->GetError() )
{
if ( aStorage->IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Equation Native" ) ) ) )
@@ -323,11 +319,11 @@ SmFilterDetect::~SmFilterDetect()
}
else
{
- const USHORT nSize = 5;
+ const sal_uInt16 nSize = 5;
sal_Char aBuffer[nSize+1];
aBuffer[nSize] = 0;
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
- ULONG nBytesRead = pStrm->Read( aBuffer, nSize );
+ sal_uLong nBytesRead = pStrm->Read( aBuffer, nSize );
if (nBytesRead == nSize)
{
if (0 == strncmp( "<?xml",aBuffer,nSize))