Kaydet (Commit) ea5cba1f authored tarafından Noel Grandin's avatar Noel Grandin

convert svtools/source/contnr/templwin.hxx from String to OUString

Change-Id: I74bccb1833f4353f5c1e629357d59f70fab7bf5e
üst d3ab469b
......@@ -119,7 +119,7 @@ struct FolderHistory
m_sURL( _rURL ), m_nGroup( _nGroup ) {}
};
typedef ::std::vector< OUString* > NewDocList_Impl;
typedef ::std::vector< OUString > NewDocList_Impl;
// class SvtDummyHeaderBar_Impl ------------------------------------------
......@@ -158,14 +158,14 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aNewDocumentRootURL( "private:newdoc" ),
aMyDocumentsRootURL( SvtPathOptions().GetWorkPath() ),
aSamplesFolderRootURL( SvtPathOptions().
SubstituteVariable( String( "$(insturl)/" LIBO_SHARE_FOLDER "/samples/$(vlang)" ) ) ),
SubstituteVariable( "$(insturl)/" LIBO_SHARE_FOLDER "/samples/$(vlang)" ) ),
nMaxTextLength( 0 )
{
aDummyHeaderBar.Show();
aIconCtrl.SetAccessibleName( String( RTL_CONSTASCII_USTRINGPARAM("Groups") ) );
aIconCtrl.SetHelpId( HID_TEMPLATEDLG_ICONCTRL );
aIconCtrl.SetAccessibleName( OUString( "Groups" ) );
aIconCtrl.SetHelpId( HID_TEMPLATEDLG_ICONCTRL );
aIconCtrl.SetChoiceWithCursor( sal_True );
aIconCtrl.SetSelectionMode( SINGLE_SELECTION );
aIconCtrl.Show();
......@@ -183,10 +183,10 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
// "New Document"
Image aImage( SvtResId( IMG_SVT_NEWDOC ) );
nMaxTextLength = aImage.GetSizePixel().Width();
String aEntryStr = SVT_RESSTR(STR_SVT_NEWDOC);
OUString aEntryStr = SVT_RESSTR(STR_SVT_NEWDOC);
SvxIconChoiceCtrlEntry* pEntry =
aIconCtrl.InsertEntry( aEntryStr, aImage, ICON_POS_NEWDOC );
pEntry->SetUserData( new String( aNewDocumentRootURL ) );
pEntry->SetUserData( &aNewDocumentRootURL );
pEntry->SetQuickHelpText( SVT_RESSTR(STR_SVT_NEWDOC_HELP) );
DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" );
long nTemp = pEntry->GetBoundRect().GetSize().Width();
......@@ -194,12 +194,12 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
nMaxTextLength = nTemp;
// "Templates"
if( aTemplateRootURL.Len() > 0 )
if( !aTemplateRootURL.isEmpty() )
{
aEntryStr = SVT_RESSTR(STR_SVT_TEMPLATES);
pEntry = aIconCtrl.InsertEntry(
aEntryStr, Image( SvtResId( IMG_SVT_TEMPLATES ) ), ICON_POS_TEMPLATES );
pEntry->SetUserData( new String( aTemplateRootURL ) );
pEntry->SetUserData( &aTemplateRootURL );
pEntry->SetQuickHelpText(SVT_RESSTR(STR_SVT_TEMPLATES_HELP));
DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" );
nTemp = pEntry->GetBoundRect().GetSize().Width();
......@@ -211,7 +211,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aEntryStr = SVT_RESSTR(STR_SVT_MYDOCS);
pEntry = aIconCtrl.InsertEntry(
aEntryStr, Image( SvtResId( IMG_SVT_MYDOCS ) ), ICON_POS_MYDOCS );
pEntry->SetUserData( new String( aMyDocumentsRootURL ) );
pEntry->SetUserData( &aMyDocumentsRootURL );
pEntry->SetQuickHelpText( SVT_RESSTR(STR_SVT_MYDOCS_HELP) );
DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" );
nTemp = pEntry->GetBoundRect().GetSize().Width();
......@@ -222,7 +222,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aEntryStr = SVT_RESSTR(STR_SVT_SAMPLES);
pEntry = aIconCtrl.InsertEntry(
aEntryStr, Image( SvtResId( IMG_SVT_SAMPLES ) ), ICON_POS_SAMPLES );
pEntry->SetUserData( new String( aSamplesFolderRootURL ) );
pEntry->SetUserData( &aSamplesFolderRootURL );
pEntry->SetQuickHelpText( SVT_RESSTR(STR_SVT_SAMPLES_HELP));
DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" );
nTemp = pEntry->GetBoundRect().GetSize().Width();
......@@ -237,17 +237,17 @@ SvtIconWindow_Impl::~SvtIconWindow_Impl()
for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( i );
delete (String*)pEntry->GetUserData();
delete (OUString*)pEntry->GetUserData();
}
}
SvxIconChoiceCtrlEntry* SvtIconWindow_Impl::GetEntry( const String& rURL ) const
SvxIconChoiceCtrlEntry* SvtIconWindow_Impl::GetEntry( const OUString& rURL ) const
{
SvxIconChoiceCtrlEntry* pEntry = NULL;
for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pTemp = aIconCtrl.GetEntry( i );
String aURL( *( (String*)pTemp->GetUserData() ) );
OUString aURL( *( (OUString*)pTemp->GetUserData() ) );
if ( aURL == rURL )
{
pEntry = pTemp;
......@@ -270,29 +270,29 @@ void SvtIconWindow_Impl::Resize()
aIconCtrl.ArrangeIcons();
}
String SvtIconWindow_Impl::GetCursorPosIconURL() const
OUString SvtIconWindow_Impl::GetCursorPosIconURL() const
{
String aURL;
OUString aURL;
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetCursor( );
if ( pEntry )
aURL = *static_cast<String*>(pEntry->GetUserData());
aURL = *static_cast<OUString*>(pEntry->GetUserData());
return aURL;
}
String SvtIconWindow_Impl::GetSelectedIconURL() const
OUString SvtIconWindow_Impl::GetSelectedIconURL() const
{
sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetSelectedEntry( nPos );
String aURL;
OUString aURL;
if ( pEntry )
aURL = *static_cast<String*>(pEntry->GetUserData());
aURL = *static_cast<OUString*>(pEntry->GetUserData());
return aURL;
}
String SvtIconWindow_Impl::GetIconText( const String& rURL ) const
OUString SvtIconWindow_Impl::GetIconText( const OUString& rURL ) const
{
String aText;
OUString aText;
SvxIconChoiceCtrlEntry* pEntry = GetEntry( rURL );
if ( pEntry )
aText = MnemonicGenerator::EraseAllMnemonicChars( pEntry->GetText() );
......@@ -351,7 +351,7 @@ long SvtIconWindow_Impl::CalcHeight() const
return nHeight;
}
sal_Bool SvtIconWindow_Impl::IsRootURL( const String& rURL ) const
sal_Bool SvtIconWindow_Impl::IsRootURL( const OUString& rURL ) const
{
return rURL == aNewDocumentRootURL ||
rURL == aTemplateRootURL ||
......@@ -359,18 +359,18 @@ sal_Bool SvtIconWindow_Impl::IsRootURL( const String& rURL ) const
rURL == aSamplesFolderRootURL;
}
sal_uLong SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
sal_uLong SvtIconWindow_Impl::GetRootPos( const OUString& rURL ) const
{
sal_uLong nPos = ~sal_uLong(0);
if ( aNewDocumentRootURL.Match( rURL ) == STRING_MATCH )
if ( rURL.startsWith(aNewDocumentRootURL) )
nPos = 0;
else if ( aTemplateRootURL.Match( rURL ) == STRING_MATCH )
else if ( rURL.startsWith(aTemplateRootURL) )
nPos = 1;
else if ( aMyDocumentsRootURL.Match( rURL ) == STRING_MATCH )
else if ( rURL.startsWith(aMyDocumentsRootURL) )
nPos = 2;
else if ( aSamplesFolderRootURL.Match( rURL ) == STRING_MATCH )
else if ( rURL.startsWith(aSamplesFolderRootURL) )
nPos = 3;
else if ( rURL.Match( aMyDocumentsRootURL ) == STRING_MATCH )
else if ( aMyDocumentsRootURL.startsWith(rURL) )
nPos = 2;
else
{
......@@ -470,35 +470,33 @@ Sequence< OUString > SvtFileViewWindow_Impl::GetNewDocContents() const
continue;
if( aURL == sSeparator )
{
String aSeparator( aSeparatorStr );
OUString* pSeparator = new OUString( aSeparator );
aNewDocs.push_back( pSeparator );
OUString aSeparator( aSeparatorStr );
aNewDocs.push_back( aSeparator );
}
else
{
// title
String aRow = MnemonicGenerator::EraseAllMnemonicChars( String( aTitle ) );
aRow += '\t';
OUString aRow = MnemonicGenerator::EraseAllMnemonicChars( aTitle );
aRow += "\t";
// no type
aRow += '\t';
aRow += "\t";
// no size
aRow += '\t';
aRow += "\t";
// no date
aRow += '\t';
aRow += "\t";
// url
aRow += String( aURL );
aRow += '\t';
aRow += aURL;
aRow += "\t";
// folder == false
aRow += '0';
aRow += "0";
// image url?
if ( !aImageURL.isEmpty() )
{
aRow += '\t';
aRow += String( aImageURL );
aRow += "\t";
aRow += aImageURL;
}
OUString* pRow = new OUString( aRow );
aNewDocs.push_back( pRow );
aNewDocs.push_back( aRow );
}
}
......@@ -507,9 +505,7 @@ Sequence< OUString > SvtFileViewWindow_Impl::GetNewDocContents() const
OUString* pRet = aRet.getArray();
for ( i = 0; i < nCount; ++i )
{
OUString* pNewDoc = aNewDocs[i];
pRet[i] = *( pNewDoc );
delete pNewDoc;
pRet[i] = aNewDocs[i];
}
return aRet;
......@@ -520,12 +516,12 @@ void SvtFileViewWindow_Impl::Resize()
aFileView.SetSizePixel(GetOutputSizePixel());
}
String SvtFileViewWindow_Impl::GetSelectedFile() const
OUString SvtFileViewWindow_Impl::GetSelectedFile() const
{
return aFileView.GetCurrentURL();
}
void SvtFileViewWindow_Impl::OpenFolder( const String& rURL )
void SvtFileViewWindow_Impl::OpenFolder( const OUString& rURL )
{
aFolderURL = rURL;
......@@ -538,10 +534,10 @@ void SvtFileViewWindow_Impl::OpenFolder( const String& rURL )
}
else
{
xub_StrLen nSampFoldLen = aSamplesFolderURL.Len();
sal_Int32 nSampFoldLen = aSamplesFolderURL.getLength();
aFileView.EnableNameReplacing(
nSampFoldLen && rURL.CompareTo( aSamplesFolderURL, nSampFoldLen ) == COMPARE_EQUAL );
aFileView.Initialize( rURL, String(), NULL );
nSampFoldLen && rURL.compareTo( aSamplesFolderURL, nSampFoldLen ) == 0 );
aFileView.Initialize( rURL, "", NULL );
}
aNewFolderLink.Call( this );
}
......@@ -555,7 +551,7 @@ sal_Bool SvtFileViewWindow_Impl::HasPreviousLevel( OUString& rURL ) const
return ( ( aViewObj != aRootObj || aRootObj == aMyDocObj ) && aFileView.GetParentURL( rURL ) );
}
String SvtFileViewWindow_Impl::GetFolderTitle() const
OUString SvtFileViewWindow_Impl::GetFolderTitle() const
{
OUString aTitle;
::utl::UCBContentHelper::GetTitle( aFolderURL, &aTitle );
......@@ -644,7 +640,7 @@ void SvtFrameWindow_Impl::ViewNonEmptyWin()
ViewTextWin();
}
void SvtFrameWindow_Impl::ShowDocInfo( const String& rURL )
void SvtFrameWindow_Impl::ShowDocInfo( const OUString& rURL )
{
try
{
......@@ -668,7 +664,7 @@ void SvtFrameWindow_Impl::Resize()
pEmptyWin->SetSizePixel( aWinSize );
}
void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_Bool bIsTemplate, sal_Bool bAsTemplate )
void SvtFrameWindow_Impl::OpenFile( const OUString& rURL, sal_Bool bPreview, sal_Bool bIsTemplate, sal_Bool bAsTemplate )
{
if ( bPreview )
aCurrentURL = rURL;
......@@ -676,10 +672,10 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
ViewNonEmptyWin();
pEditWin->clear();
if ( rURL.Len() > 0 && bPreview && m_xDocProps.is() )
if ( !rURL.isEmpty() && bPreview && m_xDocProps.is() )
ShowDocInfo( rURL );
if ( rURL.Len() == 0 )
if ( rURL.isEmpty() )
{
m_xFrame->setComponent( Reference < com::sun::star::awt::XWindow >(), Reference < XController >() );
ViewEmptyWin();
......@@ -692,15 +688,14 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
com::sun::star::util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
xTrans->parseStrict( aURL );
String aTarget;
OUString aTarget;
Reference < XDispatchProvider > xProv( m_xFrame, UNO_QUERY_THROW );
if ( bPreview )
aTarget = "_self";
else
{
// can be removed if the database application change its URL
String sServiceScheme( RTL_CONSTASCII_USTRINGPARAM( "service:" ) );
if ( rURL.Match( sServiceScheme ) != sServiceScheme.Len() )
if ( !rURL.startsWith( "service:" ) )
// service URL has no default target
aTarget = "_default";
xProv = Reference < XDispatchProvider >( Desktop::create(::comphelper::getProcessComponentContext() ),
......@@ -862,8 +857,8 @@ SvtTemplateWindow::~SvtTemplateWindow()
IMPL_LINK_NOARG(SvtTemplateWindow , IconClickHdl_Impl)
{
String aURL = pIconWin->GetSelectedIconURL();
if ( !aURL.Len() )
OUString aURL = pIconWin->GetSelectedIconURL();
if ( aURL.isEmpty() )
aURL = pIconWin->GetCursorPosIconURL();
if ( pFileWin->GetRootURL() != aURL )
{
......@@ -889,8 +884,8 @@ IMPL_LINK_NOARG(SvtTemplateWindow , FileDblClickHdl_Impl)
if ( aSelectTimer.IsActive() )
aSelectTimer.Stop();
String aURL = pFileWin->GetSelectedFile();
if ( aURL.Len() > 0 )
OUString aURL = pFileWin->GetSelectedFile();
if ( !aURL.isEmpty() )
{
if ( ::utl::UCBContentHelper::IsFolder( aURL ) )
pFileWin->OpenFolder( aURL );
......@@ -905,10 +900,10 @@ IMPL_LINK_NOARG(SvtTemplateWindow , FileDblClickHdl_Impl)
IMPL_LINK_NOARG(SvtTemplateWindow , NewFolderHdl_Impl)
{
pFrameWin->OpenFile( String(), sal_True, sal_False, sal_False );
pFrameWin->OpenFile( "", sal_True, sal_False, sal_False );
aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
String sURL = pFileWin->GetFolderURL();
OUString sURL = pFileWin->GetFolderURL();
sal_uLong nPos = pIconWin->GetRootPos( sURL );
AppendHistoryURL( sURL, nPos );
......@@ -921,9 +916,9 @@ IMPL_LINK_NOARG(SvtTemplateWindow , NewFolderHdl_Impl)
IMPL_LINK_NOARG(SvtTemplateWindow , TimeoutHdl_Impl)
{
aSelectHdl.Call( this );
String sURL = pFileWin->GetSelectedFile();
OUString sURL = pFileWin->GetSelectedFile();
sal_Bool bIsNewDoc = ( pIconWin->GetSelectEntryPos() == ICON_POS_NEWDOC );
sal_Bool bIsFile = ( sURL.Len() != 0 && !::utl::UCBContentHelper::IsFolder( sURL ) &&
sal_Bool bIsFile = ( !sURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( sURL ) &&
INetURLObject( sURL ).GetProtocol() != INET_PROT_PRIVATE && !bIsNewDoc );
aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, bIsFile );
aFrameWinTB.EnableItem( TI_DOCTEMPLATE_PREVIEW, !bIsNewDoc );
......@@ -956,7 +951,7 @@ IMPL_LINK_NOARG(SvtTemplateWindow , ResizeHdl_Impl)
// ------------------------------------------------------------------------
void SvtTemplateWindow::PrintFile( const String& rURL )
void SvtTemplateWindow::PrintFile( const OUString& rURL )
{
// open the file readonly and hidden
Sequence < PropertyValue > aArgs( 2 );
......@@ -979,7 +974,7 @@ void SvtTemplateWindow::PrintFile( const String& rURL )
// ------------------------------------------------------------------------
void SvtTemplateWindow::AppendHistoryURL( const String& rURL, sal_uLong nGroup )
void SvtTemplateWindow::AppendHistoryURL( const OUString& rURL, sal_uLong nGroup )
{
sal_Bool bInsert = sal_True;
if ( !pHistoryList )
......@@ -1189,7 +1184,7 @@ void SvtTemplateWindow::Resize()
// ------------------------------------------------------------------------
String SvtTemplateWindow::GetSelectedFile() const
OUString SvtTemplateWindow::GetSelectedFile() const
{
return pFileWin->GetSelectedFile();
}
......@@ -1198,8 +1193,8 @@ String SvtTemplateWindow::GetSelectedFile() const
sal_Bool SvtTemplateWindow::IsFileSelected() const
{
String aURL = pFileWin->GetSelectedFile();
sal_Bool bRet = ( aURL.Len() > 0 && !::utl::UCBContentHelper::IsFolder( aURL ) );
OUString aURL = pFileWin->GetSelectedFile();
sal_Bool bRet = ( !aURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( aURL ) );
return bRet;
}
......@@ -1207,17 +1202,17 @@ sal_Bool SvtTemplateWindow::IsFileSelected() const
void SvtTemplateWindow::OpenFile( sal_Bool bNotAsTemplate )
{
String aURL = pFileWin->GetSelectedFile();
if ( aURL.Len() > 0 && !::utl::UCBContentHelper::IsFolder( aURL ) )
OUString aURL = pFileWin->GetSelectedFile();
if ( !aURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( aURL ) )
pFrameWin->OpenFile( aURL, sal_False, pFileWin->IsTemplateFolder(), !bNotAsTemplate );
}
// ------------------------------------------------------------------------
String SvtTemplateWindow::GetFolderTitle() const
OUString SvtTemplateWindow::GetFolderTitle() const
{
String sTitle;
String sFolderURL = pFileWin->GetFolderURL();
OUString sTitle;
OUString sFolderURL = pFileWin->GetFolderURL();
if ( pIconWin->IsRootURL( sFolderURL ) )
sTitle = pIconWin->GetIconText( sFolderURL );
else
......@@ -1227,7 +1222,7 @@ String SvtTemplateWindow::GetFolderTitle() const
// ------------------------------------------------------------------------
String SvtTemplateWindow::GetFolderURL() const
OUString SvtTemplateWindow::GetFolderURL() const
{
return pFileWin->GetFolderURL();
}
......@@ -1252,7 +1247,7 @@ void SvtTemplateWindow::OpenTemplateRoot()
// ------------------------------------------------------------------------
void SvtTemplateWindow::SetPrevLevelButtonState( const String& rURL )
void SvtTemplateWindow::SetPrevLevelButtonState( const OUString& rURL )
{
// disable the prev level button on root folder of the icon pane (except My Documents)
// and on the root of all (file:/// -> count == 0)
......@@ -1383,7 +1378,7 @@ void SvtTemplateWindow::SelectFolder(sal_Int32 nFolderPosition)
struct SvtTmplDlg_Impl
{
SvtTemplateWindow* pWin;
String aTitle;
OUString aTitle;
Timer aUpdateTimer;
sal_Bool bSelectNoOpen;
......@@ -1424,8 +1419,7 @@ void SvtDocumentTemplateDialog::InitImpl( )
== SvtExtendedSecurityOptions::OPEN_NEVER );
if ( !bHideLink )
{
aMoreTemplatesLink.SetURL( String(
RTL_CONSTASCII_USTRINGPARAM( "http://templates.libreoffice.org/" ) ) );
aMoreTemplatesLink.SetURL( "http://templates.libreoffice.org/" );
aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) );
}
else
......@@ -1554,8 +1548,8 @@ IMPL_LINK_NOARG(SvtDocumentTemplateDialog , DoubleClickHdl_Impl)
IMPL_LINK_NOARG(SvtDocumentTemplateDialog , NewFolderHdl_Impl)
{
String aNewTitle( pImpl->aTitle );
aNewTitle += String( " - " );
OUString aNewTitle( pImpl->aTitle );
aNewTitle += " - ";
aNewTitle += pImpl->pWin->GetFolderTitle();
SetText( aNewTitle );
......
......@@ -62,14 +62,14 @@ private:
SvtDummyHeaderBar_Impl aDummyHeaderBar; // spaceholder instead of HeaderBar
SvtIconChoiceCtrl aIconCtrl;
String aNewDocumentRootURL;
String aTemplateRootURL;
String aMyDocumentsRootURL;
String aSamplesFolderRootURL;
OUString aNewDocumentRootURL;
OUString aTemplateRootURL;
OUString aMyDocumentsRootURL;
OUString aSamplesFolderRootURL;
long nMaxTextLength;
SvxIconChoiceCtrlEntry* GetEntry( const String& rURL ) const;
SvxIconChoiceCtrlEntry* GetEntry( const OUString& rURL ) const;
public:
SvtIconWindow_Impl( Window* pParent );
......@@ -80,24 +80,24 @@ public:
inline long GetMaxTextLength() const { return nMaxTextLength; }
inline void SetClickHdl( const Link& rLink ) { aIconCtrl.SetClickHdl( rLink ); }
String GetSelectedIconURL() const;
String GetCursorPosIconURL() const;
String GetIconText( const String& rURL ) const;
OUString GetSelectedIconURL() const;
OUString GetCursorPosIconURL() const;
OUString GetIconText( const OUString& rURL ) const;
void InvalidateIconControl();
void SetCursorPos( sal_uLong nPos );
sal_uLong GetCursorPos() const;
sal_uLong GetSelectEntryPos() const;
sal_uLong GetCursorPos() const;
sal_uLong GetSelectEntryPos() const;
void SetFocus();
long CalcHeight() const;
sal_Bool IsRootURL( const String& rURL ) const;
sal_uLong GetRootPos( const String& rURL ) const;
sal_Bool IsRootURL( const OUString& rURL ) const;
sal_uLong GetRootPos( const OUString& rURL ) const;
void UpdateIcons();
inline sal_Bool ProcessKeyEvent( const KeyEvent& rKEvt );
inline const String& GetTemplateRootURL() const { return aTemplateRootURL; }
inline const String& GetMyDocumentsRootURL() const { return aMyDocumentsRootURL; }
inline const String& GetSamplesFolderURL() const { return aSamplesFolderRootURL; }
inline const OUString& GetTemplateRootURL() const { return aTemplateRootURL; }
inline const OUString& GetMyDocumentsRootURL() const { return aMyDocumentsRootURL; }
inline const OUString& GetSamplesFolderURL() const { return aSamplesFolderRootURL; }
void SelectFolder(sal_Int32 nFolderPos);
};
......@@ -117,10 +117,10 @@ private:
SvtTemplateWindow& rParent;
SvtFileView aFileView;
Link aNewFolderLink;
String aCurrentRootURL;
String aFolderURL;
String aMyDocumentsURL;
String aSamplesFolderURL;
OUString aCurrentRootURL;
OUString aFolderURL;
OUString aMyDocumentsURL;
OUString aSamplesFolderURL;
sal_Bool bIsTemplateFolder;
......@@ -137,17 +137,17 @@ public:
inline void SetDoubleClickHdl( const Link& rLink ) { aFileView.SetDoubleClickHdl( rLink ); }
inline void SetNewFolderHdl( const Link& rLink ) { aNewFolderLink = rLink; }
inline sal_Bool IsTemplateFolder() const { return bIsTemplateFolder; }
inline String GetFolderURL() const { return aFolderURL; }
inline String GetRootURL() const { return aCurrentRootURL; }
inline void OpenRoot( const String& rRootURL )
inline OUString GetFolderURL() const { return aFolderURL; }
inline OUString GetRootURL() const { return aCurrentRootURL; }
inline void OpenRoot( const OUString& rRootURL )
{ aCurrentRootURL = rRootURL; OpenFolder( rRootURL ); }
inline void SetMyDocumentsURL( const String& _rNewURL ) { aMyDocumentsURL = _rNewURL; }
inline void SetSamplesFolderURL( const String& _rNewURL ) { aSamplesFolderURL = _rNewURL; }
inline void SetMyDocumentsURL( const OUString& _rNewURL ) { aMyDocumentsURL = _rNewURL; }
inline void SetSamplesFolderURL( const OUString& _rNewURL ) { aSamplesFolderURL = _rNewURL; }
String GetSelectedFile() const;
void OpenFolder( const String& rURL );
OUString GetSelectedFile() const;
void OpenFolder( const OUString& rURL );
sal_Bool HasPreviousLevel( OUString& rURL ) const;
String GetFolderTitle() const;
OUString GetFolderTitle() const;
void SetFocus();
};
......@@ -177,11 +177,11 @@ private:
Window* pEmptyWin;
::com::sun::star::lang::Locale aLocale;
SvtDocInfoTable_Impl aInfoTable;
String aCurrentURL;
OUString aCurrentURL;
OUString m_aOpenURL;
sal_Bool bDocInfo;
void ShowDocInfo( const String& rURL );
void ShowDocInfo( const OUString& rURL );
void ViewEditWin();
void ViewTextWin();
void ViewEmptyWin();
......@@ -199,7 +199,7 @@ public:
virtual void Resize();
void OpenFile( const String& rURL, sal_Bool bPreview, sal_Bool bIsTemplate, sal_Bool bAsTemplate );
void OpenFile( const OUString& rURL, sal_Bool bPreview, sal_Bool bIsTemplate, sal_Bool bAsTemplate );
void ToggleView( sal_Bool bDocInfo );
};
......@@ -227,7 +227,7 @@ private:
Timer aSelectTimer;
String aFolderTitle;
OUString aFolderTitle;
virtual void Resize();
......@@ -239,8 +239,8 @@ private:
DECL_LINK( ClickHdl_Impl, ToolBox* );
DECL_LINK(ResizeHdl_Impl, void *); // used for split and initial setting of toolbar pos
void PrintFile( const String& rURL );
void AppendHistoryURL( const String& rURL, sal_uLong nGroup );
void PrintFile( const OUString& rURL );
void AppendHistoryURL( const OUString& rURL, sal_uLong nGroup );
void OpenHistory();
void DoAction( sal_uInt16 nAction );
void InitToolBoxes();
......@@ -265,13 +265,13 @@ public:
void ReadViewSettings( );
void WriteViewSettings( );
sal_Bool IsFileSelected() const;
String GetSelectedFile() const;
OUString GetSelectedFile() const;
void OpenFile( sal_Bool bNotAsTemplate );
String GetFolderTitle() const;
String GetFolderURL() const;
OUString GetFolderTitle() const;
OUString GetFolderURL() const;
void SetFocus( sal_Bool bIconWin );
void OpenTemplateRoot();
void SetPrevLevelButtonState( const String& rURL ); // sets state (enable/disable) for previous level button
void SetPrevLevelButtonState( const OUString& rURL ); // sets state (enable/disable) for previous level button
void ClearHistory();
long CalcHeight() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment