Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b0aac3f4
Kaydet (Commit)
b0aac3f4
authored
Ara 20, 2011
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String->OUString
üst
6703e91a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
25 deletions
+22
-25
moduldlg.cxx
basctl/source/basicide/moduldlg.cxx
+19
-22
moduldlg.hxx
basctl/source/basicide/moduldlg.hxx
+3
-3
No files found.
basctl/source/basicide/moduldlg.cxx
Dosyayı görüntüle @
b0aac3f4
...
@@ -732,7 +732,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
...
@@ -732,7 +732,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
return
0
;
return
0
;
}
}
bool
ObjectPage
::
GetSelection
(
ScriptDocument
&
rDocument
,
String
&
rLibName
)
bool
ObjectPage
::
GetSelection
(
ScriptDocument
&
rDocument
,
::
rtl
::
OU
String
&
rLibName
)
{
{
bool
bRet
=
false
;
bool
bRet
=
false
;
...
@@ -740,8 +740,8 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
...
@@ -740,8 +740,8 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
BasicEntryDescriptor
aDesc
(
aBasicBox
.
GetEntryDescriptor
(
pCurEntry
)
);
BasicEntryDescriptor
aDesc
(
aBasicBox
.
GetEntryDescriptor
(
pCurEntry
)
);
rDocument
=
aDesc
.
GetDocument
();
rDocument
=
aDesc
.
GetDocument
();
rLibName
=
aDesc
.
GetLibName
();
rLibName
=
aDesc
.
GetLibName
();
if
(
!
rLibName
.
Len
()
)
if
(
rLibName
.
isEmpty
()
)
rLibName
=
String
::
CreateFromAscii
(
"Standard"
);
rLibName
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Standard"
)
);
DBG_ASSERT
(
rDocument
.
isAlive
(),
"ObjectPage::GetSelection: no or dead ScriptDocument in the selection!"
);
DBG_ASSERT
(
rDocument
.
isAlive
(),
"ObjectPage::GetSelection: no or dead ScriptDocument in the selection!"
);
if
(
!
rDocument
.
isAlive
()
)
if
(
!
rDocument
.
isAlive
()
)
...
@@ -784,11 +784,11 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
...
@@ -784,11 +784,11 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
void
ObjectPage
::
NewModule
()
void
ObjectPage
::
NewModule
()
{
{
ScriptDocument
aDocument
(
ScriptDocument
::
getApplicationScriptDocument
()
);
ScriptDocument
aDocument
(
ScriptDocument
::
getApplicationScriptDocument
()
);
String
aLibName
;
::
rtl
::
OU
String
aLibName
;
if
(
GetSelection
(
aDocument
,
aLibName
)
)
if
(
GetSelection
(
aDocument
,
aLibName
)
)
{
{
String
aModName
;
::
rtl
::
OU
String
aModName
;
createModImpl
(
static_cast
<
Window
*>
(
this
),
aDocument
,
createModImpl
(
static_cast
<
Window
*>
(
this
),
aDocument
,
aBasicBox
,
aLibName
,
aModName
,
true
);
aBasicBox
,
aLibName
,
aModName
,
true
);
}
}
...
@@ -797,7 +797,7 @@ void ObjectPage::NewModule()
...
@@ -797,7 +797,7 @@ void ObjectPage::NewModule()
void
ObjectPage
::
NewDialog
()
void
ObjectPage
::
NewDialog
()
{
{
ScriptDocument
aDocument
(
ScriptDocument
::
getApplicationScriptDocument
()
);
ScriptDocument
aDocument
(
ScriptDocument
::
getApplicationScriptDocument
()
);
String
aLibName
;
::
rtl
::
OU
String
aLibName
;
if
(
GetSelection
(
aDocument
,
aLibName
)
)
if
(
GetSelection
(
aDocument
,
aLibName
)
)
{
{
...
@@ -809,14 +809,14 @@ void ObjectPage::NewDialog()
...
@@ -809,14 +809,14 @@ void ObjectPage::NewDialog()
if
(
xNewDlg
->
Execute
()
!=
0
)
if
(
xNewDlg
->
Execute
()
!=
0
)
{
{
String
aDlgName
(
xNewDlg
->
GetObjectName
()
);
::
rtl
::
OU
String
aDlgName
(
xNewDlg
->
GetObjectName
()
);
if
(
aDlgName
.
Len
()
==
0
)
if
(
aDlgName
.
isEmpty
()
)
aDlgName
=
aDocument
.
createObjectName
(
E_DIALOGS
,
aLibName
);
aDlgName
=
aDocument
.
createObjectName
(
E_DIALOGS
,
aLibName
);
if
(
aDocument
.
hasDialog
(
aLibName
,
aDlgName
)
)
if
(
aDocument
.
hasDialog
(
aLibName
,
aDlgName
)
)
{
{
ErrorBox
(
this
,
WB_OK
|
WB_DEF_OK
,
ErrorBox
(
this
,
WB_OK
|
WB_DEF_OK
,
String
(
IDEResId
(
RID_STR_SBXNAMEALLREADYUSED2
)
)
).
Execute
();
ResId
::
to
String
(
IDEResId
(
RID_STR_SBXNAMEALLREADYUSED2
)
)
).
Execute
();
}
}
else
else
{
{
...
@@ -933,7 +933,7 @@ LibDialog::LibDialog( Window* pParent )
...
@@ -933,7 +933,7 @@ LibDialog::LibDialog( Window* pParent )
aReferenceBox
(
this
,
IDEResId
(
RID_CB_REF
)
),
aReferenceBox
(
this
,
IDEResId
(
RID_CB_REF
)
),
aReplaceBox
(
this
,
IDEResId
(
RID_CB_REPL
)
)
aReplaceBox
(
this
,
IDEResId
(
RID_CB_REPL
)
)
{
{
SetText
(
String
(
IDEResId
(
RID_STR_APPENDLIBS
)
)
);
SetText
(
ResId
::
to
String
(
IDEResId
(
RID_STR_APPENDLIBS
)
)
);
FreeResource
();
FreeResource
();
}
}
...
@@ -942,16 +942,16 @@ LibDialog::~LibDialog()
...
@@ -942,16 +942,16 @@ LibDialog::~LibDialog()
{
{
}
}
void
LibDialog
::
SetStorageName
(
const
String
&
rName
)
void
LibDialog
::
SetStorageName
(
const
::
rtl
::
OU
String
&
rName
)
{
{
String
aName
(
IDEResId
(
RID_STR_FILENAME
)
);
::
rtl
::
OUString
aName
(
ResId
::
toString
(
IDEResId
(
RID_STR_FILENAME
)
)
);
aName
+=
rName
;
aName
+=
rName
;
aStorageName
.
SetText
(
aName
);
aStorageName
.
SetText
(
aName
);
}
}
// Helper function
// Helper function
SbModule
*
createModImpl
(
Window
*
pWin
,
const
ScriptDocument
&
rDocument
,
SbModule
*
createModImpl
(
Window
*
pWin
,
const
ScriptDocument
&
rDocument
,
BasicTreeListBox
&
rBasicBox
,
const
String
&
rLibName
,
String
aModName
,
bool
bMain
)
BasicTreeListBox
&
rBasicBox
,
const
::
rtl
::
OUString
&
rLibName
,
::
rtl
::
OU
String
aModName
,
bool
bMain
)
{
{
OSL_ENSURE
(
rDocument
.
isAlive
(),
"createModImpl: invalid document!"
);
OSL_ENSURE
(
rDocument
.
isAlive
(),
"createModImpl: invalid document!"
);
if
(
!
rDocument
.
isAlive
()
)
if
(
!
rDocument
.
isAlive
()
)
...
@@ -959,11 +959,11 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
...
@@ -959,11 +959,11 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
SbModule
*
pModule
=
NULL
;
SbModule
*
pModule
=
NULL
;
String
aLibName
(
rLibName
);
::
rtl
::
OU
String
aLibName
(
rLibName
);
if
(
!
aLibName
.
Len
()
)
if
(
aLibName
.
isEmpty
()
)
aLibName
=
String
::
CreateFromAscii
(
"Standard"
);
aLibName
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Standard"
)
);
rDocument
.
getOrCreateLibrary
(
E_SCRIPTS
,
aLibName
);
rDocument
.
getOrCreateLibrary
(
E_SCRIPTS
,
aLibName
);
if
(
!
aModName
.
Len
()
)
if
(
aModName
.
isEmpty
()
)
aModName
=
rDocument
.
createObjectName
(
E_SCRIPTS
,
aLibName
);
aModName
=
rDocument
.
createObjectName
(
E_SCRIPTS
,
aLibName
);
boost
::
scoped_ptr
<
NewObjectDialog
>
xNewDlg
(
boost
::
scoped_ptr
<
NewObjectDialog
>
xNewDlg
(
...
@@ -1011,7 +1011,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
...
@@ -1011,7 +1011,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
if
(
pBasic
&&
rDocument
.
isInVBAMode
()
)
if
(
pBasic
&&
rDocument
.
isInVBAMode
()
)
{
{
// add the new module in the "Modules" entry
// add the new module in the "Modules" entry
SvLBoxEntry
*
pLibSubEntry
=
rBasicBox
.
FindEntry
(
pLibEntry
,
String
(
IDEResId
(
RID_STR_NORMAL_MODULES
)
)
,
OBJ_TYPE_NORMAL_MODULES
);
SvLBoxEntry
*
pLibSubEntry
=
rBasicBox
.
FindEntry
(
pLibEntry
,
ResId
::
to
String
(
IDEResId
(
RID_STR_NORMAL_MODULES
)
)
,
OBJ_TYPE_NORMAL_MODULES
);
if
(
pLibSubEntry
)
if
(
pLibSubEntry
)
{
{
if
(
!
rBasicBox
.
IsExpanded
(
pLibSubEntry
)
)
if
(
!
rBasicBox
.
IsExpanded
(
pLibSubEntry
)
)
...
@@ -1040,7 +1040,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
...
@@ -1040,7 +1040,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
catch
(
const
container
::
ElementExistException
&
)
catch
(
const
container
::
ElementExistException
&
)
{
{
ErrorBox
(
pWin
,
WB_OK
|
WB_DEF_OK
,
ErrorBox
(
pWin
,
WB_OK
|
WB_DEF_OK
,
String
(
IDEResId
(
RID_STR_SBXNAMEALLREADYUSED2
)
)
).
Execute
();
ResId
::
to
String
(
IDEResId
(
RID_STR_SBXNAMEALLREADYUSED2
)
)
).
Execute
();
}
}
catch
(
const
container
::
NoSuchElementException
&
)
catch
(
const
container
::
NoSuchElementException
&
)
{
{
...
@@ -1050,7 +1050,4 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
...
@@ -1050,7 +1050,4 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
return
pModule
;
return
pModule
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basctl/source/basicide/moduldlg.hxx
Dosyayı görüntüle @
b0aac3f4
...
@@ -171,7 +171,7 @@ public:
...
@@ -171,7 +171,7 @@ public:
LibDialog
(
Window
*
pParent
);
LibDialog
(
Window
*
pParent
);
~
LibDialog
();
~
LibDialog
();
void
SetStorageName
(
const
String
&
rName
);
void
SetStorageName
(
const
::
rtl
::
OU
String
&
rName
);
BasicCheckBox
&
GetLibBox
()
{
return
aLibBox
;
}
BasicCheckBox
&
GetLibBox
()
{
return
aLibBox
;
}
sal_Bool
IsReference
()
const
{
return
aReferenceBox
.
IsChecked
();
}
sal_Bool
IsReference
()
const
{
return
aReferenceBox
.
IsChecked
();
}
...
@@ -211,7 +211,7 @@ protected:
...
@@ -211,7 +211,7 @@ protected:
DECL_LINK
(
BasicBoxHighlightHdl
,
BasicTreeListBox
*
);
DECL_LINK
(
BasicBoxHighlightHdl
,
BasicTreeListBox
*
);
DECL_LINK
(
ButtonHdl
,
Button
*
);
DECL_LINK
(
ButtonHdl
,
Button
*
);
void
CheckButtons
();
void
CheckButtons
();
bool
GetSelection
(
ScriptDocument
&
rDocument
,
String
&
rLibName
);
bool
GetSelection
(
ScriptDocument
&
rDocument
,
::
rtl
::
OU
String
&
rLibName
);
void
DeleteCurrent
();
void
DeleteCurrent
();
void
NewModule
();
void
NewModule
();
void
NewDialog
();
void
NewDialog
();
...
@@ -282,7 +282,7 @@ public:
...
@@ -282,7 +282,7 @@ public:
// Helper functions
// Helper functions
SbModule
*
createModImpl
(
Window
*
pWin
,
const
ScriptDocument
&
rDocument
,
SbModule
*
createModImpl
(
Window
*
pWin
,
const
ScriptDocument
&
rDocument
,
BasicTreeListBox
&
rBasicBox
,
const
String
&
rLibName
,
String
aModName
,
bool
bMain
=
false
);
BasicTreeListBox
&
rBasicBox
,
const
::
rtl
::
OUString
&
rLibName
,
::
rtl
::
OU
String
aModName
,
bool
bMain
=
false
);
void
createLibImpl
(
Window
*
pWin
,
const
ScriptDocument
&
rDocument
,
void
createLibImpl
(
Window
*
pWin
,
const
ScriptDocument
&
rDocument
,
BasicCheckBox
*
pLibBox
,
BasicTreeListBox
*
pBasicBox
);
BasicCheckBox
*
pLibBox
,
BasicTreeListBox
*
pBasicBox
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment