summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
committerAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
commit06ec1c089519ef3249464aa09eadf03a8db93a39 (patch)
tree85b2eb6d8ba6ca95e18e1ff82151224cb14106f6 /basctl
parent8e0d67bed54633d555a4601a5d79e2d5ba7ab2bb (diff)
parent3f899eae02eaad0b967de749fe09b869ba93ad6d (diff)
Merge branch 'master' into feature/killsdf
Conflicts: Repository.mk RepositoryFixes.mk connectivity/prj/build.lst extensions/prj/build.lst filter/prj/build.lst fpicker/prj/build.lst l10ntools/StaticLibrary_transex.mk saxon/build.xml shell/prj/build.lst solenv/gbuild/AllLangResTarget.mk solenv/gbuild/Configuration.mk solenv/gbuild/UI.mk ucb/source/ucp/webdav/webdavcontent.cxx
Diffstat (limited to 'basctl')
-rw-r--r--basctl/Module_basctl.mk1
-rw-r--r--basctl/UI_basicide.mk16
-rw-r--r--basctl/inc/basidesh.hrc4
-rw-r--r--basctl/source/basicide/baside2.cxx9
-rw-r--r--basctl/source/basicide/baside2.hxx10
-rw-r--r--basctl/source/basicide/baside2b.cxx81
-rw-r--r--basctl/source/basicide/basides2.cxx2
-rw-r--r--basctl/source/basicide/basidesh.cxx10
-rw-r--r--basctl/source/basicide/basobj3.cxx2
-rw-r--r--basctl/source/basicide/bastype2.cxx96
-rw-r--r--basctl/source/basicide/bastype2.hxx43
-rw-r--r--basctl/source/basicide/bastype3.cxx24
-rw-r--r--basctl/source/basicide/macrodlg.cxx365
-rw-r--r--basctl/source/basicide/macrodlg.hrc21
-rw-r--r--basctl/source/basicide/macrodlg.hxx36
-rw-r--r--basctl/source/basicide/macrodlg.src155
-rw-r--r--basctl/source/basicide/moduldl2.cxx107
-rw-r--r--basctl/source/basicide/moduldlg.cxx118
-rw-r--r--basctl/source/basicide/moduldlg.hxx38
-rw-r--r--basctl/source/basicide/register.cxx1
-rw-r--r--basctl/source/basicide/sbxitem.cxx10
-rw-r--r--basctl/source/basicide/scriptdocument.cxx189
-rw-r--r--basctl/source/basicide/tbxctl.cxx6
-rw-r--r--basctl/source/basicide/unomodel.cxx1
-rw-r--r--basctl/source/dlged/dlged.cxx52
-rw-r--r--basctl/source/dlged/dlgedclip.cxx6
-rw-r--r--basctl/source/dlged/dlgedfac.cxx62
-rw-r--r--basctl/source/dlged/dlgedobj.cxx53
-rw-r--r--basctl/source/dlged/managelang.cxx16
-rw-r--r--basctl/source/dlged/propbrw.cxx61
-rw-r--r--basctl/source/inc/basobj.hxx40
-rw-r--r--basctl/source/inc/dlgeddef.hxx30
-rw-r--r--basctl/source/inc/localizationmgr.hxx22
-rw-r--r--basctl/source/inc/managelang.hxx10
-rw-r--r--basctl/source/inc/propbrw.hxx2
-rw-r--r--basctl/source/inc/sbxitem.hxx16
-rw-r--r--basctl/source/inc/scriptdocument.hxx66
-rw-r--r--basctl/uiconfig/basicide/menubar/menubar.xml3
-rw-r--r--basctl/uiconfig/basicide/ui/basicmacrodialog.ui384
39 files changed, 1207 insertions, 961 deletions
diff --git a/basctl/Module_basctl.mk b/basctl/Module_basctl.mk
index 11cabbbbbde5..3542e2b461aa 100644
--- a/basctl/Module_basctl.mk
+++ b/basctl/Module_basctl.mk
@@ -39,6 +39,7 @@ endif
$(eval $(call gb_Module_add_targets,basctl,\
Package_uiconfig \
+ UI_basicide \
))
# vim: set noet sw=4 ts=4:
diff --git a/basctl/UI_basicide.mk b/basctl/UI_basicide.mk
new file mode 100644
index 000000000000..a808d92155d8
--- /dev/null
+++ b/basctl/UI_basicide.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,modules/BasicIDE))
+
+$(eval $(call gb_UI_add_uifiles,modules/BasicIDE,\
+ basctl/uiconfig/basicide/ui/basicmacrodialog \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index b8fa629b896a..5c551b311083 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -69,10 +69,10 @@
#define RID_STR_RUNTIMEERROR ( RID_BASICIDE_START + 22 )
#define RID_STR_COMPILEERROR ( RID_BASICIDE_START + 23 )
#define RID_STR_STDDIALOGNAME ( RID_BASICIDE_START + 24 )
-#define RID_STR_STDMACRONAME ( RID_BASICIDE_START + 25 )
+
#define RID_STR_STDMODULENAME ( RID_BASICIDE_START + 27 )
#define RID_STR_ALL ( RID_BASICIDE_START + 28 )
-#define RID_STR_CLOSE ( RID_BASICIDE_START + 29 )
+
#define RID_STR_PAGE ( RID_BASICIDE_START + 30 )
#define RID_STR_BADSBXNAME ( RID_BASICIDE_START + 31 )
#define RID_STR_STDLIBNAME ( RID_BASICIDE_START + 32 )
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 657182d10420..fa9d50ea7de4 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <sfx2/dinfdlg.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
@@ -164,13 +165,13 @@ void lcl_ConvertTabsToSpaces( String& rLine )
if ( rLine.GetChar( nPos ) == '\t' )
{
// not 4 Blanks, but at 4 TabPos:
- String aBlanker;
- aBlanker.Fill( ( 4 - ( nPos % 4 ) ), ' ' );
+ rtl::OUStringBuffer aBlanker;
+ string::padToLength(aBlanker, ( 4 - ( nPos % 4 ) ), ' ');
rLine.Erase( nPos, 1 );
- rLine.Insert( aBlanker, nPos );
+ rLine.Insert( aBlanker.makeStringAndClear(), nPos );
nMax = rLine.Len();
}
- nPos++;
+ ++nPos;
}
}
}
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 8ca38127b4df..1619261e7d78 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -191,17 +191,17 @@ class WatchTreeListBox : public SvHeaderTabListBox
String aEditingRes;
protected:
- virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewText );
+ virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& rSel );
+ virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
- bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult );
- SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement );
+ bool ImplBasicEntryEdited( SvTreeListEntry* pEntry, const String& rResult );
+ SbxBase* ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rbArrayElement );
public:
WatchTreeListBox( Window* pParent, WinBits nWinBits );
~WatchTreeListBox();
- void RequestingChildren( SvLBoxEntry * pParent );
+ void RequestingChildren( SvTreeListEntry * pParent );
void UpdateWatches( bool bBasicStopped = false );
using SvTabListBox::SetTabs;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 914a916fcb0e..1ef15c52e05d 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -106,7 +106,7 @@ OUString getTextEngineText (ExtTextEngine& rEngine)
void setTextEngineText (ExtTextEngine& rEngine, OUString const& aStr)
{
rEngine.SetText(String());
- OString aUTF8Str = ::rtl::OUStringToOString( aStr, RTL_TEXTENCODING_UTF8 );
+ OString aUTF8Str = OUStringToOString( aStr, RTL_TEXTENCODING_UTF8 );
SvMemoryStream aMemStream( (void*)aUTF8Str.getStr(), aUTF8Str.getLength(),
STREAM_READ | STREAM_SEEK_TO_BEGIN );
aMemStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 );
@@ -278,7 +278,7 @@ String EditorWindow::GetWordAtCursor()
const TextPaM& rSelStart = rSelection.GetStart();
const TextPaM& rSelEnd = rSelection.GetEnd();
String aText = pTextEngine->GetText( rSelEnd.GetPara() );
- CharClass aClass( ::comphelper::getProcessServiceFactory() , Application::GetSettings().GetLocale() );
+ CharClass aClass( ::comphelper::getProcessComponentContext() , Application::GetSettings().GetLocale() );
xub_StrLen nSelStart = static_cast< xub_StrLen >( rSelStart.GetIndex() );
xub_StrLen nSelEnd = static_cast< xub_StrLen >( rSelEnd.GetIndex() );
xub_StrLen nLength = static_cast< xub_StrLen >( aText.Len() );
@@ -358,7 +358,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
if ( !aHelpText.Len() ) // name is not copied with the passed parameters
aHelpText = aWord;
aHelpText += '=';
- aHelpText += pVar->GetString();
+ aHelpText += pVar->GetOUString();
}
}
if ( aHelpText.Len() )
@@ -1363,7 +1363,7 @@ void WatchWindow::AddWatch( const String& rVName )
OUString aWatchStr_( aVar );
aWatchStr_ += OUString( "\t\t" );
- SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, true, LIST_APPEND );
+ SvTreeListEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, true, LIST_APPEND );
pNewEntry->SetUserData( pWatchItem );
aTreeListBox.Select(pNewEntry, true);
@@ -1375,7 +1375,7 @@ void WatchWindow::AddWatch( const String& rVName )
bool WatchWindow::RemoveSelectedWatch()
{
- SvLBoxEntry* pEntry = aTreeListBox.GetCurEntry();
+ SvTreeListEntry* pEntry = aTreeListBox.GetCurEntry();
if ( pEntry )
{
aTreeListBox.GetModel()->Remove( pEntry );
@@ -1406,7 +1406,7 @@ IMPL_LINK_INLINE_END( WatchWindow, ButtonHdl, ImageButton *, pButton )
IMPL_LINK_NOARG_INLINE_START(WatchWindow, TreeListHdl)
{
- SvLBoxEntry* pCurEntry = aTreeListBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aTreeListBox.GetCurEntry();
if ( pCurEntry && pCurEntry->GetUserData() )
aXEdit.SetText( ((WatchItem*)pCurEntry->GetUserData())->maName );
@@ -1567,22 +1567,32 @@ void StackWindow::UpdateCalls()
{
SbxVariable* pVar = pParams->Get( nParam );
DBG_ASSERT( pVar, "Parameter?!" );
- if ( pVar->GetName().Len() )
+ if ( !pVar->GetName().isEmpty() )
+ {
aEntry += pVar->GetName();
+ }
else if ( pInfo )
{
const SbxParamInfo* pParam = pInfo->GetParam( nParam );
if ( pParam )
+ {
aEntry += pParam->aName;
+ }
}
aEntry += '=';
SbxDataType eType = pVar->GetType();
if( eType & SbxARRAY )
+ {
aEntry += OUString( "..." );
+ }
else if( eType != SbxOBJECT )
- aEntry += pVar->GetString();
+ {
+ aEntry += pVar->GetOUString();
+ }
if ( nParam < ( pParams->Count() - 1 ) )
+ {
aEntry += OUString( ", " );
+ }
}
aEntry += ')';
}
@@ -1724,7 +1734,7 @@ WatchTreeListBox::WatchTreeListBox( Window* pParent, WinBits nWinBits )
WatchTreeListBox::~WatchTreeListBox()
{
// Destroy user data
- SvLBoxEntry* pEntry = First();
+ SvTreeListEntry* pEntry = First();
while ( pEntry )
{
delete (WatchItem*)pEntry->GetUserData();
@@ -1746,7 +1756,7 @@ void WatchTreeListBox::SetTabs()
}
}
-void WatchTreeListBox::RequestingChildren( SvLBoxEntry * pParent )
+void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent )
{
if( !StarBASIC::IsRunning() )
return;
@@ -1754,7 +1764,7 @@ void WatchTreeListBox::RequestingChildren( SvLBoxEntry * pParent )
if( GetChildCount( pParent ) > 0 )
return;
- SvLBoxEntry* pEntry = pParent;
+ SvTreeListEntry* pEntry = pParent;
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
SbxDimArray* pArray = pItem->mpArray;
@@ -1780,7 +1790,7 @@ void WatchTreeListBox::RequestingChildren( SvLBoxEntry * pParent )
pItem->maMemberList.push_back(String(pVar->GetName()));
String const& rName = pItem->maMemberList.back();
- SvLBoxEntry* pChildEntry = SvTreeListBox::InsertEntry( rName, pEntry );
+ SvTreeListEntry* pChildEntry = SvTreeListBox::InsertEntry( rName, pEntry );
pChildEntry->SetUserData(new WatchItem(rName));
}
if( nPropCount > 0 )
@@ -1828,7 +1838,7 @@ void WatchTreeListBox::RequestingChildren( SvLBoxEntry * pParent )
aDisplayName += aIndexStr;
pChildItem->maDisplayName = aDisplayName;
- SvLBoxEntry* pChildEntry = SvTreeListBox::InsertEntry( aDisplayName, pEntry );
+ SvTreeListEntry* pChildEntry = SvTreeListBox::InsertEntry( aDisplayName, pEntry );
nElementCount++;
pChildEntry->SetUserData( pChildItem );
}
@@ -1839,7 +1849,7 @@ void WatchTreeListBox::RequestingChildren( SvLBoxEntry * pParent )
}
}
-SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement )
+SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rbArrayElement )
{
SbxBase* pSBX = NULL;
rbArrayElement = false;
@@ -1847,7 +1857,7 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArra
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
String aVName( pItem->maName );
- SvLBoxEntry* pParentEntry = GetParent( pEntry );
+ SvTreeListEntry* pParentEntry = GetParent( pEntry );
WatchItem* pParentItem = pParentEntry ? (WatchItem*)pParentEntry->GetUserData() : NULL;
if( pParentItem )
{
@@ -1879,7 +1889,7 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArra
return pSBX;
}
-sal_Bool WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool WatchTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
@@ -1904,7 +1914,7 @@ sal_Bool WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
return bEdit;
}
-sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewText )
+sal_Bool WatchTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
String aVName( pItem->maName );
@@ -1920,7 +1930,7 @@ sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const OUString& rNe
return aResult != aEditingRes && ImplBasicEntryEdited(pEntry, aResult);
}
-bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult )
+bool WatchTreeListBox::ImplBasicEntryEdited( SvTreeListEntry* pEntry, const String& rResult )
{
bool bArrayElement;
SbxBase* pSBX = ImplGetSBXForEntry( pEntry, bArrayElement );
@@ -1953,12 +1963,12 @@ bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String&
namespace
{
-void implCollapseModifiedObjectEntry( SvLBoxEntry* pParent, WatchTreeListBox* pThis )
+void implCollapseModifiedObjectEntry( SvTreeListEntry* pParent, WatchTreeListBox* pThis )
{
pThis->Collapse( pParent );
- SvLBoxTreeList* pModel = pThis->GetModel();
- SvLBoxEntry* pDeleteEntry;
+ SvTreeList* pModel = pThis->GetModel();
+ SvTreeListEntry* pDeleteEntry;
while( (pDeleteEntry = pThis->SvTreeListBox::GetEntry( pParent, 0 )) != NULL )
{
implCollapseModifiedObjectEntry( pDeleteEntry, pThis );
@@ -1998,7 +2008,7 @@ String implCreateTypeStringForDimArray( WatchItem* pItem, SbxDataType eType )
return aRetStr;
}
-void implEnableChildren( SvLBoxEntry* pEntry, bool bEnable )
+void implEnableChildren( SvTreeListEntry* pEntry, bool bEnable )
{
if( bEnable )
{
@@ -2023,7 +2033,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
SbxError eOld = SbxBase::GetError();
setBasicWatchMode( true );
- SvLBoxEntry* pEntry = First();
+ SvTreeListEntry* pEntry = First();
while ( pEntry )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
@@ -2086,11 +2096,13 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
}
}
else if( pNewArray == NULL || pOldArray == NULL )
+ {
bArrayChanged = true;
-
+ }
if( pNewArray )
+ {
implEnableChildren( pEntry, true );
-
+ }
// #i37227 Clear always and replace array
if( pNewArray != pOldArray )
{
@@ -2106,12 +2118,15 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
}
}
if( bArrayChanged && pOldArray != NULL )
+ {
bCollapse = true;
-
+ }
aTypeStr = implCreateTypeStringForDimArray( pItem, eType );
}
else
+ {
aWatchStr += OUString( "<?>" );
+ }
}
else if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT )
{
@@ -2134,7 +2149,9 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
}
}
if( bObjChanged )
+ {
bCollapse = true;
+ }
}
pItem->mpObject = pObj;
@@ -2166,23 +2183,33 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
bool bString = ((sal_uInt8)eType == (sal_uInt8)SbxSTRING);
OUString aStrStr( "\"" );
if( bString )
+ {
aWatchStr += aStrStr;
- aWatchStr += pVar->GetString();
+ }
+ aWatchStr += pVar->GetOUString();
if( bString )
+ {
aWatchStr += aStrStr;
+ }
}
if( !aTypeStr.Len() )
{
if( !pVar->IsFixed() )
+ {
aTypeStr = OUString( "Variant/" );
+ }
aTypeStr += getBasicTypeName( pVar->GetType() );
}
}
else if( !bArrayElement )
+ {
aWatchStr += OUString( "<Out of Scope>" );
+ }
if( bCollapse )
+ {
implCollapseModifiedObjectEntry( pEntry, this );
+ }
}
else if( bBasicStopped )
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 410d3a78652c..fe91e703f1ba 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -108,7 +108,7 @@ sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bo
void Shell::SetMDITitle()
{
- ::rtl::OUStringBuffer aTitleBuf;
+ OUStringBuffer aTitleBuf;
if ( !m_aCurLibName.isEmpty() )
{
LibraryLocation eLocation = m_aCurDocument.getLibraryLocation( m_aCurLibName );
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 4639b4eaf734..ed86cca52bce 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -790,7 +790,9 @@ void Shell::UpdateWindows()
if ( bChangeCurWindow )
{
if ( !pNextActiveWindow )
+ {
pNextActiveWindow = FindApplicationWindow();
+ }
SetCurWindow( pNextActiveWindow, true );
}
}
@@ -804,9 +806,13 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange
if ( pWindow_ == pCurWin )
{
if ( bAllowChangeCurWindow )
+ {
SetCurWindow( FindApplicationWindow(), true );
+ }
else
+ {
SetCurWindow( NULL, false );
+ }
}
if ( bDestroy )
{
@@ -825,8 +831,10 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange
if ( pWindow_->GetDocument().isInVBAMode() )
{
SbModule* pMod = StarBASIC::GetActiveModule();
- if ( !pMod || ( pMod && ( !pMod->GetName().Equals(pWindow_->GetName()) ) ) )
+ if ( !pMod || ( pMod && ( !pMod->GetName().equals(pWindow_->GetName()) ) ) )
+ {
bStop = false;
+ }
}
if ( bStop )
{
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 7850b9597a68..f0aa0bac3b6b 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -84,7 +84,7 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
return 0;
OUString aMacroName( rMacroName );
- if ( aMacroName.getLength() == 0 )
+ if ( aMacroName.isEmpty() )
{
if ( !pModule->GetMethods()->Count() )
aMacroName = "Main" ;
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 8ef1a92fe785..285aefccdbc1 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -20,7 +20,8 @@
#include <memory>
-#include "vcl/bitmap.hxx"
+#include <vcl/bitmap.hxx>
+#include <vcl/builder.hxx>
#include "basidesh.hxx"
#include "iderdll.hxx"
@@ -184,21 +185,38 @@ bool EntryDescriptor::operator == (EntryDescriptor const& rDesc) const
// ===========
//
-TreeListBox::TreeListBox (Window* pParent, ResId const& rRes) :
- SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) ),
- m_aNotifier( *this )
+TreeListBox::TreeListBox (Window* pParent, ResId const& rRes)
+ : SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) )
+ , m_aNotifier( *this )
+{
+ Init();
+}
+
+TreeListBox::TreeListBox (Window* pParent)
+ : SvTreeListBox(pParent)
+ , m_aNotifier( *this )
+{
+ Init();
+}
+
+void TreeListBox::Init()
{
SetNodeDefaultImages();
SetSelectionMode( SINGLE_SELECTION );
nMode = 0xFF; // everything
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTreeListBox(Window *pParent, VclBuilder::stringmap &)
+{
+ return new TreeListBox(pParent);
+}
+
TreeListBox::~TreeListBox ()
{
m_aNotifier.dispose();
// destroy user data
- SvLBoxEntry* pEntry = First();
+ SvTreeListEntry* pEntry = First();
while ( pEntry )
{
delete static_cast<Entry*>(pEntry->GetUserData());
@@ -218,7 +236,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
SetUpdateMode(false);
// level 1: BasicManager (application, document, ...)
- SvLBoxEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation );
+ SvTreeListEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation );
if ( pDocumentRootEntry && IsExpanded( pDocumentRootEntry ) )
ImpCreateLibEntries( pDocumentRootEntry, rDocument, eLocation );
if ( !pDocumentRootEntry )
@@ -239,7 +257,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
SetUpdateMode(true);
}
-void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation )
+void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation )
{
// get a sorted list of library names
Sequence< OUString > aLibNames( rDocument.getLibraryNames() );
@@ -283,7 +301,7 @@ void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const Sc
nId = bLoaded ? RID_IMG_DLGLIB : RID_IMG_DLGLIBNOTLOADED;
else
nId = bLoaded ? RID_IMG_MODLIB : RID_IMG_MODLIBNOTLOADED;
- SvLBoxEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY );
+ SvTreeListEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY );
if ( pLibRootEntry )
{
SetEntryBitmaps( pLibRootEntry, Image( IDEResId( nId ) ) );
@@ -303,7 +321,7 @@ void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const Sc
}
}
-void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
+void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
{
// modules
if ( nMode & BROWSEMODE_MODULES )
@@ -326,7 +344,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
{
OUString aModName = pModNames[ i ];
- SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE );
+ SvTreeListEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
pModuleEntry = AddEntry(
aModName,
@@ -345,7 +363,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
{
OUString aName = pNames[ j ];
- SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
+ SvTreeListEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
if ( !pEntry )
pEntry = AddEntry(
aName,
@@ -382,7 +400,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
{
OUString aDlgName = pDlgNames[ i ];
- SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
+ SvTreeListEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
if ( !pDialogEntry )
pDialogEntry = AddEntry(
aDlgName,
@@ -400,7 +418,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
}
}
-void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
+void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
{
std::vector<std::pair<EntryType, OUString> > aEntries;
@@ -414,7 +432,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, c
{
EntryType eType = iter->first;
OUString aEntryName = iter->second;
- SvLBoxEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
+ SvTreeListEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
if( pLibSubRootEntry )
{
SetEntryBitmaps( pLibSubRootEntry, Image( IDEResId( RID_IMG_MODLIB ) ) );
@@ -433,7 +451,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, c
}
}
-void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
+void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
{
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, rLibName );
if( !xLib.is() )
@@ -486,7 +504,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
}
}
OUString aEntryName(aEntryNameBuf.makeStringAndClear());
- SvLBoxEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
+ SvTreeListEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
pModuleEntry = AddEntry(
aEntryName,
@@ -505,7 +523,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
{
OUString aName = pNames[ j ];
- SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
+ SvTreeListEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
if ( !pEntry )
pEntry = AddEntry(
aName,
@@ -523,10 +541,10 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
}
}
-SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText )
+SvTreeListEntry* TreeListBox::ImpFindEntry( SvTreeListEntry* pParent, const OUString& rText )
{
sal_uLong nRootPos = 0;
- SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
+ SvTreeListEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
while ( pEntry )
{
if ( rText.equals(GetEntryText( pEntry )) )
@@ -590,8 +608,8 @@ void TreeListBox::UpdateEntries()
EntryDescriptor aCurDesc( GetEntryDescriptor( FirstSelected() ) );
// removing the invalid entries
- SvLBoxEntry* pLastValid = 0;
- SvLBoxEntry* pEntry = First();
+ SvTreeListEntry* pLastValid = 0;
+ SvTreeListEntry* pEntry = First();
while ( pEntry )
{
if ( IsValidEntry( pEntry ) )
@@ -607,7 +625,7 @@ void TreeListBox::UpdateEntries()
}
// Removes the entry from the tree.
-void TreeListBox::RemoveEntry (SvLBoxEntry* pEntry)
+void TreeListBox::RemoveEntry (SvTreeListEntry* pEntry)
{
// removing the associated user data
delete static_cast<Entry*>(pEntry->GetUserData());
@@ -619,7 +637,7 @@ void TreeListBox::RemoveEntry (SvLBoxEntry* pEntry)
void TreeListBox::RemoveEntry (ScriptDocument const& rDocument)
{
// finding the entry of rDocument
- for (SvLBoxEntry* pEntry = First(); pEntry; pEntry = Next(pEntry))
+ for (SvTreeListEntry* pEntry = First(); pEntry; pEntry = Next(pEntry))
if (rDocument == GetEntryDescriptor(pEntry).GetDocument())
{
RemoveEntry(pEntry);
@@ -627,9 +645,9 @@ void TreeListBox::RemoveEntry (ScriptDocument const& rDocument)
}
}
-SvLBoxEntry* TreeListBox::CloneEntry( SvLBoxEntry* pSource )
+SvTreeListEntry* TreeListBox::CloneEntry( SvTreeListEntry* pSource )
{
- SvLBoxEntry* pNew = SvTreeListBox::CloneEntry( pSource );
+ SvTreeListEntry* pNew = SvTreeListBox::CloneEntry( pSource );
Entry* pUser = static_cast<Entry*>(pSource->GetUserData());
DBG_ASSERT( pUser, "User-Daten?!" );
@@ -640,10 +658,10 @@ SvLBoxEntry* TreeListBox::CloneEntry( SvLBoxEntry* pSource )
return pNew;
}
-SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType )
+SvTreeListEntry* TreeListBox::FindEntry( SvTreeListEntry* pParent, const OUString& rText, EntryType eType )
{
sal_uLong nRootPos = 0;
- SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
+ SvTreeListEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
while ( pEntry )
{
Entry* pBasicEntry = static_cast<Entry*>(pEntry->GetUserData());
@@ -662,7 +680,7 @@ long TreeListBox::ExpandingHdl()
bool bOK = true;
if ( GetModel()->GetDepth( GetHdlEntry() ) == 1 )
{
- SvLBoxEntry* pCurEntry = GetCurEntry();
+ SvTreeListEntry* pCurEntry = GetCurEntry();
EntryDescriptor aDesc( GetEntryDescriptor( pCurEntry ) );
ScriptDocument aDocument( aDesc.GetDocument() );
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::ExpandingHdl: no document, or document is dead!" );
@@ -692,7 +710,7 @@ long TreeListBox::ExpandingHdl()
return bOK;
}
-bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
+bool TreeListBox::IsEntryProtected( SvTreeListEntry* pEntry )
{
bool bProtected = false;
if ( pEntry && ( GetModel()->GetDepth( pEntry ) == 1 ) )
@@ -718,15 +736,15 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
-SvLBoxEntry* TreeListBox::AddEntry(
+SvTreeListEntry* TreeListBox::AddEntry(
OUString const& rText,
const Image& rImage,
- SvLBoxEntry* pParent,
+ SvTreeListEntry* pParent,
bool bChildrenOnDemand,
std::auto_ptr<Entry> aUserData
)
{
- SvLBoxEntry* p = InsertEntry(
+ SvTreeListEntry* p = InsertEntry(
rText, rImage, rImage, pParent, bChildrenOnDemand, LIST_APPEND,
aUserData.release() // XXX possible leak
);
@@ -734,7 +752,7 @@ SvLBoxEntry* TreeListBox::AddEntry(
}
SAL_WNODEPRECATED_DECLARATIONS_POP
-void TreeListBox::SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage )
+void TreeListBox::SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage )
{
SetExpandedEntryBmp( pEntry, rImage );
SetCollapsedEntryBmp( pEntry, rImage );
@@ -809,7 +827,7 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
{
- SvLBoxEntry* pCurEntry = 0;
+ SvTreeListEntry* pCurEntry = 0;
EntryDescriptor aDesc = rDesc;
if ( aDesc.GetType() == OBJ_TYPE_UNKNOWN )
{
@@ -822,7 +840,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
ScriptDocument aDocument = aDesc.GetDocument();
OSL_ENSURE( aDocument.isValid(), "TreeListBox::SetCurrentEntry: invalid document!" );
LibraryLocation eLocation = aDesc.GetLocation();
- SvLBoxEntry* pRootEntry = FindRootEntry( aDocument, eLocation );
+ SvTreeListEntry* pRootEntry = FindRootEntry( aDocument, eLocation );
if ( pRootEntry )
{
pCurEntry = pRootEntry;
@@ -830,7 +848,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
if ( !aLibName.isEmpty() )
{
Expand( pRootEntry );
- SvLBoxEntry* pLibEntry = FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
+ SvTreeListEntry* pLibEntry = FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
if ( pLibEntry )
{
pCurEntry = pLibEntry;
@@ -838,7 +856,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
if( !aLibSubName.isEmpty() )
{
Expand( pLibEntry );
- SvLBoxEntry* pLibSubEntry = ImpFindEntry( pLibEntry, aLibSubName );
+ SvTreeListEntry* pLibSubEntry = ImpFindEntry( pLibEntry, aLibSubName );
if( pLibSubEntry )
{
pCurEntry = pLibSubEntry;
@@ -851,7 +869,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
EntryType eType = OBJ_TYPE_MODULE;
if ( aDesc.GetType() == OBJ_TYPE_DIALOG )
eType = OBJ_TYPE_DIALOG;
- SvLBoxEntry* pEntry = FindEntry( pCurEntry, aName, eType );
+ SvTreeListEntry* pEntry = FindEntry( pCurEntry, aName, eType );
if ( pEntry )
{
pCurEntry = pEntry;
@@ -859,7 +877,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
if ( !aMethodName.isEmpty() )
{
Expand( pEntry );
- SvLBoxEntry* pSubEntry = FindEntry( pEntry, aMethodName, OBJ_TYPE_METHOD );
+ SvTreeListEntry* pSubEntry = FindEntry( pEntry, aMethodName, OBJ_TYPE_METHOD );
if ( pSubEntry )
{
pCurEntry = pSubEntry;
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index 1c0de301f33f..4981a569817d 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -31,7 +31,7 @@
#include "basobj.hxx"
class SbModule;
-class SvLBoxEntry;
+class SvTreeListEntry;
class SbxVariable;
namespace basctl
@@ -177,21 +177,21 @@ class TreeListBox : public SvTreeListBox, public DocumentEventListener
private:
sal_uInt16 nMode;
DocumentEventNotifier m_aNotifier;
-
- void SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage );
+ void Init();
+ void SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
protected:
- virtual void RequestingChildren( SvLBoxEntry* pParent );
+ virtual void RequestingChildren( SvTreeListEntry* pParent );
virtual void ExpandedHdl();
- virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
+ virtual SvTreeListEntry* CloneEntry( SvTreeListEntry* pSource );
virtual long ExpandingHdl();
- void ImpCreateLibEntries( SvLBoxEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation );
- void ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
- void ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
- void ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
- SvLBoxEntry* ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText );
+ void ImpCreateLibEntries( SvTreeListEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation );
+ void ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
+ void ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
+ void ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
+ SvTreeListEntry* ImpFindEntry( SvTreeListEntry* pParent, const OUString& rText );
// DocumentEventListener
virtual void onDocumentCreated( const ScriptDocument& _rDocument );
@@ -205,34 +205,35 @@ protected:
virtual void onDocumentModeChanged( const ScriptDocument& _rDocument );
public:
- TreeListBox( Window* pParent, const ResId& rRes );
+ TreeListBox(Window* pParent, const ResId& rRes);
+ TreeListBox(Window* pParent);
~TreeListBox();
void ScanEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
void ScanAllEntries();
void UpdateEntries();
- bool IsEntryProtected( SvLBoxEntry* pEntry );
+ bool IsEntryProtected( SvTreeListEntry* pEntry );
void SetMode( sal_uInt16 nM ) { nMode = nM; }
sal_uInt16 GetMode() const { return nMode; }
- SbModule* FindModule( SvLBoxEntry* pEntry );
- SbxVariable* FindVariable( SvLBoxEntry* pEntry );
- SvLBoxEntry* FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
- SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType );
+ SbModule* FindModule( SvTreeListEntry* pEntry );
+ SbxVariable* FindVariable( SvTreeListEntry* pEntry );
+ SvTreeListEntry* FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
+ SvTreeListEntry* FindEntry( SvTreeListEntry* pParent, const OUString& rText, EntryType eType );
- EntryDescriptor GetEntryDescriptor( SvLBoxEntry* pEntry );
+ EntryDescriptor GetEntryDescriptor( SvTreeListEntry* pEntry );
ItemType ConvertType (EntryType eType);
- bool IsValidEntry( SvLBoxEntry* pEntry );
+ bool IsValidEntry( SvTreeListEntry* pEntry );
- SvLBoxEntry* AddEntry(
+ SvTreeListEntry* AddEntry(
const OUString& rText, const Image& rImage,
- SvLBoxEntry* pParent, bool bChildrenOnDemand,
+ SvTreeListEntry* pParent, bool bChildrenOnDemand,
std::auto_ptr<Entry> aUserData
);
- void RemoveEntry (SvLBoxEntry*);
+ void RemoveEntry (SvTreeListEntry*);
void RemoveEntry (ScriptDocument const&);
OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const;
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 17c66a7cbe40..d201081dd30a 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -38,10 +38,10 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
-typedef std::deque< SvLBoxEntry* > EntryArray;
+typedef std::deque< SvTreeListEntry* > EntryArray;
-void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
+void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry )
{
EntryDescriptor aDesc = GetEntryDescriptor(pEntry);
ScriptDocument aDocument = aDesc.GetDocument();
@@ -133,12 +133,12 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
void TreeListBox::ExpandedHdl()
{
- SvLBoxEntry* pEntry = GetHdlEntry();
+ SvTreeListEntry* pEntry = GetHdlEntry();
DBG_ASSERT( pEntry, "Was wurde zugeklappt?" );
if ( !IsExpanded( pEntry ) && pEntry->HasChildrenOnDemand() )
{
- SvLBoxEntry* pChild = FirstChild( pEntry );
+ SvTreeListEntry* pChild = FirstChild( pEntry );
while ( pChild )
{
GetModel()->Remove( pChild ); // does also call the DTOR
@@ -163,7 +163,7 @@ void TreeListBox::ScanAllEntries()
}
}
-SbxVariable* TreeListBox::FindVariable( SvLBoxEntry* pEntry )
+SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
{
if ( !pEntry )
return 0;
@@ -199,7 +199,7 @@ SbxVariable* TreeListBox::FindVariable( SvLBoxEntry* pEntry )
{
for ( size_t n = 0; n < aEntries.size(); n++ )
{
- SvLBoxEntry* pLE = aEntries[n];
+ SvTreeListEntry* pLE = aEntries[n];
DBG_ASSERT( pLE, "Can not find entry in array" );
Entry* pBE = static_cast<Entry*>(pLE->GetUserData());
DBG_ASSERT( pBE, "The data in the entry not found!" );
@@ -260,7 +260,7 @@ SbxVariable* TreeListBox::FindVariable( SvLBoxEntry* pEntry )
return pVar;
}
-EntryDescriptor TreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
+EntryDescriptor TreeListBox::GetEntryDescriptor( SvTreeListEntry* pEntry )
{
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
@@ -306,7 +306,7 @@ EntryDescriptor TreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
{
for ( size_t n = 0; n < aEntries.size(); n++ )
{
- SvLBoxEntry* pLE = aEntries[n];
+ SvTreeListEntry* pLE = aEntries[n];
DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
Entry* pBE = static_cast<Entry*>(pLE->GetUserData());
DBG_ASSERT( pBE, "Keine Daten im Eintrag gefunden!" );
@@ -376,7 +376,7 @@ ItemType TreeListBox::ConvertType (EntryType eType)
}
}
-bool TreeListBox::IsValidEntry( SvLBoxEntry* pEntry )
+bool TreeListBox::IsValidEntry( SvTreeListEntry* pEntry )
{
bool bIsValid = false;
@@ -431,16 +431,16 @@ bool TreeListBox::IsValidEntry( SvLBoxEntry* pEntry )
return bIsValid;
}
-SbModule* TreeListBox::FindModule( SvLBoxEntry* pEntry )
+SbModule* TreeListBox::FindModule( SvTreeListEntry* pEntry )
{
return dynamic_cast<SbModule*>(FindVariable(pEntry));
}
-SvLBoxEntry* TreeListBox::FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation )
+SvTreeListEntry* TreeListBox::FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation )
{
OSL_ENSURE( rDocument.isValid(), "basctl::TreeListBox::FindRootEntry: invalid document!" );
sal_uLong nRootPos = 0;
- SvLBoxEntry* pRootEntry = GetEntry( nRootPos );
+ SvTreeListEntry* pRootEntry = GetEntry( nRootPos );
while ( pRootEntry )
{
DBG_ASSERT( static_cast<Entry*>(pRootEntry->GetUserData())->GetType() == OBJ_TYPE_DOCUMENT, "Kein Shelleintrag?" );
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 9bc56e994098..c4d16253a4d1 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -59,61 +59,58 @@ using ::std::pair;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-MacroChooser::MacroChooser( Window* pParnt, bool bCreateEntries ) :
- SfxModalDialog( pParnt, IDEResId( RID_MACROCHOOSER ) ),
- aMacroNameTxt( this, IDEResId( RID_TXT_MACRONAME ) ),
- aMacroNameEdit( this, IDEResId( RID_ED_MACRONAME ) ),
- aMacroFromTxT( this, IDEResId( RID_TXT_MACROFROM ) ),
- aMacrosSaveInTxt( this, IDEResId( RID_TXT_SAVEMACRO ) ),
- aBasicBox( this, IDEResId( RID_CTRL_LIB ) ),
- aMacrosInTxt( this, IDEResId( RID_TXT_MACROSIN ) ),
- aMacrosInTxtBaseStr(aMacrosInTxt.GetText()),
- aMacroBox( this, IDEResId( RID_CTRL_MACRO ) ),
- aRunButton( this, IDEResId( RID_PB_RUN ) ),
- aCloseButton( this, IDEResId( RID_PB_CLOSE ) ),
- aAssignButton( this, IDEResId( RID_PB_ASSIGN ) ),
- aEditButton( this, IDEResId( RID_PB_EDIT ) ),
- aNewDelButton( this, IDEResId( RID_PB_DEL ) ),
- aOrganizeButton( this, IDEResId( RID_PB_ORG ) ),
- aHelpButton( this, IDEResId( RID_PB_HELP ) ),
- aNewLibButton( this, IDEResId( RID_PB_NEWLIB ) ),
- aNewModButton( this, IDEResId( RID_PB_NEWMOD ) ),
- bNewDelIsDel(true),
+MacroChooser::MacroChooser( Window* pParnt, bool bCreateEntries )
+ : SfxModalDialog(pParnt, "BasicMacroDialog", "modules/BasicIDE/ui/basicmacrodialog.ui")
+ , bNewDelIsDel(true)
// the Sfx doesn't aske the BasicManger whether modified or not
// => start saving in case of a change without a into the BasicIDE.
- bForceStoreBasic(false),
- nMode(All)
+ , bForceStoreBasic(false)
+ , nMode(All)
{
- FreeResource();
-
- aMacroBox.SetSelectionMode( SINGLE_SELECTION );
- aMacroBox.SetHighlightRange(); // select over the whole width
-
- aRunButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aCloseButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aAssignButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aEditButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aNewDelButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aOrganizeButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ get(m_pMacroNameEdit, "macronameedit");
+ get(m_pMacroFromTxT, "macrofromft");
+ get(m_pMacrosSaveInTxt, "macrotoft");
+ get(m_pBasicBox, "libraries");
+ get(m_pMacrosInTxt, "existingmacrosft");
+ m_aMacrosInTxtBaseStr = m_pMacrosInTxt->GetText();
+ get(m_pMacroBox, "macros");
+ get(m_pRunButton, "run");
+ get(m_pCloseButton, "close");
+ get(m_pAssignButton, "assign");
+ get(m_pEditButton, "edit");
+ get(m_pDelButton, "delete");
+ get(m_pOrganizeButton, "organize");
+ get(m_pNewLibButton, "newlibrary");
+ get(m_pNewModButton, "newmodule");
+
+ m_pMacroBox->SetSelectionMode( SINGLE_SELECTION );
+ m_pMacroBox->SetHighlightRange(); // select over the whole width
+
+ m_pRunButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pCloseButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pAssignButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pEditButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pDelButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pOrganizeButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
// Buttons only for MacroChooser::Recording
- aNewLibButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aNewModButton.SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
- aNewLibButton.Hide(); // default
- aNewModButton.Hide(); // default
- aMacrosSaveInTxt.Hide(); // default
+ m_pNewLibButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pNewModButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
+ m_pNewLibButton->Hide(); // default
+ m_pNewModButton->Hide(); // default
+ m_pMacrosSaveInTxt->Hide(); // default
- aMacrosInTxt.SetStyle( WB_NOMULTILINE | WB_PATHELLIPSIS );
+ m_pMacrosInTxt->SetStyle( WB_NOMULTILINE | WB_PATHELLIPSIS );
- aMacroNameEdit.SetModifyHdl( LINK( this, MacroChooser, EditModifyHdl ) );
+ m_pMacroNameEdit->SetModifyHdl( LINK( this, MacroChooser, EditModifyHdl ) );
- aBasicBox.SetSelectHdl( LINK( this, MacroChooser, BasicSelectHdl ) );
+ m_pBasicBox->SetSelectHdl( LINK( this, MacroChooser, BasicSelectHdl ) );
- aMacroBox.SetDoubleClickHdl( LINK( this, MacroChooser, MacroDoubleClickHdl ) );
- aMacroBox.SetSelectHdl( LINK( this, MacroChooser, MacroSelectHdl ) );
+ m_pMacroBox->SetDoubleClickHdl( LINK( this, MacroChooser, MacroDoubleClickHdl ) );
+ m_pMacroBox->SetSelectHdl( LINK( this, MacroChooser, MacroSelectHdl ) );
- aBasicBox.SetMode( BROWSEMODE_MODULES );
- aBasicBox.SetStyle( WB_TABSTOP | WB_BORDER |
+ m_pBasicBox->SetMode( BROWSEMODE_MODULES );
+ m_pBasicBox->SetStyle( WB_TABSTOP | WB_BORDER |
WB_HASLINES | WB_HASLINESATROOT |
WB_HASBUTTONS | WB_HASBUTTONSATROOT |
WB_HSCROLL );
@@ -122,7 +119,7 @@ MacroChooser::MacroChooser( Window* pParnt, bool bCreateEntries ) :
pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES );
if ( bCreateEntries )
- aBasicBox.ScanAllEntries();
+ m_pBasicBox->ScanAllEntries();
}
MacroChooser::~MacroChooser()
@@ -133,13 +130,13 @@ MacroChooser::~MacroChooser()
void MacroChooser::StoreMacroDescription()
{
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(aBasicBox.FirstSelected());
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(m_pBasicBox->FirstSelected());
String aMethodName;
- SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
+ SvTreeListEntry* pEntry = m_pMacroBox->FirstSelected();
if ( pEntry )
- aMethodName = aMacroBox.GetEntryText( pEntry );
+ aMethodName = m_pMacroBox->GetEntryText( pEntry );
else
- aMethodName = aMacroNameEdit.GetText();
+ aMethodName = m_pMacroNameEdit->GetText();
if ( aMethodName.Len() )
{
aDesc.SetMethodName( aMethodName );
@@ -164,31 +161,31 @@ void MacroChooser::RestoreMacroDescription()
aDesc = pData->GetLastEntryDescriptor();
}
- aBasicBox.SetCurrentEntry( aDesc );
+ m_pBasicBox->SetCurrentEntry( aDesc );
String aLastMacro( aDesc.GetMethodName() );
if ( aLastMacro.Len() )
{
// find entry in macro box
- SvLBoxEntry* pEntry = 0;
+ SvTreeListEntry* pEntry = 0;
sal_uLong nPos = 0;
- SvLBoxEntry* pE = aMacroBox.GetEntry( nPos );
+ SvTreeListEntry* pE = m_pMacroBox->GetEntry( nPos );
while ( pE )
{
- if ( aMacroBox.GetEntryText( pE ) == aLastMacro )
+ if ( m_pMacroBox->GetEntryText( pE ) == aLastMacro )
{
pEntry = pE;
break;
}
- pE = aMacroBox.GetEntry( ++nPos );
+ pE = m_pMacroBox->GetEntry( ++nPos );
}
if ( pEntry )
- aMacroBox.SetCurEntry( pEntry );
+ m_pMacroBox->SetCurEntry( pEntry );
else
{
- aMacroNameEdit.SetText( aLastMacro );
- aMacroNameEdit.SetSelection( Selection( 0, 0 ) );
+ m_pMacroNameEdit->SetText( aLastMacro );
+ m_pMacroNameEdit->SetSelection( Selection( 0, 0 ) );
}
}
}
@@ -196,11 +193,11 @@ void MacroChooser::RestoreMacroDescription()
short MacroChooser::Execute()
{
RestoreMacroDescription();
- aRunButton.GrabFocus();
+ m_pRunButton->GrabFocus();
// #104198 Check if "wrong" document is active
- SvLBoxEntry* pSelectedEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( pSelectedEntry ) );
+ SvTreeListEntry* pSelectedEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc( m_pBasicBox->GetEntryDescriptor( pSelectedEntry ) );
const ScriptDocument& rSelectedDoc( aDesc.GetDocument() );
// App Basic is always ok, so only check if shell was found
@@ -208,24 +205,24 @@ short MacroChooser::Execute()
{
// Search for the right entry
sal_uLong nRootPos = 0;
- SvLBoxEntry* pRootEntry = aBasicBox.GetEntry( nRootPos );
+ SvTreeListEntry* pRootEntry = m_pBasicBox->GetEntry( nRootPos );
while( pRootEntry )
{
- EntryDescriptor aCmpDesc( aBasicBox.GetEntryDescriptor( pRootEntry ) );
+ EntryDescriptor aCmpDesc( m_pBasicBox->GetEntryDescriptor( pRootEntry ) );
const ScriptDocument& rCmpDoc( aCmpDesc.GetDocument() );
if ( rCmpDoc.isDocument() && rCmpDoc.isActive() )
{
- SvLBoxEntry* pEntry = pRootEntry;
- SvLBoxEntry* pLastValid = pEntry;
+ SvTreeListEntry* pEntry = pRootEntry;
+ SvTreeListEntry* pLastValid = pEntry;
while ( pEntry )
{
pLastValid = pEntry;
- pEntry = aBasicBox.FirstChild( pEntry );
+ pEntry = m_pBasicBox->FirstChild( pEntry );
}
if( pLastValid )
- aBasicBox.SetCurEntry( pLastValid );
+ m_pBasicBox->SetCurEntry( pLastValid );
}
- pRootEntry = aBasicBox.GetEntry( ++nRootPos );
+ pRootEntry = m_pBasicBox->GetEntry( ++nRootPos );
}
}
@@ -233,7 +230,7 @@ short MacroChooser::Execute()
UpdateFields();
if ( StarBASIC::IsRunning() )
- aCloseButton.GrabFocus();
+ m_pCloseButton->GrabFocus();
Window* pPrevDlgParent = Application::GetDefDialogParent();
Application::SetDefDialogParent( this );
@@ -250,7 +247,7 @@ void MacroChooser::EnableButton( Button& rButton, bool bEnable )
if ( bEnable )
{
if (nMode == ChooseOnly || nMode == Recording)
- rButton.Enable(&rButton == &aRunButton);
+ rButton.Enable(&rButton == m_pRunButton);
else
rButton.Enable();
}
@@ -264,13 +261,13 @@ void MacroChooser::EnableButton( Button& rButton, bool bEnable )
SbMethod* MacroChooser::GetMacro()
{
SbMethod* pMethod = 0;
- SbModule* pModule = aBasicBox.FindModule( aBasicBox.GetCurEntry() );
+ SbModule* pModule = m_pBasicBox->FindModule( m_pBasicBox->GetCurEntry() );
if ( pModule )
{
- SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
+ SvTreeListEntry* pEntry = m_pMacroBox->FirstSelected();
if ( pEntry )
{
- String aMacroName( aMacroBox.GetEntryText( pEntry ) );
+ String aMacroName( m_pMacroBox->GetEntryText( pEntry ) );
pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD );
}
}
@@ -315,9 +312,9 @@ void MacroChooser::DeleteMacro()
String aModName = pModule->GetName();
OSL_VERIFY( aDocument.updateModule( aLibName, aModName, aSource ) );
- SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
+ SvTreeListEntry* pEntry = m_pMacroBox->FirstSelected();
DBG_ASSERT( pEntry, "DeleteMacro: Entry ?!" );
- aMacroBox.GetModel()->Remove( pEntry );
+ m_pMacroBox->GetModel()->Remove( pEntry );
bForceStoreBasic = true;
}
}
@@ -325,8 +322,8 @@ void MacroChooser::DeleteMacro()
SbMethod* MacroChooser::CreateMacro()
{
SbMethod* pMethod = 0;
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
OSL_ENSURE( aDocument.isAlive(), "MacroChooser::CreateMacro: no document!" );
if ( !aDocument.isAlive() )
@@ -369,10 +366,10 @@ SbMethod* MacroChooser::CreateMacro()
if ( !pModule )
{
pModule = createModImpl( static_cast<Window*>( this ),
- aDocument, aBasicBox, aLibName, aModName );
+ aDocument, *m_pBasicBox, aLibName, aModName );
}
- String aSubName = aMacroNameEdit.GetText();
+ String aSubName = m_pMacroNameEdit->GetText();
DBG_ASSERT( !pModule || !pModule->GetMethods()->Find( aSubName, SbxCLASS_METHOD ), "Macro existiert schon!" );
pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : NULL;
}
@@ -380,28 +377,28 @@ SbMethod* MacroChooser::CreateMacro()
return pMethod;
}
-void MacroChooser::SaveSetCurEntry( SvTreeListBox& rBox, SvLBoxEntry* pEntry )
+void MacroChooser::SaveSetCurEntry( SvTreeListBox& rBox, SvTreeListEntry* pEntry )
{
// the edit would be killed by the highlight otherwise:
- String aSaveText( aMacroNameEdit.GetText() );
- Selection aCurSel( aMacroNameEdit.GetSelection() );
+ String aSaveText( m_pMacroNameEdit->GetText() );
+ Selection aCurSel( m_pMacroNameEdit->GetSelection() );
rBox.SetCurEntry( pEntry );
- aMacroNameEdit.SetText( aSaveText );
- aMacroNameEdit.SetSelection( aCurSel );
+ m_pMacroNameEdit->SetText( aSaveText );
+ m_pMacroNameEdit->SetSelection( aCurSel );
}
void MacroChooser::CheckButtons()
{
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
- SvLBoxEntry* pMacroEntry = aMacroBox.FirstSelected();
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pMacroEntry = m_pMacroBox->FirstSelected();
SbMethod* pMethod = GetMacro();
// check, if corresponding libraries are readonly
bool bReadOnly = false;
- sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
+ sal_uInt16 nDepth = pCurEntry ? m_pBasicBox->GetModel()->GetDepth( pCurEntry ) : 0;
if ( nDepth == 1 || nDepth == 2 )
{
ScriptDocument aDocument( aDesc.GetDocument() );
@@ -421,40 +418,40 @@ void MacroChooser::CheckButtons()
bool bEnable = pMethod ? true : false;
if (nMode != ChooseOnly && StarBASIC::IsRunning())
bEnable = false;
- EnableButton( aRunButton, bEnable );
+ EnableButton(*m_pRunButton, bEnable);
}
// organising still possible?
// Assign...
- EnableButton( aAssignButton, pMethod ? true : false );
+ EnableButton(*m_pAssignButton, pMethod ? true : false);
// Edit...
- EnableButton( aEditButton, pMacroEntry ? true : false );
+ EnableButton(*m_pEditButton, pMacroEntry ? true : false);
- // aOrganizeButton
- EnableButton( aOrganizeButton, !StarBASIC::IsRunning() && nMode == All );
+ // Organizer...
+ EnableButton(*m_pOrganizeButton, !StarBASIC::IsRunning() && nMode == All);
- // aNewDelButton....
- bool bProtected = aBasicBox.IsEntryProtected( pCurEntry );
+ // m_pDelButton->...
+ bool bProtected = m_pBasicBox->IsEntryProtected( pCurEntry );
bool bShare = ( aDesc.GetLocation() == LIBRARY_LOCATION_SHARE );
- EnableButton(aNewDelButton, !StarBASIC::IsRunning() && nMode == All && !bProtected && !bReadOnly && !bShare);
+ EnableButton(*m_pDelButton, !StarBASIC::IsRunning() && nMode == All && !bProtected && !bReadOnly && !bShare);
bool bPrev = bNewDelIsDel;
bNewDelIsDel = pMethod ? true : false;
if (bPrev != bNewDelIsDel && nMode == All)
{
String aBtnText( bNewDelIsDel ? IDEResId( RID_STR_BTNDEL) : IDEResId( RID_STR_BTNNEW ) );
- aNewDelButton.SetText( aBtnText );
+ m_pDelButton->SetText( aBtnText );
}
if (nMode == Recording)
{
// save button
- aRunButton.Enable(!bProtected && !bReadOnly && !bShare);
+ m_pRunButton->Enable(!bProtected && !bReadOnly && !bShare);
// new library button
- aNewLibButton.Enable(!bShare);
+ m_pNewLibButton->Enable(!bShare);
// new module button
- aNewModButton.Enable(!bProtected && !bReadOnly && !bShare);
+ m_pNewModButton->Enable(!bProtected && !bReadOnly && !bShare);
}
}
@@ -498,16 +495,16 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
if ( !pBox->IsSelected( pBox->GetHdlEntry() ) )
return 0;
- SbModule* pModule = aBasicBox.FindModule( aBasicBox.GetCurEntry() );
+ SbModule* pModule = m_pBasicBox->FindModule( m_pBasicBox->GetCurEntry() );
- aMacroBox.Clear();
+ m_pMacroBox->Clear();
if ( pModule )
{
- String aStr = aMacrosInTxtBaseStr;
+ String aStr = m_aMacrosInTxtBaseStr;
aStr += " " ;
aStr += pModule->GetName();
- aMacrosInTxt.SetText( aStr );
+ m_pMacrosInTxt->SetText( aStr );
// The macros should be called in the same order that they
// are written down in the module.
@@ -525,16 +522,16 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) );
}
- aMacroBox.SetUpdateMode(false);
+ m_pMacroBox->SetUpdateMode(false);
for ( map< sal_uInt16, SbMethod* >::iterator it = aMacros.begin(); it != aMacros.end(); ++it )
- aMacroBox.InsertEntry( (*it).second->GetName() );
- aMacroBox.SetUpdateMode(true);
+ m_pMacroBox->InsertEntry( (*it).second->GetName() );
+ m_pMacroBox->SetUpdateMode(true);
- if ( aMacroBox.GetEntryCount() )
+ if ( m_pMacroBox->GetEntryCount() )
{
- SvLBoxEntry* pEntry = aMacroBox.GetEntry( 0 );
+ SvTreeListEntry* pEntry = m_pMacroBox->GetEntry( 0 );
DBG_ASSERT( pEntry, "Entry ?!" );
- aMacroBox.SetCurEntry( pEntry );
+ m_pMacroBox->SetCurEntry( pEntry );
}
}
@@ -551,51 +548,51 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
// select the module in which the macro is put at Neu (new),
// if BasicManager or Lib is selecting
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
if ( pCurEntry )
{
- sal_uInt16 nDepth = aBasicBox.GetModel()->GetDepth( pCurEntry );
- if ( ( nDepth == 1 ) && ( aBasicBox.IsEntryProtected( pCurEntry ) ) )
+ sal_uInt16 nDepth = m_pBasicBox->GetModel()->GetDepth( pCurEntry );
+ if ( ( nDepth == 1 ) && ( m_pBasicBox->IsEntryProtected( pCurEntry ) ) )
{
// then put to the respective Std-Lib...
- SvLBoxEntry* pManagerEntry = aBasicBox.GetModel()->GetParent( pCurEntry );
- pCurEntry = aBasicBox.GetModel()->FirstChild( pManagerEntry );
+ SvTreeListEntry* pManagerEntry = m_pBasicBox->GetModel()->GetParent( pCurEntry );
+ pCurEntry = m_pBasicBox->GetModel()->FirstChild( pManagerEntry );
}
if ( nDepth < 2 )
{
- SvLBoxEntry* pNewEntry = pCurEntry;
+ SvTreeListEntry* pNewEntry = pCurEntry;
while ( pCurEntry && ( nDepth < 2 ) )
{
- pCurEntry = aBasicBox.FirstChild( pCurEntry );
+ pCurEntry = m_pBasicBox->FirstChild( pCurEntry );
if ( pCurEntry )
{
pNewEntry = pCurEntry;
- nDepth = aBasicBox.GetModel()->GetDepth( pCurEntry );
+ nDepth = m_pBasicBox->GetModel()->GetDepth( pCurEntry );
}
}
- SaveSetCurEntry( aBasicBox, pNewEntry );
+ SaveSetCurEntry( *m_pBasicBox, pNewEntry );
}
- if ( aMacroBox.GetEntryCount() )
+ if ( m_pMacroBox->GetEntryCount() )
{
- String aEdtText( aMacroNameEdit.GetText() );
+ String aEdtText( m_pMacroNameEdit->GetText() );
bool bFound = false;
- for ( sal_uInt16 n = 0; n < aMacroBox.GetEntryCount(); n++ )
+ for ( sal_uInt16 n = 0; n < m_pMacroBox->GetEntryCount(); n++ )
{
- SvLBoxEntry* pEntry = aMacroBox.GetEntry( n );
+ SvTreeListEntry* pEntry = m_pMacroBox->GetEntry( n );
DBG_ASSERT( pEntry, "Entry ?!" );
- if ( aMacroBox.GetEntryText( pEntry ).CompareIgnoreCaseToAscii( aEdtText ) == COMPARE_EQUAL )
+ if ( m_pMacroBox->GetEntryText( pEntry ).CompareIgnoreCaseToAscii( aEdtText ) == COMPARE_EQUAL )
{
- SaveSetCurEntry( aMacroBox, pEntry );
+ SaveSetCurEntry(*m_pMacroBox, pEntry);
bFound = true;
break;
}
}
if ( !bFound )
{
- SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
+ SvTreeListEntry* pEntry = m_pMacroBox->FirstSelected();
// if the entry exists ->Select ->Desription...
if ( pEntry )
- aMacroBox.Select( pEntry, false );
+ m_pMacroBox->Select( pEntry, false );
}
}
}
@@ -609,7 +606,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
{
// apart from New/Record the Description is done by LoseFocus
- if ( pButton == &aRunButton )
+ if (pButton == m_pRunButton)
{
StoreMacroDescription();
@@ -632,11 +629,11 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
}
else if (nMode == Recording )
{
- if ( !IsValidSbxName(aMacroNameEdit.GetText()) )
+ if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
- aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) );
- aMacroNameEdit.GrabFocus();
+ m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().Len() ) );
+ m_pMacroNameEdit->GrabFocus();
return 0;
}
@@ -647,15 +644,15 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
EndDialog(Macro_OkRun);
}
- else if ( pButton == &aCloseButton )
+ else if (pButton == m_pCloseButton)
{
StoreMacroDescription();
EndDialog(Macro_Close);
}
- else if ( ( pButton == &aEditButton ) || ( pButton == &aNewDelButton ) )
+ else if ((pButton == m_pEditButton) || (pButton == m_pDelButton))
{
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isAlive(), "MacroChooser::ButtonHdl: no document, or document is dead!" );
if ( !aDocument.isAlive() )
@@ -671,11 +668,11 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
}
String aSub( aDesc.GetMethodName() );
SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLib, aMod, aSub, String() );
- if ( pButton == &aEditButton )
+ if (pButton == m_pEditButton)
{
- SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
+ SvTreeListEntry* pEntry = m_pMacroBox->FirstSelected();
if ( pEntry )
- aInfoItem.SetMethod( aMacroBox.GetEntryText( pEntry ) );
+ aInfoItem.SetMethod( m_pMacroBox->GetEntryText( pEntry ) );
StoreMacroDescription();
SfxAllItemSet aArgs( SFX_APP()->GetPool() );
SfxRequest aRequest( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON, aArgs );
@@ -695,16 +692,16 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
SFX_CALLMODE_SYNCHRON, &aInfoItem, 0L );
CheckButtons();
UpdateFields();
- //if ( aMacroBox.GetCurEntry() ) // OV-Bug ?
- // aMacroBox.Select( aMacroBox.GetCurEntry() );
+ //if ( m_pMacroBox->GetCurEntry() ) // OV-Bug ?
+ // m_pMacroBox->Select( m_pMacroBox->GetCurEntry() );
}
else
{
- if ( !IsValidSbxName(aMacroNameEdit.GetText()) )
+ if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
- aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) );
- aMacroNameEdit.GrabFocus();
+ m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().Len() ) );
+ m_pMacroNameEdit->GrabFocus();
return 1;
}
SbMethod* pMethod = CreateMacro();
@@ -725,11 +722,10 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
}
}
}
-
- else if ( pButton == &aAssignButton )
+ else if (pButton == m_pAssignButton)
{
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isAlive(), "MacroChooser::ButtonHdl: no document, or document is dead!" );
if ( !aDocument.isAlive() )
@@ -737,7 +733,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
BasicManager* pBasMgr = aDocument.getBasicManager();
String aLib( aDesc.GetLibName() );
String aMod( aDesc.GetName() );
- String aSub( aMacroNameEdit.GetText() );
+ String aSub( m_pMacroNameEdit->GetText() );
SbMethod* pMethod = GetMacro();
DBG_ASSERT( pBasMgr, "BasMgr?" );
DBG_ASSERT( pMethod, "Method?" );
@@ -748,28 +744,28 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
aRequest.AppendItem( aItem );
SFX_APP()->ExecuteSlot( aRequest );
}
- else if ( pButton == &aNewLibButton )
+ else if (pButton == m_pNewLibButton)
{
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
- createLibImpl( static_cast<Window*>( this ), aDocument, NULL, &aBasicBox );
+ createLibImpl( static_cast<Window*>( this ), aDocument, NULL, m_pBasicBox );
}
- else if ( pButton == &aNewModButton )
+ else if (pButton == m_pNewModButton)
{
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
String aLibName( aDesc.GetLibName() );
String aModName;
createModImpl( static_cast<Window*>( this ), aDocument,
- aBasicBox, aLibName, aModName, true );
+ *m_pBasicBox, aLibName, aModName, true );
}
- else if ( pButton == &aOrganizeButton )
+ else if (pButton == m_pOrganizeButton)
{
StoreMacroDescription();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(aBasicBox.FirstSelected());
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(m_pBasicBox->FirstSelected());
OrganizeDialog* pDlg = new OrganizeDialog( this, 0, aDesc );
sal_uInt16 nRet = pDlg->Execute();
delete pDlg;
@@ -784,7 +780,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
if ( pShell && pShell->IsAppBasicModified() )
bForceStoreBasic = true;
- aBasicBox.UpdateEntries();
+ m_pBasicBox->UpdateEntries();
}
return 0;
}
@@ -793,12 +789,12 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
void MacroChooser::UpdateFields()
{
- SvLBoxEntry* pMacroEntry = aMacroBox.GetCurEntry();
+ SvTreeListEntry* pMacroEntry = m_pMacroBox->GetCurEntry();
String aEmptyStr;
- aMacroNameEdit.SetText( aEmptyStr );
+ m_pMacroNameEdit->SetText( aEmptyStr );
if ( pMacroEntry )
- aMacroNameEdit.SetText( aMacroBox.GetEntryText( pMacroEntry ) );
+ m_pMacroNameEdit->SetText( m_pMacroBox->GetEntryText( pMacroEntry ) );
}
void MacroChooser::SetMode (Mode nM)
@@ -808,41 +804,36 @@ void MacroChooser::SetMode (Mode nM)
{
case All:
{
- aRunButton.SetText( String( IDEResId( RID_STR_RUN ) ) );
- EnableButton( aNewDelButton, true );
- EnableButton( aOrganizeButton, true );
+ m_pRunButton->SetText( String( IDEResId( RID_STR_RUN ) ) );
+ EnableButton(*m_pDelButton, true);
+ EnableButton(*m_pOrganizeButton, true);
break;
}
case ChooseOnly:
{
- aRunButton.SetText( String( IDEResId( RID_STR_CHOOSE ) ) );
- EnableButton( aNewDelButton, false );
- EnableButton( aOrganizeButton, false );
+ m_pRunButton->SetText( String( IDEResId( RID_STR_CHOOSE ) ) );
+ EnableButton(*m_pDelButton, false);
+ EnableButton(*m_pOrganizeButton, false);
break;
}
case Recording:
{
- aRunButton.SetText( String( IDEResId( RID_STR_RECORD ) ) );
- EnableButton( aNewDelButton, false );
- EnableButton( aOrganizeButton, false );
-
- aAssignButton.Hide();
- aEditButton.Hide();
- aNewDelButton.Hide();
- aOrganizeButton.Hide();
- aMacroFromTxT.Hide();
-
- aNewLibButton.Show();
- aNewModButton.Show();
- aMacrosSaveInTxt.Show();
-
- Point aHelpPos = aHelpButton.GetPosPixel();
- Point aHelpPosLogic = PixelToLogic( aHelpPos, MapMode(MAP_APPFONT) );
- aHelpPosLogic.Y() -= 34;
- aHelpPos = LogicToPixel( aHelpPosLogic, MapMode(MAP_APPFONT) );
- aHelpButton.SetPosPixel( aHelpPos );
+ m_pRunButton->SetText( String( IDEResId( RID_STR_RECORD ) ) );
+ EnableButton(*m_pDelButton, false);
+ EnableButton(*m_pOrganizeButton, false);
+
+ m_pAssignButton->Hide();
+ m_pEditButton->Hide();
+ m_pDelButton->Hide();
+ m_pOrganizeButton->Hide();
+ m_pMacroFromTxT->Hide();
+
+ m_pNewLibButton->Show();
+ m_pNewModButton->Show();
+ m_pMacrosSaveInTxt->Show();
+
break;
}
}
diff --git a/basctl/source/basicide/macrodlg.hrc b/basctl/source/basicide/macrodlg.hrc
index 6ca7749ae1ff..8c4f2b21f461 100644
--- a/basctl/source/basicide/macrodlg.hrc
+++ b/basctl/source/basicide/macrodlg.hrc
@@ -20,31 +20,10 @@
#include <svl/solar.hrc>
-#define RID_MACROCHOOSER ( RID_BASICIDE_START + 50 )
#define RID_STR_BTNDEL ( RID_BASICIDE_START + 51 )
#define RID_STR_BTNNEW ( RID_BASICIDE_START + 52 )
#define RID_STR_CHOOSE ( RID_BASICIDE_START + 53 )
#define RID_STR_RUN ( RID_BASICIDE_START + 54 )
#define RID_STR_RECORD ( RID_BASICIDE_START + 56 )
-#define RID_CTRL_MACRO 1
-#define RID_CTRL_LIB 2
-#define RID_TXT_MACRONAME 3
-#define RID_TXT_MACROFROM 4
-#define RID_ED_MACRONAME 5
-#define RID_TXT_DESCRIPTION 6
-#define RID_PB_RUN 8
-#define RID_PB_CLOSE 9
-#define RID_PB_EDIT 10
-#define RID_PB_ORG 11
-#define RID_PB_DEL 12
-#define RID_PB_ASSIGN 13
-#define RID_PB_HELP 15
-#define RID_ML_DESCRIPTION 16
-#define RID_TXT_MACROSIN 17
-#define RID_TXT_SAVEMACRO 18
-#define RID_PB_NEWLIB 19
-#define RID_PB_NEWMOD 20
-
#endif // BASCTL_MACRODLG_HRC
-
diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx
index 083cb2ef532a..339de6c54a61 100644
--- a/basctl/source/basicide/macrodlg.hxx
+++ b/basctl/source/basicide/macrodlg.hxx
@@ -49,24 +49,22 @@ public:
};
private:
- FixedText aMacroNameTxt;
- Edit aMacroNameEdit;
- FixedText aMacroFromTxT;
- FixedText aMacrosSaveInTxt;
- TreeListBox aBasicBox;
- FixedText aMacrosInTxt;
- String aMacrosInTxtBaseStr;
- SvTreeListBox aMacroBox;
-
- PushButton aRunButton;
- CancelButton aCloseButton;
- PushButton aAssignButton;
- PushButton aEditButton;
- PushButton aNewDelButton;
- PushButton aOrganizeButton;
- HelpButton aHelpButton;
- PushButton aNewLibButton;
- PushButton aNewModButton;
+ Edit* m_pMacroNameEdit;
+ FixedText* m_pMacroFromTxT;
+ FixedText* m_pMacrosSaveInTxt;
+ TreeListBox* m_pBasicBox;
+ FixedText* m_pMacrosInTxt;
+ String m_aMacrosInTxtBaseStr;
+ SvTreeListBox* m_pMacroBox;
+
+ PushButton* m_pRunButton;
+ PushButton* m_pCloseButton;
+ PushButton* m_pAssignButton;
+ PushButton* m_pEditButton;
+ PushButton* m_pDelButton;
+ PushButton* m_pOrganizeButton;
+ PushButton* m_pNewLibButton;
+ PushButton* m_pNewModButton;
bool bNewDelIsDel;
bool bForceStoreBasic;
@@ -80,7 +78,7 @@ private:
DECL_LINK( ButtonHdl, Button * );
void CheckButtons();
- void SaveSetCurEntry( SvTreeListBox& rBox, SvLBoxEntry* pEntry );
+ void SaveSetCurEntry( SvTreeListBox& rBox, SvTreeListEntry* pEntry );
void UpdateFields();
void EnableButton( Button& rButton, bool bEnable );
diff --git a/basctl/source/basicide/macrodlg.src b/basctl/source/basicide/macrodlg.src
index 7e6860cdb9db..d9dc3f4a214d 100644
--- a/basctl/source/basicide/macrodlg.src
+++ b/basctl/source/basicide/macrodlg.src
@@ -20,156 +20,6 @@
#include <macrodlg.hrc>
#include <basidesh.hrc>
#include <helpid.hrc>
-ModalDialog RID_MACROCHOOSER
-{
- HelpId = "basctl:ModalDialog:RID_MACROCHOOSER" ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 287 , 165 ) ;
- Text [ en-US ] = "%PRODUCTNAME Basic Macros" ;
- Moveable = TRUE ;
- // Closeable = TRUE;
-
- FixedText RID_TXT_MACROSIN
- {
- Pos = MAP_APPFONT ( 122 , 30 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- Text [ en-US ] = "Existing macros ~in:";
- };
- Control RID_CTRL_MACRO
- {
- HelpID = HID_BASICIDE_MACROS ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 122 , 41 ) ;
- Size = MAP_APPFONT ( 100 , 117 ) ;
- // Size = MAP_APPFONT ( 100 , 117 ) ;
- TabStop = TRUE ;
- };
- Control RID_CTRL_LIB
- {
- HelpID = HID_BASICIDE_LIBS ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 41 ) ;
- Size = MAP_APPFONT ( 110 , 117 ) ;
- TabStop = TRUE ;
- };
- FixedText RID_TXT_MACRONAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- Text [ en-US ] = "~Macro name" ;
- };
- Edit RID_ED_MACRONAME
- {
- HelpID = "basctl:Edit:RID_MACROCHOOSER:RID_ED_MACRONAME";
- Border = TRUE ;
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 6 , 14 ) ;
- Size = MAP_APPFONT ( 110 , 12 ) ;
- TabStop = TRUE ;
- };
- FixedText RID_TXT_MACROFROM
- {
- Pos = MAP_APPFONT ( 6 , 30 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- Text [ en-US ] = "Macro ~from" ;
- };
- FixedText RID_TXT_SAVEMACRO
- {
- Pos = MAP_APPFONT ( 6 , 30 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- Text [ en-US ] = "Save m~acro in";
- };
-
- FixedText RID_TXT_DESCRIPTION
- {
- Pos = MAP_APPFONT ( 6 , 117 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- Text [ en-US ] = "De~scription" ;
- };
- PushButton RID_PB_RUN
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_RUN";
- Pos = MAP_APPFONT ( 231 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE;
- Text [ en-US ] = "R~un" ;
- TabStop = TRUE ;
- };
- CancelButton RID_PB_CLOSE
- {
- Pos = MAP_APPFONT ( 231 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Close";
- };
-
- PushButton RID_PB_ASSIGN
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_ASSIGN";
- Pos = MAP_APPFONT ( 231 , 60 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Assign..." ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_EDIT
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_EDIT";
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Pos = MAP_APPFONT ( 231 , 77 ) ;
- Text [ en-US ] = "~Edit" ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_NEWLIB
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_NEWLIB";
- Pos = MAP_APPFONT ( 231 , 60 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "New ~Library";
- };
- PushButton RID_PB_NEWMOD
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_NEWMOD";
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Pos = MAP_APPFONT ( 231 , 77 ) ;
- Text [ en-US ] = "New M~odule";
- };
- PushButton RID_PB_DEL
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_DEL";
- Pos = MAP_APPFONT ( 231 , 94 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Delete" ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_ORG
- {
- HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_ORG";
- Pos = MAP_APPFONT ( 231 , 114 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Organizer..." ;
- };
- HelpButton RID_PB_HELP
- {
- Pos = MAP_APPFONT ( 231 , 131 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- MultiLineEdit RID_ML_DESCRIPTION
- {
- HelpID = "basctl:MultiLineEdit:RID_MACROCHOOSER:RID_ML_DESCRIPTION";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 131 ) ;
- Size = MAP_APPFONT ( 216 , 28 ) ;
- TabStop = TRUE ;
- VScroll = TRUE ;
- IgnoreTab = TRUE ;
- };
-};
-String RID_STR_STDMACRONAME
-{
- Text [ en-US ] = "Macro" ;
-};
String RID_STR_BTNDEL
{
Text [ en-US ] = "~Delete" ;
@@ -178,10 +28,6 @@ String RID_STR_BTNNEW
{
Text [ en-US ] = "~New" ;
};
-String RID_STR_CLOSE
-{
- Text [ en-US ] = "Close" ;
-};
String RID_STR_CHOOSE
{
Text [ en-US ] = "Choose" ;
@@ -190,7 +36,6 @@ String RID_STR_RUN
{
Text [ en-US ] = "Run" ;
};
-
String RID_STR_RECORD
{
Text [ en-US ] = "~Save" ;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 4986ad2dad37..05f5c1051d8c 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -45,7 +45,7 @@
#include <sot/storage.hxx>
#include <com/sun/star/io/Pipe.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/script/XLibraryContainer2.hpp>
@@ -56,7 +56,7 @@
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include "com/sun/star/ucb/XCommandEnvironment.hpp"
#include <com/sun/star/ucb/NameClash.hpp>
-#include "com/sun/star/packages/manifest/XManifestWriter.hpp"
+#include "com/sun/star/packages/manifest/ManifestWriter.hpp"
#include <unotools/pathoptions.hxx>
#include <comphelper/processfactory.hxx>
@@ -119,15 +119,15 @@ public:
class LibLBoxString : public SvLBoxString
{
public:
- LibLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) :
+ LibLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) :
SvLBoxString( pEntry, nFlags, rTxt ) {}
- virtual void Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
+ virtual void Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry );
};
//----------------------------------------------------------------------------
-void LibLBoxString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* pEntry )
+void LibLBoxString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvTreeListEntry* pEntry )
{
// Change text color if library is read only:
bool bReadOnly = false;
@@ -180,7 +180,7 @@ CheckBox::~CheckBox()
delete pCheckButton;
// delete user data
- SvLBoxEntry* pEntry = First();
+ SvTreeListEntry* pEntry = First();
while ( pEntry )
{
delete static_cast<LibUserData*>(pEntry->GetUserData());
@@ -216,19 +216,19 @@ void CheckBox::SetMode (ObjectMode::Mode e)
//----------------------------------------------------------------------------
-SvLBoxEntry* CheckBox::DoInsertEntry( const String& rStr, sal_uLong nPos )
+SvTreeListEntry* CheckBox::DoInsertEntry( const String& rStr, sal_uLong nPos )
{
return SvTabListBox::InsertEntryToColumn( rStr, nPos, 0 );
}
//----------------------------------------------------------------------------
-SvLBoxEntry* CheckBox::FindEntry( const String& rName )
+SvTreeListEntry* CheckBox::FindEntry( const String& rName )
{
sal_uLong nCount = GetEntryCount();
for ( sal_uLong i = 0; i < nCount; i++ )
{
- SvLBoxEntry* pEntry = GetEntry( i );
+ SvTreeListEntry* pEntry = GetEntry( i );
DBG_ASSERT( pEntry, "pEntry?!" );
if ( rName.CompareIgnoreCaseToAscii( GetEntryText( pEntry, 0 ) ) == COMPARE_EQUAL )
return pEntry;
@@ -242,7 +242,7 @@ void CheckBox::CheckEntryPos( sal_uLong nPos )
{
if ( nPos < GetEntryCount() )
{
- SvLBoxEntry* pEntry = GetEntry( nPos );
+ SvTreeListEntry* pEntry = GetEntry( nPos );
if ( GetCheckButtonState( pEntry ) != SV_BUTTON_CHECKED )
SetCheckButtonState( pEntry, SvButtonState(SV_BUTTON_CHECKED) );
@@ -260,9 +260,10 @@ bool CheckBox::IsChecked( sal_uLong nPos ) const
//----------------------------------------------------------------------------
-void CheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind )
+void CheckBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rTxt,
+ const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind )
{
- SvTabListBox::InitEntry( pEntry, rTxt, rImg1, rImg2, eButtonKind );
+ SvTabListBox::InitEntry(pEntry, rTxt, rImg1, rImg2, eButtonKind);
if (eMode == ObjectMode::Module)
{
@@ -279,7 +280,7 @@ void CheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const Imag
//----------------------------------------------------------------------------
-sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
{
if (eMode != ObjectMode::Module)
return false;
@@ -327,7 +328,7 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
//----------------------------------------------------------------------------
-sal_Bool CheckBox::EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewName )
+sal_Bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewName )
{
bool bValid = rNewName.getLength() <= 30 && IsValidSbxName(rNewName);
OUString aOldName( GetEntryText( pEntry, 0 ) );
@@ -558,7 +559,7 @@ LibPage::~LibPage()
void LibPage::CheckButtons()
{
- SvLBoxEntry* pCur = aLibBox.GetCurEntry();
+ SvTreeListEntry* pCur = aLibBox.GetCurEntry();
if ( pCur )
{
OUString aLibName = aLibBox.GetEntryText( pCur, 0 );
@@ -656,7 +657,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
SFX_APP()->ExecuteSlot( aRequest );
SfxUsrAnyItem aDocItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( m_aCurDocument.getDocumentOrNull() ) );
- SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aLibBox.GetCurEntry();
DBG_ASSERT( pCurEntry, "Entry?!" );
String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
@@ -681,7 +682,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
}
else if ( pButton == &aPasswordButton )
{
- SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aLibBox.GetCurEntry();
OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// load module library (if not loaded)
@@ -748,7 +749,7 @@ IMPL_LINK_INLINE_START( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg )
{
long nRet = 0;
- SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aLibBox.GetCurEntry();
OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
Reference< script::XLibraryContainerPassword > xPasswd( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
@@ -899,7 +900,7 @@ void LibPage::InsertLib()
if ( !( ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) && xModLibContImport->isLibraryLink( aLibName ) ) ||
( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aLibName ) && xDlgLibContImport->isLibraryLink( aLibName ) ) ) )
{
- SvLBoxEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName );
+ SvTreeListEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName );
sal_uInt16 nPos = (sal_uInt16) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry );
pLibDlg->GetLibBox().CheckEntryPos(nPos);
}
@@ -928,7 +929,7 @@ void LibPage::InsertLib()
{
if ( pLibDlg->GetLibBox().IsChecked( nLib ) )
{
- SvLBoxEntry* pEntry = pLibDlg->GetLibBox().GetEntry( nLib );
+ SvTreeListEntry* pEntry = pLibDlg->GetLibBox().GetEntry( nLib );
DBG_ASSERT( pEntry, "Entry?!" );
OUString aLibName( pLibDlg->GetLibBox().GetEntryText( pEntry, 0 ) );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
@@ -1001,7 +1002,7 @@ void LibPage::InsertLib()
if ( bRemove )
{
// remove listbox entry
- SvLBoxEntry* pEntry_ = aLibBox.FindEntry( aLibName );
+ SvTreeListEntry* pEntry_ = aLibBox.FindEntry( aLibName );
if ( pEntry_ )
aLibBox.SvTreeListBox::GetModel()->Remove( pEntry_ );
@@ -1141,7 +1142,7 @@ void LibPage::InsertLib()
}
}
- SvLBoxEntry* pFirstNew = aLibBox.GetEntry( nNewPos );
+ SvTreeListEntry* pFirstNew = aLibBox.GetEntry( nNewPos );
if ( pFirstNew )
aLibBox.SetCurEntry( pFirstNew );
}
@@ -1158,7 +1159,7 @@ void LibPage::InsertLib()
void LibPage::Export( void )
{
- SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aLibBox.GetCurEntry();
String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// Password verification
@@ -1355,9 +1356,8 @@ void LibPage::ExportAsPackage( const String& aLibName )
manifest.push_back( attribs );
// write into pipe:
- Reference<packages::manifest::XManifestWriter> xManifestWriter( xMSF->createInstance
- ( DEFINE_CONST_UNICODE("com.sun.star.packages.manifest.ManifestWriter") ), UNO_QUERY );
- Reference<io::XOutputStream> xPipe( io::Pipe::create(comphelper::getComponentContext(xMSF)), UNO_QUERY_THROW );
+ Reference<packages::manifest::XManifestWriter> xManifestWriter = packages::manifest::ManifestWriter::create( xContext );
+ Reference<io::XOutputStream> xPipe( io::Pipe::create( xContext ), UNO_QUERY_THROW );
xManifestWriter->writeManifestSequence(
xPipe, Sequence< Sequence<beans::PropertyValue> >(
&manifest[ 0 ], manifest.size() ) );
@@ -1384,32 +1384,27 @@ void LibPage::ExportAsPackage( const String& aLibName )
void LibPage::ExportAsBasic( const String& aLibName )
{
// Folder picker
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference< XFolderPicker > xFolderPicker( xMSF->createInstance(
- "com.sun.star.ui.dialogs.FolderPicker" ), UNO_QUERY );
+ Reference< XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);
Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
- if( xFolderPicker.is() )
- {
- xFolderPicker->setTitle( String( IDEResId( RID_STR_EXPORTBASIC ) ) );
-
- // set display directory and filter
- String aPath =GetExtraData()->GetAddLibPath();
- if( !aPath.Len() )
- aPath = SvtPathOptions().GetWorkPath();
+ xFolderPicker->setTitle( String( IDEResId( RID_STR_EXPORTBASIC ) ) );
- // INetURLObject aURL(m_sSavePath, INET_PROT_FILE);
- xFolderPicker->setDisplayDirectory( aPath );
- short nRet = xFolderPicker->execute();
- if( nRet == RET_OK )
- {
- String aTargetURL = xFolderPicker->getDirectory();
- GetExtraData()->SetAddLibPath(aTargetURL);
+ // set display directory and filter
+ String aPath =GetExtraData()->GetAddLibPath();
+ if( !aPath.Len() )
+ aPath = SvtPathOptions().GetWorkPath();
+
+ // INetURLObject aURL(m_sSavePath, INET_PROT_FILE);
+ xFolderPicker->setDisplayDirectory( aPath );
+ short nRet = xFolderPicker->execute();
+ if( nRet == RET_OK )
+ {
+ String aTargetURL = xFolderPicker->getDirectory();
+ GetExtraData()->SetAddLibPath(aTargetURL);
- Reference< task::XInteractionHandler > xDummyHandler( new DummyInteractionHandler( xHandler ) );
- implExportLib( aLibName, aTargetURL, xDummyHandler );
- }
+ Reference< task::XInteractionHandler > xDummyHandler( new DummyInteractionHandler( xHandler ) );
+ implExportLib( aLibName, aTargetURL, xDummyHandler );
}
}
@@ -1417,7 +1412,7 @@ void LibPage::ExportAsBasic( const String& aLibName )
void LibPage::DeleteCurrent()
{
- SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aLibBox.GetCurEntry();
String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// check, if library is link
@@ -1518,7 +1513,7 @@ void LibPage::SetCurLib()
ImpInsertLibEntry( aLibName, i );
}
- SvLBoxEntry* pEntry_ = aLibBox.FindEntry( OUString( "Standard" ) );
+ SvTreeListEntry* pEntry_ = aLibBox.FindEntry( OUString( "Standard" ) );
if ( !pEntry_ )
pEntry_ = aLibBox.GetEntry( 0 );
aLibBox.SetCurEntry( pEntry_ );
@@ -1528,7 +1523,7 @@ void LibPage::SetCurLib()
//----------------------------------------------------------------------------
-SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos )
+SvTreeListEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos )
{
// check, if library is password protected
bool bProtected = false;
@@ -1543,7 +1538,7 @@ SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos
}
}
- SvLBoxEntry* pNewEntry = aLibBox.DoInsertEntry( rLibName, nPos );
+ SvTreeListEntry* pNewEntry = aLibBox.DoInsertEntry( rLibName, nPos );
pNewEntry->SetUserData( new LibUserData(m_aCurDocument) );
if (bProtected)
@@ -1620,7 +1615,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
if( pLibBox )
{
- SvLBoxEntry* pEntry = pLibBox->DoInsertEntry( aLibName );
+ SvTreeListEntry* pEntry = pLibBox->DoInsertEntry( aLibName );
pEntry->SetUserData( new LibUserData( rDocument ) );
pLibBox->SetCurEntry( pEntry );
}
@@ -1638,8 +1633,8 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
if( pBasicBox )
{
- SvLBoxEntry* pEntry = pBasicBox->GetCurEntry();
- SvLBoxEntry* pRootEntry = NULL;
+ SvTreeListEntry* pEntry = pBasicBox->GetCurEntry();
+ SvTreeListEntry* pRootEntry = NULL;
while( pEntry )
{
pRootEntry = pEntry;
@@ -1649,7 +1644,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
sal_uInt16 nMode = pBasicBox->GetMode();
bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES );
sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB;
- SvLBoxEntry* pNewLibEntry = pBasicBox->AddEntry(
+ SvTreeListEntry* pNewLibEntry = pBasicBox->AddEntry(
aLibName,
Image( IDEResId( nId ) ),
pRootEntry, false,
@@ -1659,7 +1654,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
if( pNewLibEntry )
{
- SvLBoxEntry* pEntry_ = pBasicBox->AddEntry(
+ SvTreeListEntry* pEntry_ = pBasicBox->AddEntry(
aModName,
Image( IDEResId( RID_IMG_MODULE ) ),
pNewLibEntry, false,
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 4a8cdb5e6261..cfbea3e86b0e 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -59,7 +59,7 @@ ExtTreeListBox::ExtTreeListBox (Window* pParent, ResId const& rRes) :
ExtTreeListBox::~ExtTreeListBox ()
{ }
-sal_Bool ExtTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool ExtTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
{
bool bRet = false;
@@ -70,7 +70,7 @@ sal_Bool ExtTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
EntryDescriptor aDesc = GetEntryDescriptor(pEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
- ::rtl::OUString aLibName( aDesc.GetLibName() );
+ OUString aLibName( aDesc.GetLibName() );
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( !( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) ) ||
@@ -85,7 +85,7 @@ sal_Bool ExtTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
return bRet;
}
-sal_Bool ExtTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText )
+sal_Bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText )
{
if ( !IsValidSbxName(rNewText) )
{
@@ -93,7 +93,7 @@ sal_Bool ExtTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString&
return false;
}
- rtl::OUString aCurText( GetEntryText( pEntry ) );
+ OUString aCurText( GetEntryText( pEntry ) );
if ( aCurText == rNewText )
// nothing to do
return true;
@@ -103,7 +103,7 @@ sal_Bool ExtTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString&
DBG_ASSERT( aDocument.isValid(), "ExtTreeListBox::EditedEntry: no document!" );
if ( !aDocument.isValid() )
return false;
- ::rtl::OUString aLibName( aDesc.GetLibName() );
+ OUString aLibName( aDesc.GetLibName() );
EntryType eType = aDesc.GetType();
bool bSuccess = eType == OBJ_TYPE_MODULE ?
@@ -133,7 +133,7 @@ sal_Bool ExtTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString&
}
-DragDropMode ExtTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* pEntry )
+DragDropMode ExtTreeListBox::NotifyStartDrag( TransferDataContainer&, SvTreeListEntry* pEntry )
{
DragDropMode nMode_ = SV_DRAGDROP_NONE;
@@ -145,7 +145,7 @@ DragDropMode ExtTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBoxEntr
nMode_ = SV_DRAGDROP_CTRL_COPY;
EntryDescriptor aDesc = GetEntryDescriptor(pEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
- ::rtl::OUString aLibName( aDesc.GetLibName() );
+ OUString aLibName( aDesc.GetLibName() );
// allow MOVE mode only for libraries, which are not readonly
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
@@ -173,14 +173,14 @@ DragDropMode ExtTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBoxEntr
}
-sal_Bool ExtTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
+sal_Bool ExtTreeListBox::NotifyAcceptDrop( SvTreeListEntry* pEntry )
{
// don't drop on a BasicManager (nDepth == 0)
sal_uInt16 nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0;
bool bValid = nDepth != 0;
// don't drop in the same library
- SvLBoxEntry* pSelected = FirstSelected();
+ SvTreeListEntry* pSelected = FirstSelected();
if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
bValid = false;
else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) )
@@ -192,13 +192,13 @@ sal_Bool ExtTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{
// get source module/dialog name
EntryDescriptor aSourceDesc = GetEntryDescriptor(pSelected);
- rtl::OUString aSourceName = aSourceDesc.GetName();
+ OUString aSourceName = aSourceDesc.GetName();
EntryType eSourceType = aSourceDesc.GetType();
// get target shell and target library name
EntryDescriptor aDestDesc = GetEntryDescriptor(pEntry);
ScriptDocument const& rDestDoc = aDestDesc.GetDocument();
- rtl::OUString aDestLibName = aDestDesc.GetLibName();
+ OUString aDestLibName = aDestDesc.GetLibName();
// check if module library is not loaded, readonly or password protected
Reference< script::XLibraryContainer2 > xModLibContainer( rDestDoc.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
@@ -237,15 +237,15 @@ sal_Bool ExtTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
return bValid;
}
-sal_Bool ExtTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
+sal_Bool ExtTreeListBox::NotifyMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return NotifyCopyingMoving( pTarget, pEntry,
rpNewParent, rNewChildPos, true );
}
-sal_Bool ExtTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
+sal_Bool ExtTreeListBox::NotifyCopying( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
// return false; // how do I copy an SBX?!
return NotifyCopyingMoving( pTarget, pEntry,
@@ -255,10 +255,10 @@ sal_Bool ExtTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntr
void Shell::CopyDialogResources(
Reference< io::XInputStreamProvider >& io_xISP,
ScriptDocument const& rSourceDoc,
- rtl::OUString const& rSourceLibName,
+ OUString const& rSourceLibName,
ScriptDocument const& rDestDoc,
- rtl::OUString const& rDestLibName,
- rtl::OUString const& rDlgName
+ OUString const& rDestLibName,
+ OUString const& rDlgName
)
{
if ( !io_xISP.is() )
@@ -285,7 +285,7 @@ void Shell::CopyDialogResources(
// create dialog model
Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference< container::XNameContainer > xDialogModel = Reference< container::XNameContainer >( xMSF->createInstance
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
+ ( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY );
Reference< io::XInputStream > xInput( io_xISP->createInputStream() );
Reference< XComponentContext > xContext(
comphelper::getComponentContext( xMSF ) );
@@ -311,8 +311,8 @@ void Shell::CopyDialogResources(
}
-sal_Bool ExtTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove )
+sal_Bool ExtTreeListBox::NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove )
{
(void)pEntry;
DBG_ASSERT( pEntry, "Kein Eintrag?" ); // ASS is ok here, should not be reached
@@ -335,13 +335,13 @@ sal_Bool ExtTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry*
// get target shell and target library name
EntryDescriptor aDestDesc = GetEntryDescriptor(rpNewParent);
const ScriptDocument& rDestDoc( aDestDesc.GetDocument() );
- ::rtl::OUString aDestLibName( aDestDesc.GetLibName() );
+ OUString aDestLibName( aDestDesc.GetLibName() );
// get source shell, library name and module/dialog name
EntryDescriptor aSourceDesc = GetEntryDescriptor(FirstSelected());
const ScriptDocument rSourceDoc( aSourceDesc.GetDocument() );
- ::rtl::OUString aSourceLibName( aSourceDesc.GetLibName() );
- ::rtl::OUString aSourceName( aSourceDesc.GetName() );
+ OUString aSourceLibName( aSourceDesc.GetLibName() );
+ OUString aSourceName( aSourceDesc.GetName() );
EntryType eType = aSourceDesc.GetType();
// get dispatcher
@@ -365,7 +365,7 @@ sal_Bool ExtTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry*
if ( eType == OBJ_TYPE_MODULE ) // module
{
// get module
- ::rtl::OUString aModule;
+ OUString aModule;
if ( rSourceDoc.getModule( aSourceLibName, aSourceName, aModule ) )
{
// remove module from source library
@@ -412,7 +412,7 @@ sal_Bool ExtTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry*
if ( eType == OBJ_TYPE_MODULE ) // module
{
// get module
- ::rtl::OUString aModule;
+ OUString aModule;
if ( rSourceDoc.getModule( aSourceLibName, aSourceName, aModule ) )
{
// insert module into target library
@@ -606,11 +606,11 @@ void ObjectPage::DeactivatePage()
void ObjectPage::CheckButtons()
{
// enable/disable edit button
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
- ::rtl::OUString aLibName( aDesc.GetLibName() );
- ::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
+ OUString aLibName( aDesc.GetLibName() );
+ OUString aLibSubName( aDesc.GetLibSubName() );
bool bVBAEnabled = aDocument.isInVBAMode();
sal_uInt16 nMode = aBasicBox.GetMode();
@@ -679,14 +679,14 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
SFX_APP()->ExecuteSlot( aRequest );
SfxDispatcher* pDispatcher = GetDispatcher();
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
DBG_ASSERT( pCurEntry, "Entry?!" );
if ( aBasicBox.GetModel()->GetDepth( pCurEntry ) >= 2 )
{
EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
if ( pDispatcher )
{
- ::rtl::OUString aModName( aDesc.GetName() );
+ OUString aModName( aDesc.GetName() );
// extract the module name from the string like "Sheet1 (Example1)"
if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
{
@@ -702,7 +702,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
{
DBG_ASSERT( aBasicBox.GetModel()->GetDepth( pCurEntry ) == 1, "Kein LibEntry?!" );
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
- SvLBoxEntry* pParentEntry = aBasicBox.GetParent( pCurEntry );
+ SvTreeListEntry* pParentEntry = aBasicBox.GetParent( pCurEntry );
if ( pParentEntry )
{
DocumentEntry* pDocumentEntry = (DocumentEntry*)pParentEntry->GetUserData();
@@ -710,7 +710,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
aDocument = pDocumentEntry->GetDocument();
}
SfxUsrAnyItem aDocItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( aDocument.getDocumentOrNull() ) );
- ::rtl::OUString aLibName( aBasicBox.GetEntryText( pCurEntry ) );
+ OUString aLibName( aBasicBox.GetEntryText( pCurEntry ) );
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
if ( pDispatcher )
{
@@ -731,16 +731,16 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
return 0;
}
-bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibName )
+bool ObjectPage::GetSelection( ScriptDocument& rDocument, OUString& rLibName )
{
bool bRet = false;
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
rDocument = aDesc.GetDocument();
rLibName = aDesc.GetLibName();
if ( rLibName.isEmpty() )
- rLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ rLibName = "Standard" ;
DBG_ASSERT( rDocument.isAlive(), "ObjectPage::GetSelection: no or dead ScriptDocument in the selection!" );
if ( !rDocument.isAlive() )
@@ -748,7 +748,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibN
// check if the module library is loaded
bool bOK = true;
- ::rtl::OUString aLibName( rLibName );
+ OUString aLibName( rLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) )
{
@@ -756,7 +756,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibN
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
- ::rtl::OUString aPassword;
+ OUString aPassword;
bOK = QueryPassword( xModLibContainer, rLibName, aPassword );
}
@@ -783,11 +783,11 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibN
void ObjectPage::NewModule()
{
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
- ::rtl::OUString aLibName;
+ OUString aLibName;
if ( GetSelection( aDocument, aLibName ) )
{
- ::rtl::OUString aModName;
+ OUString aModName;
createModImpl( static_cast<Window*>( this ), aDocument,
aBasicBox, aLibName, aModName, true );
}
@@ -796,7 +796,7 @@ void ObjectPage::NewModule()
void ObjectPage::NewDialog()
{
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
- ::rtl::OUString aLibName;
+ OUString aLibName;
if ( GetSelection( aDocument, aLibName ) )
{
@@ -807,7 +807,7 @@ void ObjectPage::NewDialog()
if (aNewDlg.Execute() != 0)
{
- rtl::OUString aDlgName = aNewDlg.GetObjectName();
+ OUString aDlgName = aNewDlg.GetObjectName();
if (aDlgName.isEmpty())
aDlgName = aDocument.createObjectName( E_DIALOGS, aLibName);
@@ -827,18 +827,18 @@ void ObjectPage::NewDialog()
pDispatcher->Execute( SID_BASICIDE_SBXINSERTED,
SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
- SvLBoxEntry* pRootEntry = aBasicBox.FindRootEntry( aDocument, eLocation );
+ SvTreeListEntry* pRootEntry = aBasicBox.FindRootEntry( aDocument, eLocation );
if ( pRootEntry )
{
if ( !aBasicBox.IsExpanded( pRootEntry ) )
aBasicBox.Expand( pRootEntry );
- SvLBoxEntry* pLibEntry = aBasicBox.FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
+ SvTreeListEntry* pLibEntry = aBasicBox.FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
if ( pLibEntry )
{
if ( !aBasicBox.IsExpanded( pLibEntry ) )
aBasicBox.Expand( pLibEntry );
- SvLBoxEntry* pEntry = aBasicBox.FindEntry( pLibEntry, aDlgName, OBJ_TYPE_DIALOG );
+ SvTreeListEntry* pEntry = aBasicBox.FindEntry( pLibEntry, aDlgName, OBJ_TYPE_DIALOG );
if ( !pEntry )
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -862,15 +862,15 @@ void ObjectPage::NewDialog()
void ObjectPage::DeleteCurrent()
{
- SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
DBG_ASSERT( pCurEntry, "Kein aktueller Eintrag!" );
EntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( pCurEntry ) );
ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isAlive(), "ObjectPage::DeleteCurrent: no document!" );
if ( !aDocument.isAlive() )
return;
- ::rtl::OUString aLibName( aDesc.GetLibName() );
- ::rtl::OUString aName( aDesc.GetName() );
+ OUString aLibName( aDesc.GetLibName() );
+ OUString aName( aDesc.GetName() );
EntryType eType = aDesc.GetType();
if ( ( eType == OBJ_TYPE_MODULE && QueryDelModule( aName, this ) ) ||
@@ -933,16 +933,16 @@ LibDialog::~LibDialog()
{
}
-void LibDialog::SetStorageName( const ::rtl::OUString& rName )
+void LibDialog::SetStorageName( const OUString& rName )
{
- ::rtl::OUString aName( IDE_RESSTR(RID_STR_FILENAME) );
+ OUString aName( IDE_RESSTR(RID_STR_FILENAME) );
aName += rName;
aStorageName.SetText( aName );
}
// Helper function
SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
- TreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain )
+ TreeListBox& rBasicBox, const OUString& rLibName, OUString aModName, bool bMain )
{
OSL_ENSURE( rDocument.isAlive(), "createModImpl: invalid document!" );
if ( !rDocument.isAlive() )
@@ -950,9 +950,9 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
SbModule* pModule = NULL;
- ::rtl::OUString aLibName( rLibName );
+ OUString aLibName( rLibName );
if ( aLibName.isEmpty() )
- aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ aLibName = "Standard" ;
rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
if ( aModName.isEmpty() )
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
@@ -967,7 +967,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
try
{
- ::rtl::OUString sModuleCode;
+ OUString sModuleCode;
// the module has existed
if( rDocument.hasModule( aLibName, aModName ) )
return NULL;
@@ -981,22 +981,22 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
pDispatcher->Execute( SID_BASICIDE_SBXINSERTED,
SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
LibraryLocation eLocation = rDocument.getLibraryLocation( aLibName );
- SvLBoxEntry* pRootEntry = rBasicBox.FindRootEntry( rDocument, eLocation );
+ SvTreeListEntry* pRootEntry = rBasicBox.FindRootEntry( rDocument, eLocation );
if ( pRootEntry )
{
if ( !rBasicBox.IsExpanded( pRootEntry ) )
rBasicBox.Expand( pRootEntry );
- SvLBoxEntry* pLibEntry = rBasicBox.FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
+ SvTreeListEntry* pLibEntry = rBasicBox.FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
if ( pLibEntry )
{
if ( !rBasicBox.IsExpanded( pLibEntry ) )
rBasicBox.Expand( pLibEntry );
- SvLBoxEntry* pSubRootEntry = pLibEntry;
+ SvTreeListEntry* pSubRootEntry = pLibEntry;
if( pBasic && rDocument.isInVBAMode() )
{
// add the new module in the "Modules" entry
- SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, IDE_RESSTR(RID_STR_NORMAL_MODULES) , OBJ_TYPE_NORMAL_MODULES );
+ SvTreeListEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, IDE_RESSTR(RID_STR_NORMAL_MODULES) , OBJ_TYPE_NORMAL_MODULES );
if( pLibSubEntry )
{
if( !rBasicBox.IsExpanded( pLibSubEntry ) )
@@ -1005,7 +1005,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
}
}
- SvLBoxEntry* pEntry = rBasicBox.FindEntry( pSubRootEntry, aModName, OBJ_TYPE_MODULE );
+ SvTreeListEntry* pEntry = rBasicBox.FindEntry( pSubRootEntry, aModName, OBJ_TYPE_MODULE );
if ( !pEntry )
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 71f6e66c9554..34de345f8964 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -104,18 +104,18 @@ public:
class ExtTreeListBox : public TreeListBox
{
protected:
- virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
+ virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& rSel );
+ virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
- virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* pEntry );
- virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* pEntry );
+ virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvTreeListEntry* pEntry );
+ virtual sal_Bool NotifyAcceptDrop( SvTreeListEntry* pEntry );
- virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
- virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
- sal_Bool NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove );
+ virtual sal_Bool NotifyMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos );
+ virtual sal_Bool NotifyCopying( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos );
+ sal_Bool NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove );
public:
ExtTreeListBox( Window* pParent, const ResId& rRes );
@@ -134,15 +134,15 @@ public:
CheckBox( Window* pParent, const ResId& rResId );
~CheckBox();
- SvLBoxEntry* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND );
- SvLBoxEntry* FindEntry( const String& rName );
+ SvTreeListEntry* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND );
+ SvTreeListEntry* FindEntry( const String& rName );
void CheckEntryPos( sal_uLong nPos );
bool IsChecked( sal_uLong nPos ) const;
- virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind );
- virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
+ virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind);
+ virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& rSel );
+ virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
@@ -165,7 +165,7 @@ public:
LibDialog( Window* pParent );
~LibDialog();
- void SetStorageName( const ::rtl::OUString& rName );
+ void SetStorageName( const OUString& rName );
CheckBox& GetLibBox() { return aLibBox; }
bool IsReference() const { return aReferenceBox.IsChecked(); }
@@ -205,7 +205,7 @@ protected:
DECL_LINK( BasicBoxHighlightHdl, TreeListBox * );
DECL_LINK( ButtonHdl, Button * );
void CheckButtons();
- bool GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibName );
+ bool GetSelection( ScriptDocument& rDocument, OUString& rLibName );
void DeleteCurrent();
void NewModule();
void NewDialog();
@@ -259,7 +259,7 @@ protected:
void FillListBox();
void InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
void SetCurLib();
- SvLBoxEntry* ImpInsertLibEntry( const String& rLibName, sal_uLong nPos );
+ SvTreeListEntry* ImpInsertLibEntry( const String& rLibName, sal_uLong nPos );
virtual void ActivatePage();
virtual void DeactivatePage();
@@ -274,7 +274,7 @@ public:
// Helper functions
SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
- TreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain = false );
+ TreeListBox& rBasicBox, const OUString& rLibName, OUString aModName, bool bMain = false );
void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
CheckBox* pLibBox, TreeListBox* pBasicBox );
diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx
index 563cc6246de9..15b751074f6c 100644
--- a/basctl/source/basicide/register.cxx
+++ b/basctl/source/basicide/register.cxx
@@ -29,7 +29,6 @@
namespace basctl
{
-using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx
index a53b1b28323a..75ff877b192f 100644
--- a/basctl/source/basicide/sbxitem.cxx
+++ b/basctl/source/basicide/sbxitem.cxx
@@ -25,8 +25,8 @@ namespace basctl
SbxItem::SbxItem (
sal_uInt16 nWhichItem,
ScriptDocument const& rDocument,
- rtl::OUString const& aLibName,
- rtl::OUString const& aName,
+ OUString const& aLibName,
+ OUString const& aName,
ItemType eType
) :
SfxPoolItem(nWhichItem),
@@ -39,9 +39,9 @@ SbxItem::SbxItem (
SbxItem::SbxItem (
sal_uInt16 nWhichItem,
ScriptDocument const& rDocument,
- rtl::OUString const& aLibName,
- rtl::OUString const& aName,
- rtl::OUString const& aMethodName,
+ OUString const& aLibName,
+ OUString const& aName,
+ OUString const& aMethodName,
ItemType eType
) :
SfxPoolItem(nWhichItem),
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index cdf91fbc37e5..3826f5a31783 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -25,7 +25,7 @@
#include "doceventnotifier.hxx"
#include "documentenumeration.hxx"
-#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -88,6 +88,7 @@ namespace basctl
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::script::XLibraryContainer2;
using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::uri::UriReferenceFactory;
using ::com::sun::star::uri::XUriReferenceFactory;
using ::com::sun::star::uri::XUriReference;
using ::com::sun::star::uno::XComponentContext;
@@ -231,7 +232,7 @@ namespace basctl
getLibraryContainer( LibraryContainerType _eType ) const;
/// determines whether a given library is part of the shared installation
- bool isLibraryShared( const ::rtl::OUString& _rLibName, LibraryContainerType _eType );
+ bool isLibraryShared( const OUString& _rLibName, LibraryContainerType _eType );
/** returns the current frame of the document
@@ -252,30 +253,28 @@ namespace basctl
bool isDocumentModified() const;
bool saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const;
- ::rtl::OUString
- getTitle() const;
- ::rtl::OUString
- getURL() const;
+ OUString getTitle() const;
+ OUString getURL() const;
bool allowMacros() const;
Reference< XNameContainer >
- getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((NoSuchElementException));
- bool hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ bool hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
Reference< XNameContainer >
- getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
- void loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary );
+ void loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary );
- bool removeModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName );
- bool hasModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const;
- bool getModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, Any& _out_rModuleOrDialog );
- bool renameModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel );
- bool createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const;
- bool insertModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rObjectName, const ::rtl::OUString& _rModName, const Any& _rElement ) const;
- bool updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const;
- bool createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const;
+ bool removeModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModuleName );
+ bool hasModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModName ) const;
+ bool getModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rObjectName, Any& _out_rModuleOrDialog );
+ bool renameModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel );
+ bool createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const;
+ bool insertModuleOrDialog( LibraryContainerType _eType, const OUString& _rObjectName, const OUString& _rModName, const Any& _rElement ) const;
+ bool updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const;
+ bool createDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const;
protected:
// DocumentEventListener
@@ -447,7 +446,7 @@ namespace basctl
}
- Reference< XNameContainer > ScriptDocument::Impl::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ Reference< XNameContainer > ScriptDocument::Impl::getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((NoSuchElementException))
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::getLibrary: invalid state!" );
@@ -482,7 +481,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ bool ScriptDocument::Impl::hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
bool bHas = false;
try
@@ -498,7 +497,7 @@ namespace basctl
}
- Reference< XNameContainer > ScriptDocument::Impl::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ Reference< XNameContainer > ScriptDocument::Impl::getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
Reference< XNameContainer > xLibrary;
try
@@ -520,7 +519,7 @@ namespace basctl
}
- void ScriptDocument::Impl::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary )
+ void ScriptDocument::Impl::loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary )
{
try
{
@@ -535,7 +534,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::removeModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName )
+ bool ScriptDocument::Impl::removeModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModuleName )
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::removeModuleOrDialog: invalid!" );
if ( isValid() )
@@ -558,7 +557,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::hasModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const
+ bool ScriptDocument::Impl::hasModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rModName ) const
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::hasModuleOrDialog: invalid!" );
if ( !isValid() )
@@ -578,7 +577,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::getModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, Any& _out_rModuleOrDialog )
+ bool ScriptDocument::Impl::getModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rObjectName, Any& _out_rModuleOrDialog )
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::getModuleOrDialog: invalid!" );
if ( !isValid() )
@@ -602,8 +601,8 @@ namespace basctl
}
- bool ScriptDocument::Impl::renameModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName,
- const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel )
+ bool ScriptDocument::Impl::renameModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName,
+ const OUString& _rOldName, const OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel )
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::renameModuleOrDialog: invalid!" );
if ( !isValid() )
@@ -675,9 +674,9 @@ namespace basctl
}
- bool ScriptDocument::Impl::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const
+ bool ScriptDocument::Impl::createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const
{
- _out_rNewModuleCode = ::rtl::OUString();
+ _out_rNewModuleCode = OUString();
try
{
Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, true ) );
@@ -685,9 +684,9 @@ namespace basctl
return false;
// create new module
- _out_rNewModuleCode = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "REM ***** BASIC *****\n\n" ) );
+ _out_rNewModuleCode = "REM ***** BASIC *****\n\n" ;
if ( _bCreateMain )
- _out_rNewModuleCode += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Sub Main\n\nEnd Sub\n" ) );
+ _out_rNewModuleCode += "Sub Main\n\nEnd Sub\n" ;
// insert module into library
xLib->insertByName( _rModName, makeAny( _out_rNewModuleCode ) );
@@ -702,7 +701,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::insertModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, const Any& _rElement ) const
+ bool ScriptDocument::Impl::insertModuleOrDialog( LibraryContainerType _eType, const OUString& _rLibName, const OUString& _rObjectName, const Any& _rElement ) const
{
try
{
@@ -721,7 +720,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const
+ bool ScriptDocument::Impl::updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const
{
try
{
@@ -739,7 +738,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
+ bool ScriptDocument::Impl::createDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
{
try
{
@@ -823,21 +822,21 @@ namespace basctl
if ( _rxStatusIndicator.is() )
{
aArgs.realloc(1);
- aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) );
+ aArgs[0].Name = "StatusIndicator" ;
aArgs[0].Value <<= _rxStatusIndicator;
}
try
{
URL aURL;
- aURL.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Save" ) );
+ aURL.Complete = ".uno:Save" ;
aURL.Main = aURL.Complete;
- aURL.Protocol = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) );
- aURL.Path = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Save" ) );
+ aURL.Protocol = ".uno:" ;
+ aURL.Path = "Save" ;
Reference< XDispatchProvider > xDispProv( xFrame, UNO_QUERY_THROW );
Reference< XDispatch > xDispatch(
- xDispProv->queryDispatch( aURL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_self" ) ), FrameSearchFlag::AUTO ),
+ xDispProv->queryDispatch( aURL, "_self", FrameSearchFlag::AUTO ),
UNO_SET_THROW );
xDispatch->dispatch( aURL, aArgs );
@@ -852,11 +851,11 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::Impl::getTitle() const
+ OUString ScriptDocument::Impl::getTitle() const
{
OSL_PRECOND( isValid() && isDocument(), "ScriptDocument::Impl::getTitle: for documents only!" );
- ::rtl::OUString sTitle;
+ OUString sTitle;
if ( isValid() && isDocument() )
{
sTitle = ::comphelper::DocumentInfo::getDocumentTitle( m_xDocument );
@@ -865,11 +864,11 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::Impl::getURL() const
+ OUString ScriptDocument::Impl::getURL() const
{
OSL_PRECOND( isValid() && isDocument(), "ScriptDocument::Impl::getURL: for documents only!" );
- ::rtl::OUString sURL;
+ OUString sURL;
if ( isValid() && isDocument() )
{
try
@@ -926,7 +925,7 @@ namespace basctl
}
- bool ScriptDocument::Impl::isLibraryShared( const ::rtl::OUString& _rLibName, LibraryContainerType _eType )
+ bool ScriptDocument::Impl::isLibraryShared( const OUString& _rLibName, LibraryContainerType _eType )
{
bool bIsShared = false;
try
@@ -935,36 +934,28 @@ namespace basctl
if ( !xLibContainer->hasByName( _rLibName ) || !xLibContainer->isLibraryLink( _rLibName ) )
return false;
- ::rtl::OUString aFileURL;
- Reference< XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference< XUriReferenceFactory > xUriFac;
- if ( xMSF.is() )
- {
- xUriFac.set(
- xMSF->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uri.UriReferenceFactory" ) ) ),
- UNO_QUERY_THROW );
- }
+ OUString aFileURL;
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference< XUriReferenceFactory > xUriFac = UriReferenceFactory::create(xContext);
- ::rtl::OUString aLinkURL( xLibContainer->getLibraryLinkURL( _rLibName ) );
+ OUString aLinkURL( xLibContainer->getLibraryLinkURL( _rLibName ) );
Reference< XUriReference > xUriRef( xUriFac->parse( aLinkURL ), UNO_QUERY_THROW );
- ::rtl::OUString aScheme = xUriRef->getScheme();
+ OUString aScheme = xUriRef->getScheme();
if ( aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("file")) )
{
aFileURL = aLinkURL;
}
else if ( aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.pkg")) )
{
- ::rtl::OUString aAuthority = xUriRef->getAuthority();
- if ( aAuthority.matchIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.expand:" ) ) )
+ OUString aAuthority = xUriRef->getAuthority();
+ if ( aAuthority.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.expand:")) )
{
- ::rtl::OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) );
+ OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) );
aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- Reference< XComponentContext > xContext(
- comphelper::getComponentContext( xMSF ) );
Reference< XMacroExpander > xMacroExpander(
xContext->getValueByName(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ),
+ "/singletons/com.sun.star.util.theMacroExpander" ),
UNO_QUERY_THROW );
aFileURL = xMacroExpander->expandMacros( aDecodedURL );
}
@@ -976,11 +967,11 @@ namespace basctl
::osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL );
OSL_VERIFY( ::osl::DirectoryItem::get( aFileURL, aFileItem ) == ::osl::FileBase::E_None );
OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None );
- ::rtl::OUString aCanonicalFileURL( aFileStatus.getFileURL() );
+ OUString aCanonicalFileURL( aFileStatus.getFileURL() );
- ::rtl::OUString aSearchURL1( RTL_CONSTASCII_USTRINGPARAM( "share/basic" ) );
- ::rtl::OUString aSearchURL2( RTL_CONSTASCII_USTRINGPARAM( "share/uno_packages" ) );
- ::rtl::OUString aSearchURL3( RTL_CONSTASCII_USTRINGPARAM( "share/extensions" ) );
+ OUString aSearchURL1( "share/basic" );
+ OUString aSearchURL2( "share/uno_packages" );
+ OUString aSearchURL3( "share/extensions" );
if( aCanonicalFileURL.indexOf( aSearchURL1 ) >= 0 ||
aCanonicalFileURL.indexOf( aSearchURL2 ) >= 0 ||
aCanonicalFileURL.indexOf( aSearchURL3 ) >= 0 )
@@ -1120,7 +1111,7 @@ namespace basctl
}
- ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption )
+ ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption )
{
ScriptDocument aDocument( getApplicationScriptDocument() );
if ( _rUrlOrCaption.isEmpty() )
@@ -1241,34 +1232,34 @@ namespace basctl
}
- Reference< XNameContainer > ScriptDocument::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ Reference< XNameContainer > ScriptDocument::getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((NoSuchElementException))
{
return m_pImpl->getLibrary( _eType, _rLibName, _bLoadLibrary );
}
- bool ScriptDocument::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ bool ScriptDocument::hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
return m_pImpl->hasLibrary( _eType, _rLibName );
}
- Reference< XNameContainer > ScriptDocument::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ Reference< XNameContainer > ScriptDocument::getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const
{
return m_pImpl->getOrCreateLibrary( _eType, _rLibName );
}
- void ScriptDocument::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary )
+ void ScriptDocument::loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary )
{
m_pImpl->loadLibraryIfExists( _eType, _rLibrary );
}
- Sequence< ::rtl::OUString > ScriptDocument::getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ Sequence< OUString > ScriptDocument::getObjectNames( LibraryContainerType _eType, const OUString& _rLibName ) const
{
- Sequence< ::rtl::OUString > aModuleNames;
+ Sequence< OUString > aModuleNames;
try
{
@@ -1291,25 +1282,23 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const
+ OUString ScriptDocument::createObjectName( LibraryContainerType _eType, const OUString& _rLibName ) const
{
- ::rtl::OUString aObjectName;
+ OUString aObjectName;
- ::rtl::OUString aBaseName = _eType == E_SCRIPTS
- ? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Module" ) )
- : ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dialog" ) );
+ OUString aBaseName = _eType == E_SCRIPTS ? OUString("Module") : OUString("Dialog");
- Sequence< ::rtl::OUString > aUsedNames( getObjectNames( _eType, _rLibName ) );
- ::std::set< ::rtl::OUString > aUsedNamesCheck;
+ Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) );
+ ::std::set< OUString > aUsedNamesCheck;
::std::copy( aUsedNames.getConstArray(), aUsedNames.getConstArray() + aUsedNames.getLength(),
- ::std::insert_iterator< ::std::set< ::rtl::OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) );
+ ::std::insert_iterator< ::std::set< OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) );
bool bValid = false;
sal_Int32 i = 1;
while ( !bValid )
{
aObjectName = aBaseName;
- aObjectName += ::rtl::OUString::valueOf( i );
+ aObjectName += OUString::valueOf( i );
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
bValid = true;
@@ -1321,7 +1310,7 @@ namespace basctl
}
- Sequence< ::rtl::OUString > ScriptDocument::getLibraryNames() const
+ Sequence< OUString > ScriptDocument::getLibraryNames() const
{
return GetMergedLibraryNames( getLibraryContainer( E_SCRIPTS ), getLibraryContainer( E_DIALOGS ) );
}
@@ -1364,19 +1353,19 @@ namespace basctl
}
- bool ScriptDocument::removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const
+ bool ScriptDocument::removeModule( const OUString& _rLibName, const OUString& _rModuleName ) const
{
return m_pImpl->removeModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName );
}
- bool ScriptDocument::hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const
+ bool ScriptDocument::hasModule( const OUString& _rLibName, const OUString& _rModuleName ) const
{
return m_pImpl->hasModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName );
}
- bool ScriptDocument::getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _out_rModuleSource ) const
+ bool ScriptDocument::getModule( const OUString& _rLibName, const OUString& _rModName, OUString& _out_rModuleSource ) const
{
Any aCode;
if ( !m_pImpl->getModuleOrDialog( E_SCRIPTS, _rLibName, _rModName, aCode ) )
@@ -1386,13 +1375,13 @@ namespace basctl
}
- bool ScriptDocument::renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const
+ bool ScriptDocument::renameModule( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName ) const
{
return m_pImpl->renameModuleOrDialog( E_SCRIPTS, _rLibName, _rOldName, _rNewName, NULL );
}
- bool ScriptDocument::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const
+ bool ScriptDocument::createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const
{
if ( !m_pImpl->createModule( _rLibName, _rModName, _bCreateMain, _out_rNewModuleCode ) )
return false;
@@ -1403,31 +1392,31 @@ namespace basctl
}
- bool ScriptDocument::insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const
+ bool ScriptDocument::insertModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const
{
return m_pImpl->insertModuleOrDialog( E_SCRIPTS, _rLibName, _rModName, makeAny( _rModuleCode ) );
}
- bool ScriptDocument::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const
+ bool ScriptDocument::updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const
{
return m_pImpl->updateModule( _rLibName, _rModName, _rModuleCode );
}
- bool ScriptDocument::removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const
+ bool ScriptDocument::removeDialog( const OUString& _rLibName, const OUString& _rDialogName ) const
{
return m_pImpl->removeModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName );
}
- bool ScriptDocument::hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const
+ bool ScriptDocument::hasDialog( const OUString& _rLibName, const OUString& _rDialogName ) const
{
return m_pImpl->hasModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName );
}
- bool ScriptDocument::getDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
+ bool ScriptDocument::getDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
{
Any aCode;
if ( !m_pImpl->getModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName, aCode ) )
@@ -1437,13 +1426,13 @@ namespace basctl
}
- bool ScriptDocument::renameDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) const
+ bool ScriptDocument::renameDialog( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) const
{
return m_pImpl->renameModuleOrDialog( E_DIALOGS, _rLibName, _rOldName, _rNewName, _rxExistingDialogModel );
}
- bool ScriptDocument::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
+ bool ScriptDocument::createDialog( const OUString& _rLibName, const OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const
{
if ( !m_pImpl->createDialog( _rLibName, _rDialogName, _out_rDialogProvider ) )
return false;
@@ -1453,7 +1442,7 @@ namespace basctl
}
- bool ScriptDocument::insertDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, const Reference< XInputStreamProvider >& _rxDialogProvider ) const
+ bool ScriptDocument::insertDialog( const OUString& _rLibName, const OUString& _rDialogName, const Reference< XInputStreamProvider >& _rxDialogProvider ) const
{
return m_pImpl->insertModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName, makeAny( _rxDialogProvider ) );
}
@@ -1477,7 +1466,7 @@ namespace basctl
}
- LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const
+ LibraryLocation ScriptDocument::getLibraryLocation( const OUString& _rLibName ) const
{
LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
if ( !_rLibName.isEmpty() )
@@ -1505,9 +1494,9 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::getTitle( LibraryLocation _eLocation, LibraryType _eType ) const
+ OUString ScriptDocument::getTitle( LibraryLocation _eLocation, LibraryType _eType ) const
{
- ::rtl::OUString aTitle;
+ OUString aTitle;
switch ( _eLocation )
{
@@ -1546,13 +1535,13 @@ namespace basctl
}
- ::rtl::OUString ScriptDocument::getTitle() const
+ OUString ScriptDocument::getTitle() const
{
return m_pImpl->getTitle();
}
- ::rtl::OUString ScriptDocument::getURL() const
+ OUString ScriptDocument::getURL() const
{
return m_pImpl->getURL();
}
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index 11d8068829c2..1396e22bbc99 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star::uno;
namespace
{
- rtl::OUString aSubToolBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertcontrolsbar" ) );
+ OUString aSubToolBarResName( "private:resource/toolbar/insertcontrolsbar" );
}
SFX_IMPL_TOOLBOX_CONTROL( TbxControls, SfxAllEnumItem )
@@ -107,8 +107,8 @@ void TbxControls::StateChanged( sal_uInt16 nSID, SfxItemState eState,
}
if( nTemp )
{
- rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
- aSlotURL += rtl::OUString::valueOf( sal_Int32( nTemp ));
+ OUString aSlotURL( "slot:" );
+ aSlotURL += OUString::valueOf( sal_Int32( nTemp ));
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages()
diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx
index 6825aa228466..0ee8f3ade7a0 100644
--- a/basctl/source/basicide/unomodel.cxx
+++ b/basctl/source/basicide/unomodel.cxx
@@ -31,7 +31,6 @@
namespace basctl
{
-using ::rtl::OUString;
using namespace ::cppu;
using namespace ::std;
using namespace ::com::sun::star;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index d4b8c5f12b85..d56814fcd7d9 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -53,11 +53,10 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
-using ::rtl::OUString;
-static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
-static ::rtl::OUString aDecorationPropName( RTL_CONSTASCII_USTRINGPARAM( "Decoration" ));
-static ::rtl::OUString aTitlePropName( RTL_CONSTASCII_USTRINGPARAM( "Title" ));
+static OUString aResourceResolverPropName( "ResourceResolver" );
+static OUString aDecorationPropName( "Decoration" );
+static OUString aTitlePropName( "Title" );
//============================================================================
@@ -90,7 +89,7 @@ void DlgEditor::ShowDialog()
uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
// create a dialog
- uno::Reference< awt::XControl > xDlg( xMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialog" ) ) ), uno::UNO_QUERY );
+ uno::Reference< awt::XControl > xDlg( xMSF->createInstance( "com.sun.star.awt.UnoControlDialog" ), uno::UNO_QUERY );
// clone the dialog model
uno::Reference< util::XCloneable > xC( m_xUnoControlDialogModel, uno::UNO_QUERY );
@@ -123,7 +122,7 @@ void DlgEditor::ShowDialog()
if( !bDecoration )
{
xNewDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) );
- xNewDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( ::rtl::OUString() ) );
+ xNewDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( OUString() ) );
}
}
catch(const UnknownPropertyException& )
@@ -134,7 +133,7 @@ void DlgEditor::ShowDialog()
xDlg->setModel( xDlgMod );
// create a peer
- uno::Reference< awt::XToolkit> xToolkit( xMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.ExtToolkit" ) ) ), uno::UNO_QUERY );
+ uno::Reference< awt::XToolkit> xToolkit( xMSF->createInstance( "com.sun.star.awt.ExtToolkit" ), uno::UNO_QUERY );
xDlg->createPeer( xToolkit, rWindow.GetComponentInterface() );
uno::Reference< awt::XDialog > xD( xDlg, uno::UNO_QUERY );
@@ -206,18 +205,18 @@ DlgEditor::DlgEditor (
SdrLayerAdmin& rAdmin = pDlgEdModel->GetLayerAdmin();
rAdmin.NewLayer( rAdmin.GetControlLayerName() );
- rAdmin.NewLayer( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")) );
+ rAdmin.NewLayer( OUString( "HiddenLayer" ) );
pDlgEdModel->InsertPage(pDlgEdPage);
// set clipboard data flavors
- m_ClipboardDataFlavors[0].MimeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.xml.dialog" ));
- m_ClipboardDataFlavors[0].HumanPresentableName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dialog 6.0" ));
+ m_ClipboardDataFlavors[0].MimeType = "application/vnd.sun.xml.dialog" ;
+ m_ClipboardDataFlavors[0].HumanPresentableName = "Dialog 6.0" ;
m_ClipboardDataFlavors[0].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 );
m_ClipboardDataFlavorsResource[0] = m_ClipboardDataFlavors[0];
- m_ClipboardDataFlavorsResource[1].MimeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.xml.dialogwithresource" ));
- m_ClipboardDataFlavorsResource[1].HumanPresentableName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dialog 8.0" ));
+ m_ClipboardDataFlavorsResource[1].MimeType = "application/vnd.sun.xml.dialogwithresource" ;
+ m_ClipboardDataFlavorsResource[1].HumanPresentableName = "Dialog 8.0" ;
m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( (const Sequence< sal_Int8 >*) 0 );
aPaintTimer.SetTimeout( 1 );
@@ -230,7 +229,7 @@ DlgEditor::DlgEditor (
pDlgEdPage->SetSize( rWindow.PixelToLogic( Size(DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN) ) );
pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0));
- pDlgEdView->SetLayerVisible( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")), false );
+ pDlgEdView->SetLayerVisible( OUString( "HiddenLayer" ), false );
pDlgEdView->SetMoveSnapOnlyTopLeft(true);
pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) );
@@ -371,8 +370,8 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
if ( xNameAcc.is() )
{
// get sequence of control names
- Sequence< ::rtl::OUString > aNames = xNameAcc->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xNameAcc->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
// create a map of tab indices and control names, sorted by tab index
@@ -380,7 +379,7 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
for ( sal_Int32 i = 0; i < nCtrls; ++i )
{
// get name
- ::rtl::OUString aName( pNames[i] );
+ OUString aName( pNames[i] );
// get tab index
sal_Int16 nTabIndex = -1;
@@ -437,7 +436,7 @@ Reference< util::XNumberFormatsSupplier > const & DlgEditor::GetNumberFormatsSup
{
Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference< util::XNumberFormatsSupplier > xSupplier( xMSF->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatsSupplier") ) ), UNO_QUERY );
+ "com.sun.star.util.NumberFormatsSupplier" ), UNO_QUERY );
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !m_xSupplier.is() )
@@ -716,7 +715,7 @@ void DlgEditor::Copy()
if (pDlgEdObj && !dynamic_cast<DlgEdForm*>(pDlgEdObj))
{
- ::rtl::OUString aName;
+ OUString aName;
Reference< beans::XPropertySet > xMarkPSet(pDlgEdObj->GetUnoControlModel(), uno::UNO_QUERY);
if (xMarkPSet.is())
{
@@ -874,9 +873,8 @@ void DlgEditor::Paste()
{
// create clipboard dialog model from xml
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
- Reference< container::XNameContainer > xClipDialogModel( xMSF->createInstance
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ),
- uno::UNO_QUERY );
+ Reference< container::XNameContainer > xClipDialogModel( xMSF->createInstance(
+ "com.sun.star.awt.UnoControlDialogModel" ), uno::UNO_QUERY );
bool bSourceIsLocalized = false;
Sequence< sal_Int8 > DialogModelBytes;
@@ -936,7 +934,7 @@ void DlgEditor::Paste()
{
Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory();
xStringResourcePersistence = Reference< resource::XStringResourcePersistence >( xSMgr->createInstance
- ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.resource.StringResource" )) ), UNO_QUERY );
+ ( "com.sun.star.resource.StringResource" ), UNO_QUERY );
if( xStringResourcePersistence.is() )
xStringResourcePersistence->importBinary( aResData );
}
@@ -956,7 +954,7 @@ void DlgEditor::Paste()
pCtrlObj->SetUnoControlModel( xCtrlModel ); // set control model
// set new name
- ::rtl::OUString aOUniqueName( pCtrlObj->GetUniqueName() );
+ OUString aOUniqueName( pCtrlObj->GetUniqueName() );
Reference< beans::XPropertySet > xPSet( xCtrlModel , UNO_QUERY );
Any aUniqueName;
aUniqueName <<= aOUniqueName;
@@ -1037,7 +1035,7 @@ void DlgEditor::Delete()
if ( pDlgEdObj && !dynamic_cast<DlgEdForm*>(pDlgEdObj) )
{
// get name from property
- ::rtl::OUString aName;
+ OUString aName;
uno::Reference< beans::XPropertySet > xPSet(pDlgEdObj->GetUnoControlModel(), uno::UNO_QUERY);
if (xPSet.is())
{
@@ -1127,7 +1125,7 @@ namespace Print
long const nBorder = 300;
}
-void lcl_PrintHeader( Printer* pPrinter, const ::rtl::OUString& rTitle ) // not working yet
+void lcl_PrintHeader( Printer* pPrinter, const OUString& rTitle ) // not working yet
{
pPrinter->Push();
@@ -1171,14 +1169,14 @@ sal_Int32 DlgEditor::countPages( Printer* )
return 1;
}
-void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const ::rtl::OUString& rTitle )
+void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const OUString& rTitle )
{
if( nPage == 0 )
Print( pPrinter, rTitle );
}
-void DlgEditor::Print( Printer* pPrinter, const ::rtl::OUString& rTitle ) // not working yet
+void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not working yet
{
{
MapMode aOldMap( pPrinter->GetMapMode());
diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx
index 54735168e340..54cd68b9e00b 100644
--- a/basctl/source/dlged/dlgedclip.cxx
+++ b/basctl/source/dlged/dlgedclip.cxx
@@ -58,7 +58,7 @@ sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, c
// compare mime content types
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
Reference< datatransfer::XMimeContentTypeFactory >
- xMCntTypeFactory( xMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ) ), UNO_QUERY );
+ xMCntTypeFactory( xMSF->createInstance( "com.sun.star.datatransfer.MimeContentTypeFactory" ), UNO_QUERY );
if ( xMCntTypeFactory.is( ) )
{
@@ -66,8 +66,8 @@ sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, c
Reference< datatransfer::XMimeContentType > xLType = xMCntTypeFactory->createMimeContentType( lFlavor.MimeType );
Reference< datatransfer::XMimeContentType > xRType = xMCntTypeFactory->createMimeContentType( rFlavor.MimeType );
- ::rtl::OUString aLFullMediaType = xLType->getFullMediaType();
- ::rtl::OUString aRFullMediaType = xRType->getFullMediaType();
+ OUString aLFullMediaType = xLType->getFullMediaType();
+ OUString aRFullMediaType = xRType->getFullMediaType();
bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType );
}
diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx
index 781d96b54236..9c117ebb3da0 100644
--- a/basctl/source/dlged/dlgedfac.cxx
+++ b/basctl/source/dlged/dlgedfac.cxx
@@ -51,7 +51,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
if( bNeedsInit )
{
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- uno::Reference< container::XNameContainer > xC( xMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), uno::UNO_QUERY );
+ uno::Reference< container::XNameContainer > xC( xMSF->createInstance( "com.sun.star.awt.UnoControlDialogModel" ), uno::UNO_QUERY );
if( xC.is() )
{
uno::Reference< lang::XMultiServiceFactory > xModFact( xC, uno::UNO_QUERY );
@@ -67,33 +67,33 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
switch( pObjFactory->nIdentifier )
{
case OBJ_DLG_PUSHBUTTON:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlButtonModel", xDialogSFact );
break;
case OBJ_DLG_FORMRADIO:
case OBJ_DLG_RADIOBUTTON:
if ( pObjFactory->nIdentifier == OBJ_DLG_RADIOBUTTON )
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlRadioButtonModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlRadioButtonModel", xDialogSFact );
else
{
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.RadioButton" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.form.component.RadioButton", xDialogSFact );
static_cast< DlgEdObj* >( pObjFactory->pNewObj )->MakeDataAware( mxModel );
}
break;
case OBJ_DLG_FORMCHECK:
case OBJ_DLG_CHECKBOX:
if ( pObjFactory->nIdentifier == OBJ_DLG_CHECKBOX )
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCheckBoxModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlCheckBoxModel", xDialogSFact );
else
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CheckBox" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.form.component.CheckBox", xDialogSFact );
static_cast< DlgEdObj* >( pObjFactory->pNewObj )->MakeDataAware( mxModel );
break;
case OBJ_DLG_FORMLIST:
case OBJ_DLG_LISTBOX:
if ( pObjFactory->nIdentifier == OBJ_DLG_LISTBOX )
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlListBoxModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlListBoxModel", xDialogSFact );
else
{
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ListBox" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.form.component.ListBox", xDialogSFact );
static_cast< DlgEdObj* >( pObjFactory->pNewObj )->MakeDataAware( mxModel );
}
break;
@@ -102,10 +102,10 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
{
DlgEdObj* pNew = NULL;
if ( pObjFactory->nIdentifier == OBJ_DLG_COMBOBOX )
- pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlComboBoxModel" )) , xDialogSFact );
+ pNew = new DlgEdObj( "com.sun.star.awt.UnoControlComboBoxModel", xDialogSFact );
else
{
- pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ComboBox" )) , xDialogSFact );
+ pNew = new DlgEdObj( "com.sun.star.form.component.ComboBox", xDialogSFact );
static_cast< DlgEdObj* >( pNew )->MakeDataAware( mxModel );
}
pObjFactory->pNewObj = pNew;
@@ -123,27 +123,27 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
}
} break;
case OBJ_DLG_GROUPBOX:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlGroupBoxModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlGroupBoxModel", xDialogSFact );
break;
case OBJ_DLG_EDIT:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlEditModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlEditModel", xDialogSFact );
break;
case OBJ_DLG_FIXEDTEXT:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedTextModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlFixedTextModel", xDialogSFact );
break;
case OBJ_DLG_IMAGECONTROL:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlImageControlModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlImageControlModel", xDialogSFact );
break;
case OBJ_DLG_PROGRESSBAR:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlProgressBarModel", xDialogSFact );
break;
case OBJ_DLG_FORMHSCROLL:
case OBJ_DLG_HSCROLLBAR:
if ( pObjFactory->nIdentifier == OBJ_DLG_HSCROLLBAR )
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlScrollBarModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact );
else
{
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ScrollBar" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.form.component.ScrollBar", xDialogSFact );
static_cast< DlgEdObj* >( pObjFactory->pNewObj )->MakeDataAware( mxModel );
}
break;
@@ -152,10 +152,10 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
{
DlgEdObj* pNew = NULL;
if ( pObjFactory->nIdentifier == OBJ_DLG_VSCROLLBAR )
- pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlScrollBarModel" )) , xDialogSFact );
+ pNew = new DlgEdObj( "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact );
else
{
- pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ScrollBar" )) , xDialogSFact );
+ pNew = new DlgEdObj( "com.sun.star.form.component.ScrollBar", xDialogSFact );
static_cast< DlgEdObj* >( pNew )->MakeDataAware( mxModel );
}
pObjFactory->pNewObj = pNew;
@@ -175,11 +175,11 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
}
} break;
case OBJ_DLG_HFIXEDLINE:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlFixedLineModel", xDialogSFact );
break;
case OBJ_DLG_VFIXEDLINE:
{
- DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" )) , xDialogSFact );
+ DlgEdObj* pNew = new DlgEdObj( "com.sun.star.awt.UnoControlFixedLineModel", xDialogSFact );
pObjFactory->pNewObj = pNew;
// set vertical orientation
try
@@ -197,38 +197,38 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
}
} break;
case OBJ_DLG_DATEFIELD:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDateFieldModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlDateFieldModel", xDialogSFact );
break;
case OBJ_DLG_TIMEFIELD:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlTimeFieldModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlTimeFieldModel", xDialogSFact );
break;
case OBJ_DLG_NUMERICFIELD:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlNumericFieldModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlNumericFieldModel", xDialogSFact );
break;
case OBJ_DLG_CURRENCYFIELD:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCurrencyFieldModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlCurrencyFieldModel", xDialogSFact );
break;
case OBJ_DLG_FORMATTEDFIELD:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFormattedFieldModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlFormattedFieldModel", xDialogSFact );
break;
case OBJ_DLG_PATTERNFIELD:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlPatternFieldModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlPatternFieldModel", xDialogSFact );
break;
case OBJ_DLG_FILECONTROL:
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFileControlModel" )) , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlFileControlModel", xDialogSFact );
break;
case OBJ_DLG_FORMSPIN:
case OBJ_DLG_SPINBUTTON:
if ( pObjFactory->nIdentifier == OBJ_DLG_SPINBUTTON )
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlSpinButtonModel") , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.awt.UnoControlSpinButtonModel", xDialogSFact );
else
{
- pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.form.component.SpinButton") , xDialogSFact );
+ pObjFactory->pNewObj = new DlgEdObj( "com.sun.star.form.component.SpinButton", xDialogSFact );
static_cast< DlgEdObj* >( pObjFactory->pNewObj )->MakeDataAware( mxModel );
}
break;
case OBJ_DLG_TREECONTROL:
- DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.tree.TreeControlModel" )) , xDialogSFact );
+ DlgEdObj* pNew = new DlgEdObj( "com.sun.star.awt.tree.TreeControlModel", xDialogSFact );
pObjFactory->pNewObj = pNew;
break;
}
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index fa93236ecf56..ba07117a26d2 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -49,7 +49,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::script;
-using ::rtl::OUString;
TYPEINIT1(DlgEdObj, SdrUnoObj);
DBG_NAME(DlgEdObj);
@@ -74,7 +73,7 @@ DlgEdObj::DlgEdObj()
//----------------------------------------------------------------------------
-DlgEdObj::DlgEdObj(const ::rtl::OUString& rModelName,
+DlgEdObj::DlgEdObj(const OUString& rModelName,
const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac)
:SdrUnoObj(rModelName, rxSFac, false)
,bIsListening(false)
@@ -488,11 +487,11 @@ void DlgEdObj::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
void SAL_CALL DlgEdObj::NameChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException)
{
// get old name
- ::rtl::OUString aOldName;
+ OUString aOldName;
evt.OldValue >>= aOldName;
// get new name
- ::rtl::OUString aNewName;
+ OUString aNewName;
evt.NewValue >>= aNewName;
if ( !aNewName.equals(aOldName) )
@@ -553,7 +552,7 @@ void DlgEdObj::UpdateStep()
sal_Int32 nStep = GetStep();
SdrLayerAdmin& rLayerAdmin = GetModel()->GetLayerAdmin();
- SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), false );
+ SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( OUString( "HiddenLayer" ), false );
SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), false );
if( nCurStep )
@@ -592,8 +591,8 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru
if ( xNameAcc.is() )
{
// get sequence of control names
- Sequence< ::rtl::OUString > aNames = xNameAcc->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xNameAcc->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
sal_Int16 i;
@@ -602,7 +601,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru
for ( i = 0; i < nCtrls; ++i )
{
// get control name
- ::rtl::OUString aName( pNames[i] );
+ OUString aName( pNames[i] );
// get tab index
sal_Int16 nTabIndex = -1;
@@ -619,7 +618,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru
}
// create a helper list of control names, sorted by tab index
- ::std::vector< ::rtl::OUString > aNameList( aIndexToNameMap.size() );
+ ::std::vector< OUString > aNameList( aIndexToNameMap.size() );
::std::transform(
aIndexToNameMap.begin(), aIndexToNameMap.end(),
aNameList.begin(),
@@ -637,7 +636,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru
nNewTabIndex = sal::static_int_cast<sal_Int16>( nCtrls - 1 );
// reorder helper list
- ::rtl::OUString aCtrlName = aNameList[nOldTabIndex];
+ OUString aCtrlName = aNameList[nOldTabIndex];
aNameList.erase( aNameList.begin() + nOldTabIndex );
aNameList.insert( aNameList.begin() + nNewTabIndex , aCtrlName );
@@ -679,17 +678,17 @@ sal_Bool DlgEdObj::supportsService( const sal_Char* _pServiceName ) const
Reference< lang::XServiceInfo > xServiceInfo( GetUnoControlModel() , UNO_QUERY );
// TODO: cache xServiceInfo as member?
if ( xServiceInfo.is() )
- bSupports = xServiceInfo->supportsService( ::rtl::OUString::createFromAscii( _pServiceName ) );
+ bSupports = xServiceInfo->supportsService( OUString::createFromAscii( _pServiceName ) );
return bSupports;
}
//----------------------------------------------------------------------------
-::rtl::OUString DlgEdObj::GetDefaultName() const
+OUString DlgEdObj::GetDefaultName() const
{
sal_uInt16 nResId = 0;
- ::rtl::OUString aDefaultName;
+ OUString aDefaultName;
if ( supportsService( "com.sun.star.awt.UnoControlDialogModel" ) )
{
nResId = RID_STR_CLASS_DIALOG;
@@ -793,19 +792,19 @@ sal_Bool DlgEdObj::supportsService( const sal_Char* _pServiceName ) const
//----------------------------------------------------------------------------
-::rtl::OUString DlgEdObj::GetUniqueName() const
+OUString DlgEdObj::GetUniqueName() const
{
- ::rtl::OUString aUniqueName;
+ OUString aUniqueName;
uno::Reference< container::XNameAccess > xNameAcc((GetDlgEdForm()->GetUnoControlModel()), uno::UNO_QUERY);
if ( xNameAcc.is() )
{
sal_Int32 n = 0;
- ::rtl::OUString aDefaultName = GetDefaultName();
+ OUString aDefaultName = GetDefaultName();
do
{
- aUniqueName = aDefaultName + ::rtl::OUString::valueOf(++n);
+ aUniqueName = aDefaultName + OUString::valueOf(++n);
} while (xNameAcc->hasByName(aUniqueName));
}
@@ -927,7 +926,7 @@ void DlgEdObj::clonedFrom(const DlgEdObj* _pSource)
if ( xPSet.is() )
{
// set new name
- ::rtl::OUString aOUniqueName( GetUniqueName() );
+ OUString aOUniqueName( GetUniqueName() );
Any aUniqueName;
aUniqueName <<= aOUniqueName;
xPSet->setPropertyValue( DLGED_PROP_NAME, aUniqueName );
@@ -1046,7 +1045,7 @@ void DlgEdObj::SetDefaults()
if ( xPSet.is() )
{
// get unique name
- ::rtl::OUString aOUniqueName( GetUniqueName() );
+ OUString aOUniqueName( GetUniqueName() );
// set name property
Any aUniqueName;
@@ -1133,7 +1132,7 @@ void DlgEdObj::StartListening()
m_xPropertyChangeListener = new DlgEdPropListenerImpl(*this);
// register listener to properties
- xControlModel->addPropertyChangeListener( ::rtl::OUString() , m_xPropertyChangeListener );
+ xControlModel->addPropertyChangeListener( OUString() , m_xPropertyChangeListener );
}
// XContainerListener
@@ -1170,7 +1169,7 @@ void DlgEdObj::EndListening(bool bRemoveListener)
if ( m_xPropertyChangeListener.is() && xControlModel.is() )
{
// remove listener
- xControlModel->removePropertyChangeListener( ::rtl::OUString() , m_xPropertyChangeListener );
+ xControlModel->removePropertyChangeListener( OUString() , m_xPropertyChangeListener );
}
m_xPropertyChangeListener.clear();
@@ -1529,8 +1528,8 @@ void DlgEdForm::UpdateTabIndices()
if ( xNameAcc.is() )
{
// get sequence of control names
- Sequence< ::rtl::OUString > aNames = xNameAcc->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xNameAcc->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
// create a map of tab indices and control names, sorted by tab index
@@ -1538,7 +1537,7 @@ void DlgEdForm::UpdateTabIndices()
for ( sal_Int16 i = 0; i < nCtrls; ++i )
{
// get name
- ::rtl::OUString aName( pNames[i] );
+ OUString aName( pNames[i] );
// get tab index
sal_Int16 nTabIndex = -1;
@@ -1627,7 +1626,7 @@ void DlgEdForm::UpdateGroups()
for ( sal_Int32 nGroup = 0; nGroup < nGroupCount; ++nGroup )
{
// get a list of control models that belong to this group
- ::rtl::OUString aName;
+ OUString aName;
Sequence< Reference< awt::XControlModel > > aSeqModels;
xTabModel->getGroup( nGroup, aSeqModels, aName );
const Reference< awt::XControlModel >* pModels = aSeqModels.getConstArray();
@@ -1797,12 +1796,12 @@ bool DlgEdObj::MakeDataAware( const Reference< frame::XModel >& xModel )
{
if ( xBindable.is() )
{
- Reference< form::binding::XValueBinding > xBinding( xFac->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.table.CellValueBinding" ) ) ), UNO_QUERY );
+ Reference< form::binding::XValueBinding > xBinding( xFac->createInstance( "com.sun.star.table.CellValueBinding" ), UNO_QUERY );
xBindable->setValueBinding( xBinding );
}
if ( xListEntrySink.is() )
{
- Reference< form::binding::XListEntrySource > xSource( xFac->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.table.CellRangeListSource" ) ) ), UNO_QUERY );
+ Reference< form::binding::XListEntrySource > xSource( xFac->createInstance( "com.sun.star.table.CellRangeListSource" ), UNO_QUERY );
xListEntrySink->setListEntrySource( xSource );
}
if ( xListEntrySink.is() || xBindable.is() )
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index aff7467057ff..61b41eb21ad7 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -56,7 +56,7 @@ bool localesAreEqual( const Locale& rLocaleLeft, const Locale& rLocaleRight )
}
namespace {
- long getLongestWordWidth( const ::rtl::OUString& rText, const Window& rWin )
+ long getLongestWordWidth( const OUString& rText, const Window& rWin )
{
long nWidth = 0;
Reference< XBreakIterator > xBreakIter( vcl::unohelper::CreateBreakIterator() );
@@ -68,7 +68,7 @@ namespace {
while ( aBoundary.startPos != aBoundary.endPos )
{
nStartPos = aBoundary.endPos;
- ::rtl::OUString sWord(rText.copy(aBoundary.startPos, aBoundary.endPos - aBoundary.startPos));
+ OUString sWord(rText.copy(aBoundary.startPos, aBoundary.endPos - aBoundary.startPos));
long nTemp = rWin.GetCtrlTextWidth( sWord );
if ( nTemp > nWidth )
nWidth = nTemp;
@@ -112,9 +112,9 @@ void ManageLanguageDialog::Init()
{
// get current IDE
Shell* pShell = GetShell();
- ::rtl::OUString sLibName = pShell->GetCurLibName();
+ OUString sLibName = pShell->GetCurLibName();
// set dialog title with library name
- ::rtl::OUString sText = GetText();
+ OUString sText = GetText();
sText = sText.replaceAll("$1", sLibName);
SetText( sText );
// set handler
@@ -129,7 +129,7 @@ void ManageLanguageDialog::Init()
void ManageLanguageDialog::CalcInfoSize()
{
- ::rtl::OUString sInfoStr = m_aInfoFT.GetText();
+ OUString sInfoStr = m_aInfoFT.GetText();
long nInfoWidth = m_aInfoFT.GetSizePixel().Width();
long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT );
long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord;
@@ -171,13 +171,13 @@ void ManageLanguageDialog::FillLanguageBox()
{
bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
LanguageType eLangType = SvxLocaleToLanguage( pLocale[i] );
- ::rtl::OUStringBuffer sLanguageBuf(aLangTable.GetString( eLangType ));
+ OUStringBuffer sLanguageBuf(aLangTable.GetString( eLangType ));
if ( bIsDefault )
{
sLanguageBuf.append(' ');
sLanguageBuf.append(m_sDefLangStr);
}
- ::rtl::OUString sLanguage(sLanguageBuf.makeStringAndClear());
+ OUString sLanguage(sLanguageBuf.makeStringAndClear());
sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage );
m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
}
@@ -346,7 +346,7 @@ void SetDefaultLanguageDialog::FillLanguageBox()
void SetDefaultLanguageDialog::CalcInfoSize()
{
- ::rtl::OUString sInfoStr = m_aInfoFT.GetText();
+ OUString sInfoStr = m_aInfoFT.GetText();
long nInfoWidth = m_aInfoFT.GetSizePixel().Width();
long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT );
long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord;
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 986a69b8baae..a5f19ac76f4c 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -99,11 +99,11 @@ PropBrw::PropBrw (DialogWindowLayout& rLayout_):
try
{
// create a frame wrapper for myself
- m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Frame" ))), UNO_QUERY);
+ m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance( "com.sun.star.frame.Frame" ), UNO_QUERY);
if (m_xMeAsFrame.is())
{
m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
- m_xMeAsFrame->setName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "form property browser" ))); // change name!
+ m_xMeAsFrame->setName( "form property browser" ); // change name!
}
}
catch (const Exception&)
@@ -133,15 +133,15 @@ void PropBrw::ImplReCreateController()
// a ComponentContext for the
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
- ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) ), makeAny( VCLUnoHelper::GetInterface ( this ) ) ),
- ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContextDocument" ) ), makeAny( m_xContextDocument ) )
+ ::cppu::ContextEntry_Init( "DialogParentWindow", makeAny( VCLUnoHelper::GetInterface ( this ) ) ),
+ ::cppu::ContextEntry_Init( "ContextDocument", makeAny( m_xContextDocument ) )
};
Reference< XComponentContext > xInspectorContext(
::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) );
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
- static const ::rtl::OUString s_sControllerServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.PropertyBrowserController" ));
+ static const OUString s_sControllerServiceName( "com.sun.star.awt.PropertyBrowserController" );
m_xBrowserController = Reference< XPropertySet >(
xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY
);
@@ -294,7 +294,7 @@ void PropBrw::implSetNewObjectSequence
{
xObjectInspector->inspect( _rObjectSeq );
- ::rtl::OUString aText = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES);
+ OUString aText = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES);
aText += IDE_RESSTR(RID_STR_BRWTITLE_MULTISELECT);
SetText( aText );
}
@@ -305,8 +305,7 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
{
if ( m_xBrowserController.is() )
{
- m_xBrowserController->setPropertyValue(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntrospectedObject" )),
+ m_xBrowserController->setPropertyValue( "IntrospectedObject",
makeAny( _rxObject )
);
@@ -316,9 +315,9 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
}
-::rtl::OUString PropBrw::GetHeadlineName( const Reference< XPropertySet >& _rxObject )
+OUString PropBrw::GetHeadlineName( const Reference< XPropertySet >& _rxObject )
{
- ::rtl::OUString aName;
+ OUString aName;
Reference< lang::XServiceInfo > xServiceInfo( _rxObject, UNO_QUERY );
if (xServiceInfo.is()) // single selection
@@ -326,87 +325,87 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
sal_uInt16 nResId = 0;
aName = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES);
- if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ) )
+ if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDialogModel" ) )
{
nResId = RID_STR_CLASS_DIALOG;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) )
{
nResId = RID_STR_CLASS_BUTTON;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) )
{
nResId = RID_STR_CLASS_RADIOBUTTON;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) )
{
nResId = RID_STR_CLASS_CHECKBOX;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlListBoxModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) )
{
nResId = RID_STR_CLASS_LISTBOX;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlComboBoxModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) )
{
nResId = RID_STR_CLASS_COMBOBOX;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) )
{
nResId = RID_STR_CLASS_GROUPBOX;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlEditModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlEditModel" ) )
{
nResId = RID_STR_CLASS_EDIT;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedTextModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) )
{
nResId = RID_STR_CLASS_FIXEDTEXT;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlImageControlModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) )
{
nResId = RID_STR_CLASS_IMAGECONTROL;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) )
{
nResId = RID_STR_CLASS_PROGRESSBAR;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlScrollBarModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) )
{
nResId = RID_STR_CLASS_SCROLLBAR;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedLineModel" ) )
{
nResId = RID_STR_CLASS_FIXEDLINE;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDateFieldModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDateFieldModel" ) )
{
nResId = RID_STR_CLASS_DATEFIELD;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlTimeFieldModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" ) )
{
nResId = RID_STR_CLASS_TIMEFIELD;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlNumericFieldModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" ) )
{
nResId = RID_STR_CLASS_NUMERICFIELD;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) )
{
nResId = RID_STR_CLASS_CURRENCYFIELD;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFormattedFieldModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) )
{
nResId = RID_STR_CLASS_FORMATTEDFIELD;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlPatternFieldModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" ) )
{
nResId = RID_STR_CLASS_PATTERNFIELD;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFileControlModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFileControlModel" ) )
{
nResId = RID_STR_CLASS_FILECONTROL;
}
- else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.tree.TreeControlModel" ) ) ) )
+ else if ( xServiceInfo->supportsService( "com.sun.star.awt.tree.TreeControlModel" ) )
{
nResId = RID_STR_CLASS_TREECONTROL;
}
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index 16481f71082c..99bd6b099046 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -39,28 +39,28 @@ namespace basctl
// help methods for the general use:
- SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName );
+ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName );
void RunMethod( SbMethod* pMethod );
- StarBASIC* FindBasic( const SbxVariable* pVar );
+ StarBASIC* FindBasic( const SbxVariable* pVar );
void StopBasic();
- long HandleBasicError( StarBASIC* pBasic );
+ long HandleBasicError( StarBASIC* pBasic );
void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
bool IsValidSbxName( const String& rName );
- BasicManager* FindBasicManager( StarBASIC* pLib );
+ BasicManager* FindBasicManager( StarBASIC* pLib );
- SfxBindings* GetBindingsPtr();
+ SfxBindings* GetBindingsPtr();
- SfxDispatcher* GetDispatcher ();
+ SfxDispatcher* GetDispatcher ();
void InvalidateDebuggerSlots();
// libraries
- ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMergedLibraryNames(
+ ::com::sun::star::uno::Sequence< OUString > GetMergedLibraryNames(
const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xModLibContainer,
const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xDlgLibContainer );
@@ -68,21 +68,22 @@ namespace basctl
Will show an error message when renaming fails because the new name is already used.
*/
- bool RenameModule(
+ bool RenameModule(
Window* pErrorParent, const ScriptDocument& rDocument,
- const ::rtl::OUString& rLibName, const ::rtl::OUString& rOldName, const ::rtl::OUString& rNewName );
+ const OUString& rLibName, const OUString& rOldName, const OUString& rNewName );
// new methods for macros
- ::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument,
- bool bChooseOnly, const ::rtl::OUString& rMacroDesc );
+ OUString ChooseMacro(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument,
+ bool bChooseOnly, const OUString& rMacroDesc );
- ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames(
- const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )
+ ::com::sun::star::uno::Sequence< OUString > GetMethodNames(
+ const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
throw( ::com::sun::star::container::NoSuchElementException );
- bool HasMethod(
- const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, const ::rtl::OUString& rMethName );
+ bool HasMethod(
+ const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, const OUString& rMethName );
// new methods for dialogs
@@ -90,14 +91,13 @@ namespace basctl
Will show an error message when renaming fails because the new name is already used.
*/
- bool RenameDialog(
- Window* pErrorParent, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rOldName, const ::rtl::OUString& rNewName )
+ bool RenameDialog(
+ Window* pErrorParent, const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rOldName, const OUString& rNewName )
throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::container::NoSuchElementException );
- bool RemoveDialog(
- const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName );
+ bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName );
- void MarkDocumentModified( const ScriptDocument& rDocument );
+ void MarkDocumentModified( const ScriptDocument& rDocument );
} // namespace basctl
diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx
index 16fb33e4dca7..ec06d6cd3995 100644
--- a/basctl/source/inc/dlgeddef.hxx
+++ b/basctl/source/inc/dlgeddef.hxx
@@ -68,21 +68,21 @@ enum
};
// control properties
-#define DLGED_PROP_BACKGROUNDCOLOR rtl::OUString("BackgroundColor")
-#define DLGED_PROP_DROPDOWN rtl::OUString("Dropdown")
-#define DLGED_PROP_FORMATSSUPPLIER rtl::OUString("FormatsSupplier")
-#define DLGED_PROP_HEIGHT rtl::OUString("Height")
-#define DLGED_PROP_LABEL rtl::OUString("Label")
-#define DLGED_PROP_NAME rtl::OUString("Name")
-#define DLGED_PROP_ORIENTATION rtl::OUString("Orientation")
-#define DLGED_PROP_POSITIONX rtl::OUString("PositionX")
-#define DLGED_PROP_POSITIONY rtl::OUString("PositionY")
-#define DLGED_PROP_STEP rtl::OUString("Step")
-#define DLGED_PROP_TABINDEX rtl::OUString("TabIndex")
-#define DLGED_PROP_TEXTCOLOR rtl::OUString("TextColor")
-#define DLGED_PROP_TEXTLINECOLOR rtl::OUString("TextLineColor")
-#define DLGED_PROP_WIDTH rtl::OUString("Width")
-#define DLGED_PROP_DECORATION rtl::OUString("Decoration")
+#define DLGED_PROP_BACKGROUNDCOLOR "BackgroundColor"
+#define DLGED_PROP_DROPDOWN "Dropdown"
+#define DLGED_PROP_FORMATSSUPPLIER "FormatsSupplier"
+#define DLGED_PROP_HEIGHT "Height"
+#define DLGED_PROP_LABEL "Label"
+#define DLGED_PROP_NAME "Name"
+#define DLGED_PROP_ORIENTATION "Orientation"
+#define DLGED_PROP_POSITIONX "PositionX"
+#define DLGED_PROP_POSITIONY "PositionY"
+#define DLGED_PROP_STEP "Step"
+#define DLGED_PROP_TABINDEX "TabIndex"
+#define DLGED_PROP_TEXTCOLOR "TextColor"
+#define DLGED_PROP_TEXTLINECOLOR "TextLineColor"
+#define DLGED_PROP_WIDTH "Width"
+#define DLGED_PROP_DECORATION "Decoration"
} // namespace basctl
diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx
index e3da88b37134..de471a3678dd 100644
--- a/basctl/source/inc/localizationmgr.hxx
+++ b/basctl/source/inc/localizationmgr.hxx
@@ -38,7 +38,7 @@ class LocalizationMgr
Shell* m_pShell;
ScriptDocument m_aDocument;
- ::rtl::OUString m_aLibName;
+ OUString m_aLibName;
::com::sun::star::lang::Locale m_aLocaleBeforeBasicStart;
@@ -53,7 +53,7 @@ class LocalizationMgr
COPY_RESOURCES
};
static sal_Int32 implHandleControlResourceProperties( ::com::sun::star::uno::Any aControlAny,
- const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
+ const OUString& aDialogName, const OUString& aCtrlName,
::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
xStringResourceManager, ::com::sun::star::uno::Reference< ::com::sun::star::resource::
XStringResourceResolver > xSourceStringResolver, HandleResourceMode eMode );
@@ -69,7 +69,7 @@ class LocalizationMgr
void implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode );
public:
- LocalizationMgr(Shell*, ScriptDocument const&, rtl::OUString const& aLibName,
+ LocalizationMgr(Shell*, ScriptDocument const&, OUString const& aLibName,
const ::com::sun::star::uno::Reference
< ::com::sun::star::resource::XStringResourceManager >& xStringResourceManager );
::com::sun::star::uno::Reference
@@ -97,21 +97,21 @@ public:
void handleBasicStopped( void );
static void setControlResourceIDsForNewEditorObject( DlgEditor* pEditor,
- ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName );
+ ::com::sun::star::uno::Any aControlAny, const OUString& aCtrlName );
static void renameControlResourceIDsForEditorObject( DlgEditor* pEditor,
- ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aNewCtrlName );
+ ::com::sun::star::uno::Any aControlAny, const OUString& aNewCtrlName );
static void deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor,
- ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName );
+ ::com::sun::star::uno::Any aControlAny, const OUString& aCtrlName );
- static void setStringResourceAtDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aDlgName,
+ static void setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
- static void renameStringResourceIDs( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aDlgName,
+ static void renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
- static void removeResourceForDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aDlgName,
+ static void removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
static ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
@@ -128,13 +128,13 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager );
static void copyResourcesForPastedEditorObject( DlgEditor* pEditor,
- ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName,
+ ::com::sun::star::uno::Any aControlAny, const OUString& aCtrlName,
::com::sun::star::uno::Reference< ::com::sun::star::resource::
XStringResourceResolver > xSourceStringResolver );
static void copyResourceForDroppedDialog(
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
- const ::rtl::OUString& aDialogName,
+ const OUString& aDialogName,
::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager,
::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > xSourceStringResolver );
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index e735d9a001db..0cd940be775f 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -34,11 +34,11 @@ class LocalizationMgr;
struct LanguageEntry
{
- ::rtl::OUString m_sLanguage;
+ OUString m_sLanguage;
::com::sun::star::lang::Locale m_aLocale;
bool m_bIsDefault;
- LanguageEntry( const ::rtl::OUString& _rLanguage,
+ LanguageEntry( const OUString& _rLanguage,
const ::com::sun::star::lang::Locale& _rLocale,
bool _bIsDefault ) :
m_sLanguage( _rLanguage ),
@@ -65,9 +65,9 @@ private:
boost::shared_ptr<LocalizationMgr> m_pLocalizationMgr;
- ::rtl::OUString m_sDefLangStr;
- ::rtl::OUString m_sDeleteStr;
- ::rtl::OUString m_sCreateLangStr;
+ OUString m_sDefLangStr;
+ OUString m_sDeleteStr;
+ OUString m_sCreateLangStr;
void Init();
void CalcInfoSize();
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index e8011ef646ef..ece39a92cc89 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -69,7 +69,7 @@ protected:
void implSetNewObject(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
- ::rtl::OUString GetHeadlineName(
+ OUString GetHeadlineName(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
public:
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
index f3645dd3312b..1d4b224c2cf2 100644
--- a/basctl/source/inc/sbxitem.hxx
+++ b/basctl/source/inc/sbxitem.hxx
@@ -38,23 +38,23 @@ enum ItemType
class SbxItem : public SfxPoolItem
{
const ScriptDocument m_aDocument;
- const ::rtl::OUString m_aLibName;
- const ::rtl::OUString m_aName;
- const ::rtl::OUString m_aMethodName;
+ const OUString m_aLibName;
+ const OUString m_aName;
+ const OUString m_aMethodName;
ItemType m_eType;
public:
TYPEINFO();
- SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aName, ItemType);
- SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aName, const ::rtl::OUString& aMethodName, ItemType eType);
+ SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, ItemType);
+ SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, const OUString& aMethodName, ItemType eType);
virtual SfxPoolItem* Clone(SfxItemPool *pPool = 0) const;
virtual int operator==(const SfxPoolItem&) const;
ScriptDocument const& GetDocument () const { return m_aDocument; }
- rtl::OUString const& GetLibName () const { return m_aLibName; }
- rtl::OUString const& GetName () const { return m_aName; }
- rtl::OUString const& GetMethodName () const { return m_aMethodName; }
+ OUString const& GetLibName () const { return m_aLibName; }
+ OUString const& GetName () const { return m_aName; }
+ OUString const& GetMethodName () const { return m_aMethodName; }
ItemType GetType () const { return m_eType; }
};
diff --git a/basctl/source/inc/scriptdocument.hxx b/basctl/source/inc/scriptdocument.hxx
index 1fa08cc69c88..477dc6e7a9a6 100644
--- a/basctl/source/inc/scriptdocument.hxx
+++ b/basctl/source/inc/scriptdocument.hxx
@@ -136,7 +136,7 @@ namespace basctl
@see getApplicationScriptDocument
*/
static ScriptDocument
- getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption );
+ getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption );
/** operation mode for getAllScriptDocuments
*/
@@ -232,7 +232,7 @@ namespace basctl
/** determines whether there exists a library of the given type, with the given name
*/
- bool hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ bool hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** returns a script or dialog library given by name
@@ -247,7 +247,7 @@ namespace basctl
if there is no script library with the given name
*/
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
- getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const
+ getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((::com::sun::star::container::NoSuchElementException));
/** creates a script or dialog library in the document, or returns an existing one
@@ -256,24 +256,23 @@ namespace basctl
then this library will automatically be loaded, and then returned.
*/
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
- getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** returns the names of the modules in a given script or dialog library of the document
*/
- ::com::sun::star::uno::Sequence< ::rtl::OUString >
- getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ ::com::sun::star::uno::Sequence< OUString >
+ getObjectNames( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** retrieves a name for a newly to be created module or dialog
*/
- ::rtl::OUString
- createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
+ OUString createObjectName( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** loads a script or dialog library given by name, if there is such a library
*/
- void loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary );
+ void loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary );
/// retrieves the (combined) names of all script and dialog libraries
- ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ ::com::sun::star::uno::Sequence< OUString >
getLibraryNames() const;
/** removes a given script module from the document
@@ -282,7 +281,7 @@ namespace basctl
<TRUE/> if and only if the removal was successful. When <FALSE/> is returned,
this will reported as assertion in a non-product build.
*/
- bool removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const;
+ bool removeModule( const OUString& _rLibName, const OUString& _rModuleName ) const;
/** creates a module with the given name in the given library
@param _rLibName
@@ -296,7 +295,7 @@ namespace basctl
@return
<TRUE/> if and only if the creation was successful
*/
- bool createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const;
+ bool createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const;
/** inserts a given piece as code as module
@param _rLibName
@@ -310,7 +309,7 @@ namespace basctl
@return
<TRUE/> if and only if the insertion was successful.
*/
- bool insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const;
+ bool insertModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const;
/** updates a given module with new code
@param _rLibName
@@ -322,10 +321,10 @@ namespace basctl
@return
<TRUE/> if and only if the insertion was successful.
*/
- bool updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const;
+ bool updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const;
/// determines whether a module with the given name exists in the given library
- bool hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const;
+ bool hasModule( const OUString& _rLibName, const OUString& _rModName ) const;
/** retrieves a module's source
@param _rLibName
@@ -337,7 +336,7 @@ namespace basctl
@return
<TRUE/> if and only if the code could be successfully retrieved, <FALSE/> otherwise
*/
- bool getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _rModuleSource ) const;
+ bool getModule( const OUString& _rLibName, const OUString& _rModName, OUString& _rModuleSource ) const;
/** renames a module
@param _rLibName
@@ -349,7 +348,7 @@ namespace basctl
@return
<TRUE/> if and only if renaming was successful.
*/
- bool renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const;
+ bool renameModule( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName ) const;
/** removes a given dialog from the document
@@ -357,10 +356,10 @@ namespace basctl
<TRUE/> if and only if the removal was successful. When <FALSE/> is returned,
this will reported as assertion in a non-product build.
*/
- bool removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const;
+ bool removeDialog( const OUString& _rLibName, const OUString& _rDialogName ) const;
/// determines whether a dialog with the given name exists in the given library
- bool hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const;
+ bool hasDialog( const OUString& _rLibName, const OUString& _rDialogName ) const;
/** retrieves a dialog
@param _rLibName
@@ -373,8 +372,8 @@ namespace basctl
<TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise
*/
bool getDialog(
- const ::rtl::OUString& _rLibName,
- const ::rtl::OUString& _rDialogName,
+ const OUString& _rLibName,
+ const OUString& _rDialogName,
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider
) const;
@@ -391,9 +390,9 @@ namespace basctl
<TRUE/> if and only if renaming was successful.
*/
bool renameDialog(
- const ::rtl::OUString& _rLibName,
- const ::rtl::OUString& _rOldName,
- const ::rtl::OUString& _rNewName,
+ const OUString& _rLibName,
+ const OUString& _rOldName,
+ const OUString& _rNewName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxExistingDialogModel
) const;
@@ -408,8 +407,8 @@ namespace basctl
<TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise
*/
bool createDialog(
- const ::rtl::OUString& _rLibName,
- const ::rtl::OUString& _rDialogName,
+ const OUString& _rLibName,
+ const OUString& _rDialogName,
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider
) const;
@@ -427,8 +426,8 @@ namespace basctl
<TRUE/> if and only if the insertion was successful.
*/
bool insertDialog(
- const ::rtl::OUString& _rLibName,
- const ::rtl::OUString& _rDialogName,
+ const OUString& _rLibName,
+ const OUString& _rDialogName,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _rDialogProvider
) const;
@@ -472,25 +471,22 @@ namespace basctl
/// returns the location of a library given by name
LibraryLocation
- getLibraryLocation( const ::rtl::OUString& _rLibName ) const;
+ getLibraryLocation( const OUString& _rLibName ) const;
/// returns the title for the document
- ::rtl::OUString
- getTitle( LibraryLocation _eLocation, LibraryType _eType = LIBRARY_TYPE_ALL ) const;
+ OUString getTitle( LibraryLocation _eLocation, LibraryType _eType = LIBRARY_TYPE_ALL ) const;
/** returns the title of the document
to be used for valid documents only
*/
- ::rtl::OUString
- getTitle() const;
+ OUString getTitle() const;
/** returns the URL of the document
to be used for valid documents only
*/
- ::rtl::OUString
- getURL() const;
+ OUString getURL() const;
/** determines whether the document is currently the one-and-only application-wide active document
*/
diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml b/basctl/uiconfig/basicide/menubar/menubar.xml
index aa5530f156da..886909d66af9 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -29,6 +29,9 @@
<menu:menuitem menu:id=".uno:Save"/>
<menu:menuitem menu:id=".uno:SaveAs"/>
<menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuitem menu:id=".uno:CheckOut"/>
+ <menu:menuitem menu:id=".uno:CancelCheckOut"/>
+ <menu:menuitem menu:id=".uno:CheckIn"/>
<menu:menu menu:id=".uno:TemplateMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:Organizer"/>
diff --git a/basctl/uiconfig/basicide/ui/basicmacrodialog.ui b/basctl/uiconfig/basicide/ui/basicmacrodialog.ui
new file mode 100644
index 000000000000..e5d5effb226e
--- /dev/null
+++ b/basctl/uiconfig/basicide/ui/basicmacrodialog.ui
@@ -0,0 +1,384 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="BasicMacroDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">%PRODUCTNAME Basic Macros</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="run">
+ <property name="label">Run</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="image_position">bottom</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="assign">
+ <property name="label">Assign...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="edit">
+ <property name="label">Edit</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete">
+ <property name="label">gtk-delete</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="organize">
+ <property name="label">Organizer...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newlibrary">
+ <property name="label">New Library</property>
+ <property name="use_action_appearance">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newmodule">
+ <property name="label">New Module</property>
+ <property name="use_action_appearance">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-close</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">8</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="svtlo:SvTreeListBox" id="macros">
+ <property name="use_action_appearance">False</property>
+ <property name="width_request">280</property>
+ <property name="height_request">300</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="existingmacrosft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Existing macros in:</property>
+ <property name="track_visited_links">False</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="macronameft1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="track_visited_links">False</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="basctllo:TreeListBox" id="libraries">
+ <property name="use_action_appearance">False</property>
+ <property name="width_request">280</property>
+ <property name="height_request">300</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="macrofromft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Macro from</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="macrotoft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Save macro in</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkEntry" id="macronameedit">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="libraryft1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Macro name</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">run</action-widget>
+ <action-widget response="0">assign</action-widget>
+ <action-widget response="0">edit</action-widget>
+ <action-widget response="0">delete</action-widget>
+ <action-widget response="0">organize</action-widget>
+ <action-widget response="0">newlibrary</action-widget>
+ <action-widget response="0">newmodule</action-widget>
+ <action-widget response="0">close</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>