summaryrefslogtreecommitdiff
path: root/sd/source/filter/ppt
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-09-05 17:22:12 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-09-05 17:22:41 +0400
commit03730253464f4cd18e6acb90ed981a691ba97e81 (patch)
tree68d4ceb96fcc49f7b2e9d8342da8fb052abf6106 /sd/source/filter/ppt
parent660fe83b4357c9fa070739b9c4da9d9002c9bd51 (diff)
String->OUString
Change-Id: I0298ff90654a5778621730801d0952b2ed3ee5e8
Diffstat (limited to 'sd/source/filter/ppt')
-rw-r--r--sd/source/filter/ppt/pptin.cxx46
-rw-r--r--sd/source/filter/ppt/pptin.hxx6
-rw-r--r--sd/source/filter/ppt/propread.cxx10
-rw-r--r--sd/source/filter/ppt/propread.hxx4
4 files changed, 33 insertions, 33 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 0da1ee5eaceb..d9fd7c6d7bd5 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -99,7 +99,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvSto
sal_uInt32 nImportFlags = 0;
#ifdef DBG_UTIL
- PropRead* pSummaryInformation = new PropRead( rStorage, String( "\005SummaryInformation" ) );
+ PropRead* pSummaryInformation = new PropRead( rStorage, OUString( "\005SummaryInformation" ) );
if ( pSummaryInformation->IsValid() )
{
pSummaryInformation->Read();
@@ -601,7 +601,7 @@ sal_Bool ImplSdPPTImport::Import()
// create layoutstylesheets, set layoutname and stylesheet
// (only on standard and not pages)
///////////////////////////////////////////////////////////
- String aLayoutName( SdResId( STR_LAYOUT_DEFAULT_NAME ) );
+ OUString aLayoutName( SD_RESSTR( STR_LAYOUT_DEFAULT_NAME ) );
if ( nMasterNum > 2 )
{
if ( ePgKind == PK_STANDARD )
@@ -614,7 +614,7 @@ sal_Bool ImplSdPPTImport::Import()
aLayoutName = ( (SdPage*)mpDoc->GetMasterPage( nMasterNum - 1 ) )->GetName();
}
pPage->SetName( aLayoutName );
- aLayoutName.AppendAscii( SD_LT_SEPARATOR );
+ aLayoutName += SD_LT_SEPARATOR;
aLayoutName += SD_RESSTR( STR_LAYOUT_OUTLINE );
pPage->SetLayoutName( aLayoutName );
@@ -724,7 +724,7 @@ sal_Bool ImplSdPPTImport::Import()
pSdrModel->InsertMasterPage( pNotesClone, nAktPageNum );
if ( pNotesClone )
{
- String aLayoutName( ((SdPage*)pSdrModel->GetMasterPage( nAktPageNum - 1 ))->GetLayoutName() );
+ OUString aLayoutName( ((SdPage*)pSdrModel->GetMasterPage( nAktPageNum - 1 ))->GetLayoutName() );
((SdPage*)pNotesClone)->SetPresentationLayout( aLayoutName, sal_False, sal_False, sal_False );
((SdPage*)pNotesClone)->SetLayoutName( aLayoutName );
}
@@ -1300,7 +1300,7 @@ sal_Bool ImplSdPPTImport::Import()
}
}
// this is defaulted, maybe there is no SSDocInfoAtom
- String aCustomShow;
+ OUStringBuffer aCustomShow;
sal_uInt32 nFlags = 1; // Bit 0: Auto advance
sal_uInt16 nStartSlide = 0;
@@ -1321,7 +1321,7 @@ sal_Bool ImplSdPPTImport::Import()
{
rStCtrl >> nChar;
if ( nChar )
- aCustomShow.Append( nChar );
+ aCustomShow.append( nChar );
else
{
rStCtrl.SeekRel( ( 31 - i2 ) << 1 );
@@ -1331,15 +1331,16 @@ sal_Bool ImplSdPPTImport::Import()
rStCtrl >> nFlags;
}
// set the current custom show
- if ( aCustomShow.Len() )
+ if ( aCustomShow.getLength() )
{
SdCustomShowList* pList = mpDoc->GetCustomShowList( sal_False );
if ( pList )
{
SdCustomShow* pPtr = NULL;
+ OUString aCustomShowStr = aCustomShow.makeStringAndClear();
for( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
{
- if ( pPtr->GetName() == aCustomShow )
+ if ( pPtr->GetName() == aCustomShowStr )
break;
}
if ( !pPtr )
@@ -1411,7 +1412,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide
pPage->NbcInsertObject( pObj, 0 );
}
}
- String aPlaceHolderString = pHFE->pPlaceholder[ i ];
+ OUString aPlaceHolderString = pHFE->pPlaceholder[ i ];
sd::HeaderFooterSettings rHeaderFooterSettings( pPage->getHeaderFooterSettings() );
switch( i )
@@ -1768,7 +1769,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
if ( nBuildFlags & 16 )
{ // slide with sound effect
pPage->SetSound( sal_True );
- String aSoundFile( ReadSound( nSoundRef ) );
+ OUString aSoundFile( ReadSound( nSoundRef ) );
pPage->SetSoundFile( aSoundFile );
}
if ( nBuildFlags & ( 1 << 6 ) ) // Loop until next sound
@@ -1852,7 +1853,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
//
///////////////////////////////////////////////////////////////////////////
-String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
+OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
{
OUString aRetval;
sal_uInt32 nPosMerk = rStCtrl.Tell();
@@ -1895,7 +1896,7 @@ String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
// Check if this sound file already exists.
// If not, it is exported to our local sound directory.
sal_Bool bSoundExists = sal_False;
- ::std::vector< String > aSoundList;
+ ::std::vector< OUString > aSoundList;
GalleryExplorer::FillObjList( GALLERY_THEME_SOUNDS, aSoundList );
GalleryExplorer::FillObjList( GALLERY_THEME_USERSOUNDS, aSoundList );
@@ -1919,8 +1920,9 @@ String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
DffRecordHeader aSoundDataRecHd;
if ( SeekToRec( rStCtrl, PPT_PST_SoundData, nStrLen, &aSoundDataRecHd, 0 ) )
{
- String aGalleryDir( SvtPathOptions().GetGalleryPath() );
- INetURLObject aGalleryUserSound( aGalleryDir.GetToken( comphelper::string::getTokenCount(aGalleryDir, ';') - 1 ) );
+ OUString aGalleryDir( SvtPathOptions().GetGalleryPath() );
+ sal_Int32 nTokenCount = comphelper::string::getTokenCount(aGalleryDir, ';');
+ INetURLObject aGalleryUserSound( aGalleryDir.getToken( nTokenCount - 1, ';' ) );
aGalleryUserSound.Append( aRetval );
sal_uInt32 nSoundDataLen = aSoundDataRecHd.nRecLen;
@@ -1961,7 +1963,7 @@ String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
//
//////////////////////////////////////////////////////////////////////////
-String ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
+OUString ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
{
OUString aRetVal;
DffRecordHeader* pHd( const_cast<ImplSdPPTImport*>(this)->aDocRecManager.GetRecordHeader( PPT_PST_ExObjList, SEEK_FROM_BEGINNING ) );
@@ -2031,7 +2033,7 @@ String ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
//
//////////////////////////////////////////////////////////////////////////
-void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, String aMacroName )
+void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName )
{
// set local information into pInfo
if( pIAtom->nSoundRef )
@@ -2098,7 +2100,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv
::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
if ( pDocShell )
{
- String aBaseURL = pDocShell->GetMedium()->GetBaseURL();
+ OUString aBaseURL = pDocShell->GetMedium()->GetBaseURL();
OUString aBookmarkURL( pInfo->GetBookmark() );
INetURLObject aURL( pPtr->aTarget );
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
@@ -2147,7 +2149,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
PresObjKind ePresKind = PRESOBJ_NONE;
PptOEPlaceholderAtom* pPlaceHolder = pTextObj->GetOEPlaceHolderAtom();
- String aPresentationText;
+ OUString aPresentationText;
if ( pPlaceHolder )
{
switch( pPlaceHolder->nPlaceholderId )
@@ -2281,7 +2283,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
SdrOutliner* pOutl = NULL;
if ( pTextObj->GetInstance() == TSS_TYPE_NOTES )
pOutl = GetDrawOutliner( pText );
- if ( aPresentationText.Len() )
+ if ( !aPresentationText.isEmpty() )
pPage->SetObjText( (SdrTextObj*)pText, pOutl, ePresKind, aPresentationText );
if ( pPage->GetPageKind() != PK_NOTES && pPage->GetPageKind() != PK_HANDOUT)
@@ -2643,10 +2645,10 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
{
sal_uInt32 nRef;
rSt >> nRef;
- String aMediaURL( ReadMedia( nRef ) );
- if ( !aMediaURL.Len() )
+ OUString aMediaURL( ReadMedia( nRef ) );
+ if ( aMediaURL.isEmpty() )
aMediaURL = ReadSound( nRef );
- if ( aMediaURL.Len() )
+ if ( !aMediaURL.isEmpty() )
{
SdrMediaObj* pMediaObj = new SdrMediaObj( pObj->GetSnapRect() );
pMediaObj->SetModel( pObj->GetModel() );
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index 784d78231fd6..e5bb8e927936 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -63,7 +63,7 @@ class ImplSdPPTImport : public SdrPowerPointImport
void SetHeaderFooterPageSettings( SdPage* pPage, const PptSlidePersistEntry* pMasterPersist );
void ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed );
- void FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, String aMacroName );
+ void FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName );
virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj );
virtual SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPage* pPage,
@@ -71,8 +71,8 @@ class ImplSdPPTImport : public SdrPowerPointImport
public:
- String ReadSound( sal_uInt32 nSoundRef ) const;
- String ReadMedia( sal_uInt32 nMediaRef ) const;
+ OUString ReadSound( sal_uInt32 nSoundRef ) const;
+ OUString ReadMedia( sal_uInt32 nMediaRef ) const;
ImplSdPPTImport( SdDrawDocument* pDoc, SvStorage& rStorage, SfxMedium& rMed, PowerPointImportParam& );
~ImplSdPPTImport();
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 6798915c7d02..42fc3f816241 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -63,15 +63,15 @@ void PropItem::Clear()
// -----------------------------------------------------------------------
-static xub_StrLen lcl_getMaxSafeStrLen(sal_uInt32 nSize)
+static sal_Int32 lcl_getMaxSafeStrLen(sal_uInt32 nSize)
{
nSize -= 1; //Drop NULL terminator
//If it won't fit in a string, clip it to the max size that does
- if (nSize > STRING_MAXLEN)
- nSize = STRING_MAXLEN;
+ if (nSize > SAL_MAX_INT32)
+ nSize = SAL_MAX_INT32;
- return static_cast< xub_StrLen >( nSize );
+ return static_cast< sal_Int32 >( nSize );
}
sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAlign )
@@ -522,7 +522,7 @@ Section& Section::operator=( const Section& rSection )
// -----------------------------------------------------------------------
-PropRead::PropRead( SvStorage& rStorage, const String& rName ) :
+PropRead::PropRead( SvStorage& rStorage, const OUString& rName ) :
mbStatus ( sal_False ),
mnByteOrder ( 0xfffe ),
mnFormat ( 0 ),
diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx
index 158dca807230..c5d600f96383 100644
--- a/sd/source/filter/ppt/propread.hxx
+++ b/sd/source/filter/ppt/propread.hxx
@@ -28,8 +28,6 @@
#include <sot/storage.hxx>
#include <tools/stream.hxx>
-#include <tools/string.hxx>
-
// SummaryInformation
#define PID_TITLE 0x02
#define PID_SUBJECT 0x03
@@ -172,7 +170,7 @@ class PropRead
void AddSection( Section& rSection );
public:
- PropRead( SvStorage& rSvStorage, const String& rName );
+ PropRead( SvStorage& rSvStorage, const OUString& rName );
PropRead& operator=( const PropRead& rPropRead );
const Section* GetSection( const sal_uInt8* pFMTID );