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
7d6d18e7
Kaydet (Commit)
7d6d18e7
authored
Tem 27, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert INPUTMODE_ constants to scoped enum
Change-Id: Ib2e37bb320c1edba7246a6611df3b89b764346db
üst
92196183
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
scriptdlg.cxx
cui/source/dialogs/scriptdlg.cxx
+6
-8
scriptdlg.hxx
cui/source/inc/scriptdlg.hxx
+7
-5
No files found.
cui/source/dialogs/scriptdlg.cxx
Dosyayı görüntüle @
7d6d18e7
...
@@ -416,7 +416,7 @@ void SFTreeListBox::ExpandedHdl()
...
@@ -416,7 +416,7 @@ void SFTreeListBox::ExpandedHdl()
// CuiInputDialog ------------------------------------------------------------
// CuiInputDialog ------------------------------------------------------------
CuiInputDialog
::
CuiInputDialog
(
vcl
::
Window
*
pParent
,
sal_uInt16
nMode
)
CuiInputDialog
::
CuiInputDialog
(
vcl
::
Window
*
pParent
,
InputDialogMode
nMode
)
:
ModalDialog
(
pParent
,
"NewLibDialog"
,
:
ModalDialog
(
pParent
,
"NewLibDialog"
,
"cui/ui/newlibdialog.ui"
)
"cui/ui/newlibdialog.ui"
)
{
{
...
@@ -425,14 +425,14 @@ CuiInputDialog::CuiInputDialog(vcl::Window * pParent, sal_uInt16 nMode )
...
@@ -425,14 +425,14 @@ CuiInputDialog::CuiInputDialog(vcl::Window * pParent, sal_uInt16 nMode )
FixedText
*
pNewLibFT
=
get
<
FixedText
>
(
"newlibft"
);
FixedText
*
pNewLibFT
=
get
<
FixedText
>
(
"newlibft"
);
if
(
nMode
==
I
NPUTMODE_
NEWMACRO
)
if
(
nMode
==
I
nputDialogMode
::
NEWMACRO
)
{
{
pNewLibFT
->
Hide
();
pNewLibFT
->
Hide
();
FixedText
*
pNewMacroFT
=
get
<
FixedText
>
(
"newmacroft"
);
FixedText
*
pNewMacroFT
=
get
<
FixedText
>
(
"newmacroft"
);
pNewMacroFT
->
Show
();
pNewMacroFT
->
Show
();
SetText
(
get
<
FixedText
>
(
"altmacrotitle"
)
->
GetText
());
SetText
(
get
<
FixedText
>
(
"altmacrotitle"
)
->
GetText
());
}
}
else
if
(
nMode
==
I
NPUTMODE_
RENAME
)
else
if
(
nMode
==
I
nputDialogMode
::
RENAME
)
{
{
pNewLibFT
->
Hide
();
pNewLibFT
->
Hide
();
FixedText
*
pRenameFT
=
get
<
FixedText
>
(
"renameft"
);
FixedText
*
pRenameFT
=
get
<
FixedText
>
(
"renameft"
);
...
@@ -840,7 +840,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
...
@@ -840,7 +840,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
{
{
OUString
aNewName
;
OUString
aNewName
;
OUString
aNewStdName
;
OUString
aNewStdName
;
sal_uInt16
nMode
=
INPUTMODE_
NEWLIB
;
InputDialogMode
nMode
=
InputDialogMode
::
NEWLIB
;
if
(
m_pScriptsBox
->
GetModel
()
->
GetDepth
(
pEntry
)
==
0
)
if
(
m_pScriptsBox
->
GetModel
()
->
GetDepth
(
pEntry
)
==
0
)
{
{
aNewStdName
=
"Library"
;
aNewStdName
=
"Library"
;
...
@@ -848,7 +848,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
...
@@ -848,7 +848,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
else
else
{
{
aNewStdName
=
"Macro"
;
aNewStdName
=
"Macro"
;
nMode
=
I
NPUTMODE_
NEWMACRO
;
nMode
=
I
nputDialogMode
::
NEWMACRO
;
}
}
//do we need L10N for this? ie something like:
//do we need L10N for this? ie something like:
//String aNewStdName( ResId( STR_STDMODULENAME ) );
//String aNewStdName( ResId( STR_STDMODULENAME ) );
...
@@ -1025,9 +1025,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
...
@@ -1025,9 +1025,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
extn
=
aNewName
.
copy
(
extnPos
);
extn
=
aNewName
.
copy
(
extnPos
);
aNewName
=
aNewName
.
copy
(
0
,
extnPos
);
aNewName
=
aNewName
.
copy
(
0
,
extnPos
);
}
}
sal_uInt16
nMode
=
INPUTMODE_RENAME
;
ScopedVclPtrInstance
<
CuiInputDialog
>
xNewDlg
(
static_cast
<
vcl
::
Window
*>
(
this
),
InputDialogMode
::
RENAME
);
ScopedVclPtrInstance
<
CuiInputDialog
>
xNewDlg
(
static_cast
<
vcl
::
Window
*>
(
this
),
nMode
);
xNewDlg
->
SetObjectName
(
aNewName
);
xNewDlg
->
SetObjectName
(
aNewName
);
bool
bValid
;
bool
bValid
;
...
...
cui/source/inc/scriptdlg.hxx
Dosyayı görüntüle @
7d6d18e7
...
@@ -38,10 +38,6 @@
...
@@ -38,10 +38,6 @@
#define OBJTYPE_SCRIPTCONTAINER 3L
#define OBJTYPE_SCRIPTCONTAINER 3L
#define OBJTYPE_SFROOT 4L
#define OBJTYPE_SFROOT 4L
#define INPUTMODE_NEWLIB 1
#define INPUTMODE_NEWMACRO 2
#define INPUTMODE_RENAME 3
typedef
std
::
unordered_map
<
OUString
,
OUString
,
typedef
std
::
unordered_map
<
OUString
,
OUString
,
OUStringHash
,
std
::
equal_to
<
OUString
>
>
Selection_hash
;
OUStringHash
,
std
::
equal_to
<
OUString
>
>
Selection_hash
;
...
@@ -91,12 +87,18 @@ public:
...
@@ -91,12 +87,18 @@ public:
void
deleteAllTree
(
);
void
deleteAllTree
(
);
};
};
enum
class
InputDialogMode
{
NEWLIB
=
1
,
NEWMACRO
=
2
,
RENAME
=
3
,
};
class
CuiInputDialog
:
public
ModalDialog
class
CuiInputDialog
:
public
ModalDialog
{
{
private
:
private
:
VclPtr
<
Edit
>
m_pEdit
;
VclPtr
<
Edit
>
m_pEdit
;
public
:
public
:
CuiInputDialog
(
vcl
::
Window
*
pParent
,
sal_uInt16
nMode
);
CuiInputDialog
(
vcl
::
Window
*
pParent
,
InputDialogMode
nMode
);
virtual
~
CuiInputDialog
();
virtual
~
CuiInputDialog
();
virtual
void
dispose
()
SAL_OVERRIDE
;
virtual
void
dispose
()
SAL_OVERRIDE
;
...
...
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