rtl::OUString to OUString in basctl
Change-Id: Iaa56c5f8a15032c3102ad58011c80e3c86fe287c
This commit is contained in:
committed by
Muthu Subramanian
parent
4874a0dcbf
commit
bb414e9eee
@@ -126,7 +126,7 @@ void Shell::SetMDITitle()
|
|||||||
aTitleBuf.append(IDE_RESSTR(RID_STR_SIGNED));
|
aTitleBuf.append(IDE_RESSTR(RID_STR_SIGNED));
|
||||||
aTitleBuf.append(' ');
|
aTitleBuf.append(' ');
|
||||||
}
|
}
|
||||||
::rtl::OUString aTitle(aTitleBuf.makeStringAndClear());
|
OUString aTitle(aTitleBuf.makeStringAndClear());
|
||||||
|
|
||||||
SfxViewFrame* pViewFrame = GetViewFrame();
|
SfxViewFrame* pViewFrame = GetViewFrame();
|
||||||
if ( pViewFrame )
|
if ( pViewFrame )
|
||||||
@@ -145,18 +145,18 @@ void Shell::SetMDITitle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )
|
ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
|
||||||
{
|
{
|
||||||
bCreatingWindow = true;
|
bCreatingWindow = true;
|
||||||
|
|
||||||
sal_uLong nKey = 0;
|
sal_uLong nKey = 0;
|
||||||
ModulWindow* pWin = 0;
|
ModulWindow* pWin = 0;
|
||||||
|
|
||||||
::rtl::OUString aLibName( rLibName );
|
OUString aLibName( rLibName );
|
||||||
::rtl::OUString aModName( rModName );
|
OUString aModName( rModName );
|
||||||
|
|
||||||
if ( aLibName.isEmpty() )
|
if ( aLibName.isEmpty() )
|
||||||
aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
|
aLibName = "Standard" ;
|
||||||
|
|
||||||
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
|
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
|
|||||||
|
|
||||||
if ( !pWin )
|
if ( !pWin )
|
||||||
{
|
{
|
||||||
::rtl::OUString aModule;
|
OUString aModule;
|
||||||
bool bSuccess = false;
|
bool bSuccess = false;
|
||||||
if ( rDocument.hasModule( aLibName, aModName ) )
|
if ( rDocument.hasModule( aLibName, aModName ) )
|
||||||
bSuccess = rDocument.getModule( aLibName, aModName, aModule );
|
bSuccess = rDocument.getModule( aLibName, aModName, aModule );
|
||||||
@@ -200,11 +200,11 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
|
|||||||
{
|
{
|
||||||
// display a nice friendly name in the ObjectModule tab,
|
// display a nice friendly name in the ObjectModule tab,
|
||||||
// combining the objectname and module name, e.g. Sheet1 ( Financials )
|
// combining the objectname and module name, e.g. Sheet1 ( Financials )
|
||||||
::rtl::OUString sObjName;
|
OUString sObjName;
|
||||||
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
|
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
|
||||||
if( !sObjName.isEmpty() )
|
if( !sObjName.isEmpty() )
|
||||||
{
|
{
|
||||||
::rtl::OUStringBuffer aModNameBuf(aModName);
|
OUStringBuffer aModNameBuf(aModName);
|
||||||
aModNameBuf.append(' ');
|
aModNameBuf.append(' ');
|
||||||
aModNameBuf.append('(');
|
aModNameBuf.append('(');
|
||||||
aModNameBuf.append(sObjName);
|
aModNameBuf.append(sObjName);
|
||||||
@@ -224,7 +224,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
|
|||||||
|
|
||||||
ModulWindow* Shell::FindBasWin (
|
ModulWindow* Shell::FindBasWin (
|
||||||
ScriptDocument const& rDocument,
|
ScriptDocument const& rDocument,
|
||||||
rtl::OUString const& rLibName, rtl::OUString const& rName,
|
OUString const& rLibName, OUString const& rName,
|
||||||
bool bCreateIfNotExist, bool bFindSuspended
|
bool bCreateIfNotExist, bool bFindSuspended
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@@ -44,17 +44,17 @@ using namespace ::com::sun::star;
|
|||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace ::com::sun::star::io;
|
using namespace ::com::sun::star::io;
|
||||||
|
|
||||||
DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName )
|
DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName )
|
||||||
{
|
{
|
||||||
bCreatingWindow = true;
|
bCreatingWindow = true;
|
||||||
|
|
||||||
sal_uLong nKey = 0;
|
sal_uLong nKey = 0;
|
||||||
DialogWindow* pWin = 0;
|
DialogWindow* pWin = 0;
|
||||||
::rtl::OUString aLibName( rLibName );
|
OUString aLibName( rLibName );
|
||||||
::rtl::OUString aDlgName( rDlgName );
|
OUString aDlgName( rDlgName );
|
||||||
|
|
||||||
if ( aLibName.isEmpty() )
|
if ( aLibName.isEmpty() )
|
||||||
aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
|
aLibName = "Standard" ;
|
||||||
|
|
||||||
rDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
|
rDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl:
|
|||||||
// create dialog model
|
// create dialog model
|
||||||
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
|
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
|
||||||
Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
|
Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
|
||||||
( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
|
( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY );
|
||||||
Reference< XInputStream > xInput( xISP->createInputStream() );
|
Reference< XInputStream > xInput( xISP->createInputStream() );
|
||||||
Reference< XComponentContext > xContext(
|
Reference< XComponentContext > xContext(
|
||||||
comphelper::getComponentContext( xMSF ) );
|
comphelper::getComponentContext( xMSF ) );
|
||||||
@@ -120,7 +120,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl:
|
|||||||
|
|
||||||
DialogWindow* Shell::FindDlgWin (
|
DialogWindow* Shell::FindDlgWin (
|
||||||
ScriptDocument const& rDocument,
|
ScriptDocument const& rDocument,
|
||||||
rtl::OUString const& rLibName, rtl::OUString const& rName,
|
OUString const& rLibName, OUString const& rName,
|
||||||
bool bCreateIfNotExist, bool bFindSuspended
|
bool bCreateIfNotExist, bool bFindSuspended
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@@ -87,11 +87,11 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
|
|||||||
if ( aMacroName.Len() == 0 )
|
if ( aMacroName.Len() == 0 )
|
||||||
{
|
{
|
||||||
if ( !pModule->GetMethods()->Count() )
|
if ( !pModule->GetMethods()->Count() )
|
||||||
aMacroName = String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) );
|
aMacroName = String( "Main" );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool bValid = false;
|
bool bValid = false;
|
||||||
String aStdMacroText( RTL_CONSTASCII_USTRINGPARAM( "Macro" ) );
|
String aStdMacroText( "Macro" );
|
||||||
sal_uInt16 nMacro = 1;
|
sal_uInt16 nMacro = 1;
|
||||||
while ( !bValid )
|
while ( !bValid )
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,7 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::rtl::OUString aOUSource( pModule->GetSource32() );
|
OUString aOUSource( pModule->GetSource32() );
|
||||||
|
|
||||||
// don't produce too many empty lines...
|
// don't produce too many empty lines...
|
||||||
sal_Int32 nSourceLen = aOUSource.getLength();
|
sal_Int32 nSourceLen = aOUSource.getLength();
|
||||||
@@ -112,17 +112,17 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
|
|||||||
{
|
{
|
||||||
const sal_Unicode* pStr = aOUSource.getStr();
|
const sal_Unicode* pStr = aOUSource.getStr();
|
||||||
if ( pStr[ nSourceLen - 1 ] != LINE_SEP )
|
if ( pStr[ nSourceLen - 1 ] != LINE_SEP )
|
||||||
aOUSource += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n\n" ) );
|
aOUSource += "\n\n" ;
|
||||||
else if ( pStr[ nSourceLen - 2 ] != LINE_SEP )
|
else if ( pStr[ nSourceLen - 2 ] != LINE_SEP )
|
||||||
aOUSource += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ) );
|
aOUSource += "\n" ;
|
||||||
else if ( pStr[ nSourceLen - 3 ] == LINE_SEP )
|
else if ( pStr[ nSourceLen - 3 ] == LINE_SEP )
|
||||||
aOUSource = aOUSource.copy( 0, nSourceLen-1 );
|
aOUSource = aOUSource.copy( 0, nSourceLen-1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
::rtl::OUString aSubStr;
|
OUString aSubStr;
|
||||||
aSubStr = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Sub " ) );
|
aSubStr = "Sub " ;
|
||||||
aSubStr += aMacroName;
|
aSubStr += aMacroName;
|
||||||
aSubStr += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n\nEnd Sub" ) );
|
aSubStr += "\n\nEnd Sub" ;
|
||||||
|
|
||||||
aOUSource += aSubStr;
|
aOUSource += aSubStr;
|
||||||
|
|
||||||
@@ -165,9 +165,9 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
|
|||||||
bool RenameDialog (
|
bool RenameDialog (
|
||||||
Window* pErrorParent,
|
Window* pErrorParent,
|
||||||
ScriptDocument const& rDocument,
|
ScriptDocument const& rDocument,
|
||||||
rtl::OUString const& rLibName,
|
OUString const& rLibName,
|
||||||
rtl::OUString const& rOldName,
|
OUString const& rOldName,
|
||||||
rtl::OUString const& rNewName
|
OUString const& rNewName
|
||||||
)
|
)
|
||||||
throw(ElementExistException, NoSuchElementException)
|
throw(ElementExistException, NoSuchElementException)
|
||||||
{
|
{
|
||||||
@@ -228,7 +228,7 @@ bool RenameDialog (
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool RemoveDialog( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName )
|
bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName )
|
||||||
{
|
{
|
||||||
if (Shell* pShell = GetShell())
|
if (Shell* pShell = GetShell())
|
||||||
{
|
{
|
||||||
@@ -267,9 +267,9 @@ BasicManager* FindBasicManager( StarBASIC* pLib )
|
|||||||
if ( !pBasicMgr )
|
if ( !pBasicMgr )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
|
Sequence< OUString > aLibNames( doc->getLibraryNames() );
|
||||||
sal_Int32 nLibCount = aLibNames.getLength();
|
sal_Int32 nLibCount = aLibNames.getLength();
|
||||||
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
|
const OUString* pLibNames = aLibNames.getConstArray();
|
||||||
|
|
||||||
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
||||||
{
|
{
|
||||||
@@ -431,7 +431,7 @@ long HandleBasicError( StarBASIC* pBasic )
|
|||||||
OSL_ENSURE( aDocument.isValid(), "basctl::HandleBasicError: no document for the given BasicManager!" );
|
OSL_ENSURE( aDocument.isValid(), "basctl::HandleBasicError: no document for the given BasicManager!" );
|
||||||
if ( aDocument.isValid() )
|
if ( aDocument.isValid() )
|
||||||
{
|
{
|
||||||
::rtl::OUString aOULibName( pBasic->GetName() );
|
OUString aOULibName( pBasic->GetName() );
|
||||||
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
|
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
|
||||||
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
||||||
{
|
{
|
||||||
|
@@ -54,7 +54,7 @@ namespace basctl
|
|||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
|
|
||||||
void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName )
|
void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const OUString& rModName, OUString& rObjName )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -64,7 +64,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
|
|||||||
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
|
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
|
||||||
uno::Any aObject( aModuleInfo.ModuleObject );
|
uno::Any aObject( aModuleInfo.ModuleObject );
|
||||||
uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY );
|
uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY );
|
||||||
if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Worksheet" )) ) )
|
if( xServiceInfo.is() && xServiceInfo->supportsService( "ooo.vba.excel.Worksheet" ) )
|
||||||
{
|
{
|
||||||
uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY );
|
uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY );
|
||||||
if( xNamed.is() )
|
if( xNamed.is() )
|
||||||
@@ -77,7 +77,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName )
|
sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const OUString& rModName )
|
||||||
{
|
{
|
||||||
sal_Int32 nType = script::ModuleType::NORMAL;
|
sal_Int32 nType = script::ModuleType::NORMAL;
|
||||||
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
|
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
|
||||||
@@ -110,7 +110,7 @@ DocumentEntry::~DocumentEntry()
|
|||||||
LibEntry::LibEntry (
|
LibEntry::LibEntry (
|
||||||
ScriptDocument const& rDocument,
|
ScriptDocument const& rDocument,
|
||||||
LibraryLocation eLocation,
|
LibraryLocation eLocation,
|
||||||
rtl::OUString const& rLibName,
|
OUString const& rLibName,
|
||||||
EntryType eType
|
EntryType eType
|
||||||
) :
|
) :
|
||||||
DocumentEntry(rDocument, eLocation, eType),
|
DocumentEntry(rDocument, eLocation, eType),
|
||||||
@@ -129,9 +129,9 @@ EntryDescriptor::EntryDescriptor () :
|
|||||||
EntryDescriptor::EntryDescriptor (
|
EntryDescriptor::EntryDescriptor (
|
||||||
ScriptDocument const& rDocument,
|
ScriptDocument const& rDocument,
|
||||||
LibraryLocation eLocation,
|
LibraryLocation eLocation,
|
||||||
rtl::OUString const& rLibName,
|
OUString const& rLibName,
|
||||||
rtl::OUString const& rLibSubName,
|
OUString const& rLibSubName,
|
||||||
rtl::OUString const& rName,
|
OUString const& rName,
|
||||||
EntryType eType
|
EntryType eType
|
||||||
) :
|
) :
|
||||||
m_aDocument(rDocument),
|
m_aDocument(rDocument),
|
||||||
@@ -147,10 +147,10 @@ EntryDescriptor::EntryDescriptor (
|
|||||||
EntryDescriptor::EntryDescriptor (
|
EntryDescriptor::EntryDescriptor (
|
||||||
ScriptDocument const& rDocument,
|
ScriptDocument const& rDocument,
|
||||||
LibraryLocation eLocation,
|
LibraryLocation eLocation,
|
||||||
rtl::OUString const& rLibName,
|
OUString const& rLibName,
|
||||||
rtl::OUString const& rLibSubName,
|
OUString const& rLibSubName,
|
||||||
rtl::OUString const& rName,
|
OUString const& rName,
|
||||||
rtl::OUString const& rMethodName,
|
OUString const& rMethodName,
|
||||||
EntryType eType
|
EntryType eType
|
||||||
) :
|
) :
|
||||||
m_aDocument(rDocument),
|
m_aDocument(rDocument),
|
||||||
@@ -223,7 +223,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
|
|||||||
ImpCreateLibEntries( pDocumentRootEntry, rDocument, eLocation );
|
ImpCreateLibEntries( pDocumentRootEntry, rDocument, eLocation );
|
||||||
if ( !pDocumentRootEntry )
|
if ( !pDocumentRootEntry )
|
||||||
{
|
{
|
||||||
::rtl::OUString aRootName( GetRootEntryName( rDocument, eLocation ) );
|
OUString aRootName( GetRootEntryName( rDocument, eLocation ) );
|
||||||
Image aImage;
|
Image aImage;
|
||||||
GetRootEntryBitmaps( rDocument, aImage );
|
GetRootEntryBitmaps( rDocument, aImage );
|
||||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||||
@@ -242,19 +242,19 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
|
|||||||
void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation )
|
void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation )
|
||||||
{
|
{
|
||||||
// get a sorted list of library names
|
// get a sorted list of library names
|
||||||
Sequence< ::rtl::OUString > aLibNames( rDocument.getLibraryNames() );
|
Sequence< OUString > aLibNames( rDocument.getLibraryNames() );
|
||||||
sal_Int32 nLibCount = aLibNames.getLength();
|
sal_Int32 nLibCount = aLibNames.getLength();
|
||||||
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
|
const OUString* pLibNames = aLibNames.getConstArray();
|
||||||
|
|
||||||
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aLibName = pLibNames[ i ];
|
OUString aLibName = pLibNames[ i ];
|
||||||
|
|
||||||
if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
|
if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
|
||||||
{
|
{
|
||||||
// check, if the module library is loaded
|
// check, if the module library is loaded
|
||||||
bool bModLibLoaded = false;
|
bool bModLibLoaded = false;
|
||||||
::rtl::OUString aOULibName( aLibName );
|
OUString aOULibName( aLibName );
|
||||||
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
|
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
|
||||||
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
|
||||||
bModLibLoaded = true;
|
bModLibLoaded = true;
|
||||||
@@ -303,7 +303,7 @@ void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const Sc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
|
void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
|
||||||
{
|
{
|
||||||
// modules
|
// modules
|
||||||
if ( nMode & BROWSEMODE_MODULES )
|
if ( nMode & BROWSEMODE_MODULES )
|
||||||
@@ -319,13 +319,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// get a sorted list of module names
|
// get a sorted list of module names
|
||||||
Sequence< ::rtl::OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
|
Sequence< OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
|
||||||
sal_Int32 nModCount = aModNames.getLength();
|
sal_Int32 nModCount = aModNames.getLength();
|
||||||
const ::rtl::OUString* pModNames = aModNames.getConstArray();
|
const OUString* pModNames = aModNames.getConstArray();
|
||||||
|
|
||||||
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
|
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aModName = pModNames[ i ];
|
OUString aModName = pModNames[ i ];
|
||||||
SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE );
|
SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE );
|
||||||
if ( !pModuleEntry )
|
if ( !pModuleEntry )
|
||||||
pModuleEntry = AddEntry(
|
pModuleEntry = AddEntry(
|
||||||
@@ -338,13 +338,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
|
|||||||
// methods
|
// methods
|
||||||
if ( nMode & BROWSEMODE_SUBS )
|
if ( nMode & BROWSEMODE_SUBS )
|
||||||
{
|
{
|
||||||
Sequence< ::rtl::OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
|
Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
|
||||||
sal_Int32 nCount = aNames.getLength();
|
sal_Int32 nCount = aNames.getLength();
|
||||||
const ::rtl::OUString* pNames = aNames.getConstArray();
|
const OUString* pNames = aNames.getConstArray();
|
||||||
|
|
||||||
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
|
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aName = pNames[ j ];
|
OUString aName = pNames[ j ];
|
||||||
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
|
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
|
||||||
if ( !pEntry )
|
if ( !pEntry )
|
||||||
pEntry = AddEntry(
|
pEntry = AddEntry(
|
||||||
@@ -375,13 +375,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// get a sorted list of dialog names
|
// get a sorted list of dialog names
|
||||||
Sequence< ::rtl::OUString > aDlgNames( rDocument.getObjectNames( E_DIALOGS, rLibName ) );
|
Sequence< OUString > aDlgNames( rDocument.getObjectNames( E_DIALOGS, rLibName ) );
|
||||||
sal_Int32 nDlgCount = aDlgNames.getLength();
|
sal_Int32 nDlgCount = aDlgNames.getLength();
|
||||||
const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
|
const OUString* pDlgNames = aDlgNames.getConstArray();
|
||||||
|
|
||||||
for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
|
for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aDlgName = pDlgNames[ i ];
|
OUString aDlgName = pDlgNames[ i ];
|
||||||
SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
|
SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
|
||||||
if ( !pDialogEntry )
|
if ( !pDialogEntry )
|
||||||
pDialogEntry = AddEntry(
|
pDialogEntry = AddEntry(
|
||||||
@@ -400,20 +400,20 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
|
void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
|
||||||
{
|
{
|
||||||
|
|
||||||
std::vector<std::pair<EntryType, rtl::OUString> > aEntries;
|
std::vector<std::pair<EntryType, OUString> > aEntries;
|
||||||
aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) );
|
aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) );
|
||||||
aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, IDE_RESSTR(RID_STR_USERFORMS) ) );
|
aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, IDE_RESSTR(RID_STR_USERFORMS) ) );
|
||||||
aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, IDE_RESSTR(RID_STR_NORMAL_MODULES) ) );
|
aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, IDE_RESSTR(RID_STR_NORMAL_MODULES) ) );
|
||||||
aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, IDE_RESSTR(RID_STR_CLASS_MODULES) ) );
|
aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, IDE_RESSTR(RID_STR_CLASS_MODULES) ) );
|
||||||
|
|
||||||
std::vector<std::pair<EntryType, rtl::OUString> >::iterator iter;
|
std::vector<std::pair<EntryType, OUString> >::iterator iter;
|
||||||
for( iter = aEntries.begin(); iter != aEntries.end(); ++iter )
|
for( iter = aEntries.begin(); iter != aEntries.end(); ++iter )
|
||||||
{
|
{
|
||||||
EntryType eType = iter->first;
|
EntryType eType = iter->first;
|
||||||
rtl::OUString aEntryName = iter->second;
|
OUString aEntryName = iter->second;
|
||||||
SvLBoxEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
|
SvLBoxEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
|
||||||
if( pLibSubRootEntry )
|
if( pLibSubRootEntry )
|
||||||
{
|
{
|
||||||
@@ -433,7 +433,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
|
void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
|
||||||
{
|
{
|
||||||
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, rLibName );
|
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, rLibName );
|
||||||
if( !xLib.is() )
|
if( !xLib.is() )
|
||||||
@@ -442,16 +442,16 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// get a sorted list of module names
|
// get a sorted list of module names
|
||||||
Sequence< ::rtl::OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
|
Sequence< OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
|
||||||
sal_Int32 nModCount = aModNames.getLength();
|
sal_Int32 nModCount = aModNames.getLength();
|
||||||
const ::rtl::OUString* pModNames = aModNames.getConstArray();
|
const OUString* pModNames = aModNames.getConstArray();
|
||||||
|
|
||||||
EntryDescriptor aDesc( GetEntryDescriptor( pLibSubRootEntry ) );
|
EntryDescriptor aDesc( GetEntryDescriptor( pLibSubRootEntry ) );
|
||||||
EntryType eCurrentType( aDesc.GetType() );
|
EntryType eCurrentType( aDesc.GetType() );
|
||||||
|
|
||||||
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
|
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aModName = pModNames[ i ];
|
OUString aModName = pModNames[ i ];
|
||||||
EntryType eType = OBJ_TYPE_UNKNOWN;
|
EntryType eType = OBJ_TYPE_UNKNOWN;
|
||||||
switch( ModuleInfoHelper::getModuleType( xLib, aModName ) )
|
switch( ModuleInfoHelper::getModuleType( xLib, aModName ) )
|
||||||
{
|
{
|
||||||
@@ -473,19 +473,19 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
|
|||||||
|
|
||||||
// display a nice friendly name in the ObjectModule tab,
|
// display a nice friendly name in the ObjectModule tab,
|
||||||
// combining the objectname and module name, e.g. Sheet1 ( Financials )
|
// combining the objectname and module name, e.g. Sheet1 ( Financials )
|
||||||
::rtl::OUStringBuffer aEntryNameBuf( aModName );
|
OUStringBuffer aEntryNameBuf( aModName );
|
||||||
if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
|
if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
|
||||||
{
|
{
|
||||||
::rtl::OUString sObjName;
|
OUString sObjName;
|
||||||
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
|
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
|
||||||
if( !sObjName.isEmpty() )
|
if( !sObjName.isEmpty() )
|
||||||
{
|
{
|
||||||
aEntryNameBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
|
aEntryNameBuf.appendAscii( " (" );
|
||||||
aEntryNameBuf.append(sObjName);
|
aEntryNameBuf.append(sObjName);
|
||||||
aEntryNameBuf.append(')');
|
aEntryNameBuf.append(')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::rtl::OUString aEntryName(aEntryNameBuf.makeStringAndClear());
|
OUString aEntryName(aEntryNameBuf.makeStringAndClear());
|
||||||
SvLBoxEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
|
SvLBoxEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
|
||||||
if ( !pModuleEntry )
|
if ( !pModuleEntry )
|
||||||
pModuleEntry = AddEntry(
|
pModuleEntry = AddEntry(
|
||||||
@@ -498,13 +498,13 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
|
|||||||
// methods
|
// methods
|
||||||
if ( nMode & BROWSEMODE_SUBS )
|
if ( nMode & BROWSEMODE_SUBS )
|
||||||
{
|
{
|
||||||
Sequence< ::rtl::OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
|
Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
|
||||||
sal_Int32 nCount = aNames.getLength();
|
sal_Int32 nCount = aNames.getLength();
|
||||||
const ::rtl::OUString* pNames = aNames.getConstArray();
|
const OUString* pNames = aNames.getConstArray();
|
||||||
|
|
||||||
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
|
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aName = pNames[ j ];
|
OUString aName = pNames[ j ];
|
||||||
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
|
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
|
||||||
if ( !pEntry )
|
if ( !pEntry )
|
||||||
pEntry = AddEntry(
|
pEntry = AddEntry(
|
||||||
@@ -523,7 +523,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText )
|
SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText )
|
||||||
{
|
{
|
||||||
sal_uLong nRootPos = 0;
|
sal_uLong nRootPos = 0;
|
||||||
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
|
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
|
||||||
@@ -640,7 +640,7 @@ SvLBoxEntry* TreeListBox::CloneEntry( SvLBoxEntry* pSource )
|
|||||||
return pNew;
|
return pNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, EntryType eType )
|
SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType )
|
||||||
{
|
{
|
||||||
sal_uLong nRootPos = 0;
|
sal_uLong nRootPos = 0;
|
||||||
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
|
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
|
||||||
@@ -668,10 +668,10 @@ long TreeListBox::ExpandingHdl()
|
|||||||
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::ExpandingHdl: no document, or document is dead!" );
|
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::ExpandingHdl: no document, or document is dead!" );
|
||||||
if ( aDocument.isAlive() )
|
if ( aDocument.isAlive() )
|
||||||
{
|
{
|
||||||
::rtl::OUString aLibName( aDesc.GetLibName() );
|
OUString aLibName( aDesc.GetLibName() );
|
||||||
::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
|
OUString aLibSubName( aDesc.GetLibSubName() );
|
||||||
::rtl::OUString aName( aDesc.GetName() );
|
OUString aName( aDesc.GetName() );
|
||||||
::rtl::OUString aMethodName( aDesc.GetMethodName() );
|
OUString aMethodName( aDesc.GetMethodName() );
|
||||||
|
|
||||||
if ( !aLibName.isEmpty() && aLibSubName.isEmpty() && aName.isEmpty() && aMethodName.isEmpty() )
|
if ( !aLibName.isEmpty() && aLibSubName.isEmpty() && aName.isEmpty() && aMethodName.isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -682,7 +682,7 @@ long TreeListBox::ExpandingHdl()
|
|||||||
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
|
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
|
||||||
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
||||||
{
|
{
|
||||||
::rtl::OUString aPassword;
|
OUString aPassword;
|
||||||
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
|
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -702,7 +702,7 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
|
|||||||
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::IsEntryProtected: no document, or document is dead!" );
|
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::IsEntryProtected: no document, or document is dead!" );
|
||||||
if ( aDocument.isAlive() )
|
if ( aDocument.isAlive() )
|
||||||
{
|
{
|
||||||
::rtl::OUString aOULibName( aDesc.GetLibName() );
|
OUString aOULibName( aDesc.GetLibName() );
|
||||||
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
|
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
|
||||||
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
||||||
{
|
{
|
||||||
@@ -719,7 +719,7 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
|
|||||||
|
|
||||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||||
SvLBoxEntry* TreeListBox::AddEntry(
|
SvLBoxEntry* TreeListBox::AddEntry(
|
||||||
rtl::OUString const& rText,
|
OUString const& rText,
|
||||||
const Image& rImage,
|
const Image& rImage,
|
||||||
SvLBoxEntry* pParent,
|
SvLBoxEntry* pParent,
|
||||||
bool bChildrenOnDemand,
|
bool bChildrenOnDemand,
|
||||||
@@ -750,7 +750,7 @@ LibraryType TreeListBox::GetLibraryType() const
|
|||||||
return eType;
|
return eType;
|
||||||
}
|
}
|
||||||
|
|
||||||
::rtl::OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
|
OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
|
||||||
{
|
{
|
||||||
return rDocument.getTitle( eLocation, GetLibraryType() );
|
return rDocument.getTitle( eLocation, GetLibraryType() );
|
||||||
}
|
}
|
||||||
@@ -763,12 +763,12 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
|
|||||||
|
|
||||||
if ( rDocument.isDocument() )
|
if ( rDocument.isDocument() )
|
||||||
{
|
{
|
||||||
::rtl::OUString sFactoryURL;
|
OUString sFactoryURL;
|
||||||
Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
|
Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
|
||||||
Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xContext) );
|
Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xContext) );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
::rtl::OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
|
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
|
||||||
Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
|
Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
|
||||||
if ( xModuleConfig.is() )
|
if ( xModuleConfig.is() )
|
||||||
{
|
{
|
||||||
@@ -816,7 +816,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
|
|||||||
aDesc = EntryDescriptor(
|
aDesc = EntryDescriptor(
|
||||||
ScriptDocument::getApplicationScriptDocument(),
|
ScriptDocument::getApplicationScriptDocument(),
|
||||||
LIBRARY_LOCATION_USER, "Standard",
|
LIBRARY_LOCATION_USER, "Standard",
|
||||||
::rtl::OUString(), ".", OBJ_TYPE_UNKNOWN
|
OUString(), ".", OBJ_TYPE_UNKNOWN
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
ScriptDocument aDocument = aDesc.GetDocument();
|
ScriptDocument aDocument = aDesc.GetDocument();
|
||||||
@@ -826,7 +826,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
|
|||||||
if ( pRootEntry )
|
if ( pRootEntry )
|
||||||
{
|
{
|
||||||
pCurEntry = pRootEntry;
|
pCurEntry = pRootEntry;
|
||||||
::rtl::OUString aLibName( aDesc.GetLibName() );
|
OUString aLibName( aDesc.GetLibName() );
|
||||||
if ( !aLibName.isEmpty() )
|
if ( !aLibName.isEmpty() )
|
||||||
{
|
{
|
||||||
Expand( pRootEntry );
|
Expand( pRootEntry );
|
||||||
@@ -834,7 +834,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
|
|||||||
if ( pLibEntry )
|
if ( pLibEntry )
|
||||||
{
|
{
|
||||||
pCurEntry = pLibEntry;
|
pCurEntry = pLibEntry;
|
||||||
::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
|
OUString aLibSubName( aDesc.GetLibSubName() );
|
||||||
if( !aLibSubName.isEmpty() )
|
if( !aLibSubName.isEmpty() )
|
||||||
{
|
{
|
||||||
Expand( pLibEntry );
|
Expand( pLibEntry );
|
||||||
@@ -844,7 +844,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
|
|||||||
pCurEntry = pLibSubEntry;
|
pCurEntry = pLibSubEntry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::rtl::OUString aName( aDesc.GetName() );
|
OUString aName( aDesc.GetName() );
|
||||||
if ( !aName.isEmpty() )
|
if ( !aName.isEmpty() )
|
||||||
{
|
{
|
||||||
Expand( pCurEntry );
|
Expand( pCurEntry );
|
||||||
@@ -855,7 +855,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
|
|||||||
if ( pEntry )
|
if ( pEntry )
|
||||||
{
|
{
|
||||||
pCurEntry = pEntry;
|
pCurEntry = pEntry;
|
||||||
::rtl::OUString aMethodName( aDesc.GetMethodName() );
|
OUString aMethodName( aDesc.GetMethodName() );
|
||||||
if ( !aMethodName.isEmpty() )
|
if ( !aMethodName.isEmpty() )
|
||||||
{
|
{
|
||||||
Expand( pEntry );
|
Expand( pEntry );
|
||||||
|
@@ -50,7 +50,7 @@ class DialogWindow;
|
|||||||
#define LINE_SEP 0x0A
|
#define LINE_SEP 0x0A
|
||||||
|
|
||||||
// Implementation: baside2b.cxx
|
// Implementation: baside2b.cxx
|
||||||
sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex );
|
sal_Int32 searchEOL( const OUString& rStr, sal_Int32 fromIndex );
|
||||||
|
|
||||||
// Meaning of bToBeKilled:
|
// Meaning of bToBeKilled:
|
||||||
// While being in a reschedule-loop, I may not destroy the window.
|
// While being in a reschedule-loop, I may not destroy the window.
|
||||||
@@ -155,8 +155,8 @@ private:
|
|||||||
int nStatus;
|
int nStatus;
|
||||||
|
|
||||||
ScriptDocument m_aDocument;
|
ScriptDocument m_aDocument;
|
||||||
rtl::OUString m_aLibName;
|
OUString m_aLibName;
|
||||||
rtl::OUString m_aName;
|
OUString m_aName;
|
||||||
|
|
||||||
friend class ModulWindow;
|
friend class ModulWindow;
|
||||||
friend class DialogWindow;
|
friend class DialogWindow;
|
||||||
@@ -166,7 +166,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
TYPEINFO();
|
TYPEINFO();
|
||||||
BaseWindow( Window* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName );
|
BaseWindow( Window* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName );
|
||||||
virtual ~BaseWindow();
|
virtual ~BaseWindow();
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
@@ -192,8 +192,8 @@ public:
|
|||||||
// print page
|
// print page
|
||||||
virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0;
|
virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0;
|
||||||
|
|
||||||
virtual ::rtl::OUString GetTitle();
|
virtual OUString GetTitle();
|
||||||
::rtl::OUString CreateQualifiedName();
|
OUString CreateQualifiedName();
|
||||||
virtual EntryDescriptor CreateEntryDescriptor() = 0;
|
virtual EntryDescriptor CreateEntryDescriptor() = 0;
|
||||||
|
|
||||||
virtual bool IsModified();
|
virtual bool IsModified();
|
||||||
@@ -223,16 +223,16 @@ public:
|
|||||||
GetDocument() const { return m_aDocument; }
|
GetDocument() const { return m_aDocument; }
|
||||||
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
|
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
|
||||||
bool IsDocument( const ScriptDocument& rDocument ) const { return rDocument == m_aDocument; }
|
bool IsDocument( const ScriptDocument& rDocument ) const { return rDocument == m_aDocument; }
|
||||||
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
|
const OUString& GetLibName() const { return m_aLibName; }
|
||||||
void SetLibName( const ::rtl::OUString& aLibName ) { m_aLibName = aLibName; }
|
void SetLibName( const OUString& aLibName ) { m_aLibName = aLibName; }
|
||||||
const ::rtl::OUString& GetName() const { return m_aName; }
|
const OUString& GetName() const { return m_aName; }
|
||||||
void SetName( const ::rtl::OUString& aName ) { m_aName = aName; }
|
void SetName( const OUString& aName ) { m_aName = aName; }
|
||||||
|
|
||||||
virtual void OnNewDocument ();
|
virtual void OnNewDocument ();
|
||||||
virtual char const* GetHid () const = 0;
|
virtual char const* GetHid () const = 0;
|
||||||
virtual ItemType GetType () const = 0;
|
virtual ItemType GetType () const = 0;
|
||||||
void InsertLibInfo () const;
|
void InsertLibInfo () const;
|
||||||
bool Is (ScriptDocument const&, rtl::OUString const&, rtl::OUString const&, ItemType, bool bFindSuspended);
|
bool Is (ScriptDocument const&, OUString const&, OUString const&, ItemType, bool bFindSuspended);
|
||||||
virtual bool HasActiveEditor () const;
|
virtual bool HasActiveEditor () const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -244,19 +244,19 @@ public:
|
|||||||
LibInfos ();
|
LibInfos ();
|
||||||
~LibInfos ();
|
~LibInfos ();
|
||||||
public:
|
public:
|
||||||
void InsertInfo (ScriptDocument const&, rtl::OUString const& rLibName, rtl::OUString const& rCurrentName, ItemType eCurrentType);
|
void InsertInfo (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType);
|
||||||
void RemoveInfoFor (ScriptDocument const&);
|
void RemoveInfoFor (ScriptDocument const&);
|
||||||
Item const* GetInfo (ScriptDocument const&, rtl::OUString const& rLibName);
|
Item const* GetInfo (ScriptDocument const&, OUString const& rLibName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Key
|
class Key
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ScriptDocument m_aDocument;
|
ScriptDocument m_aDocument;
|
||||||
::rtl::OUString m_aLibName;
|
OUString m_aLibName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Key (ScriptDocument const&, rtl::OUString const& rLibName);
|
Key (ScriptDocument const&, OUString const& rLibName);
|
||||||
~Key ();
|
~Key ();
|
||||||
public:
|
public:
|
||||||
bool operator == (Key const&) const;
|
bool operator == (Key const&) const;
|
||||||
@@ -266,24 +266,24 @@ private:
|
|||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
const ScriptDocument& GetDocument() const { return m_aDocument; }
|
const ScriptDocument& GetDocument() const { return m_aDocument; }
|
||||||
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
|
const OUString& GetLibName() const { return m_aLibName; }
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
class Item
|
class Item
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ScriptDocument m_aDocument;
|
ScriptDocument m_aDocument;
|
||||||
::rtl::OUString m_aLibName;
|
OUString m_aLibName;
|
||||||
::rtl::OUString m_aCurrentName;
|
OUString m_aCurrentName;
|
||||||
ItemType m_eCurrentType;
|
ItemType m_eCurrentType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Item (ScriptDocument const&, rtl::OUString const& rLibName, rtl::OUString const& rCurrentName, ItemType eCurrentType);
|
Item (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType);
|
||||||
~Item ();
|
~Item ();
|
||||||
public:
|
public:
|
||||||
const ScriptDocument& GetDocument() const { return m_aDocument; }
|
const ScriptDocument& GetDocument() const { return m_aDocument; }
|
||||||
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
|
const OUString& GetLibName() const { return m_aLibName; }
|
||||||
const ::rtl::OUString& GetCurrentName() const { return m_aCurrentName; }
|
const OUString& GetCurrentName() const { return m_aCurrentName; }
|
||||||
ItemType GetCurrentType() const { return m_eCurrentType; }
|
ItemType GetCurrentType() const { return m_eCurrentType; }
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
@@ -291,16 +291,16 @@ private:
|
|||||||
Map m_aMap;
|
Map m_aMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines = false );
|
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines = false );
|
||||||
::rtl::OUString CreateMgrAndLibStr( const ::rtl::OUString& rMgrName, const ::rtl::OUString& rLibName );
|
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName );
|
||||||
sal_uLong CalcLineCount( SvStream& rStream );
|
sal_uLong CalcLineCount( SvStream& rStream );
|
||||||
|
|
||||||
bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent = 0 );
|
bool QueryReplaceMacro( const OUString& rName, Window* pParent = 0 );
|
||||||
bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent = 0 );
|
bool QueryDelMacro( const OUString& rName, Window* pParent = 0 );
|
||||||
bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent = 0 );
|
bool QueryDelDialog( const OUString& rName, Window* pParent = 0 );
|
||||||
bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent = 0 );
|
bool QueryDelModule( const OUString& rName, Window* pParent = 0 );
|
||||||
bool QueryDelLib( const ::rtl::OUString& rName, bool bRef = false, Window* pParent = 0 );
|
bool QueryDelLib( const OUString& rName, bool bRef = false, Window* pParent = 0 );
|
||||||
bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat = false, bool bNewTitle = false );
|
bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false );
|
||||||
|
|
||||||
class ModuleInfoHelper
|
class ModuleInfoHelper
|
||||||
{
|
{
|
||||||
@@ -309,8 +309,8 @@ class ModuleInfoHelper
|
|||||||
ModuleInfoHelper (const ModuleInfoHelper&);
|
ModuleInfoHelper (const ModuleInfoHelper&);
|
||||||
ModuleInfoHelper& operator = (const ModuleInfoHelper&);
|
ModuleInfoHelper& operator = (const ModuleInfoHelper&);
|
||||||
public:
|
public:
|
||||||
static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName );
|
static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const OUString& rModName, OUString& rObjName );
|
||||||
static sal_Int32 getModuleType( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName );
|
static sal_Int32 getModuleType( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const OUString& rModName );
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace basctl
|
} // namespace basctl
|
||||||
|
Reference in New Issue
Block a user