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
c49fbe94
Kaydet (Commit)
c49fbe94
authored
Agu 12, 2012
tarafından
Rafael Dominguez
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Dont let user create a repository with a duplicated name.
Change-Id: I4175515b72f0e9aac8e4cf2905757381539cab1e
üst
26502c4f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
6 deletions
+26
-6
templateonlineview.hxx
sfx2/inc/sfx2/templateonlineview.hxx
+1
-1
templateonlineview.cxx
sfx2/source/control/templateonlineview.cxx
+8
-1
templatedlg.cxx
sfx2/source/doc/templatedlg.cxx
+11
-4
templatedlg.hrc
sfx2/source/doc/templatedlg.hrc
+1
-0
templatedlg.src
sfx2/source/doc/templatedlg.src
+5
-0
No files found.
sfx2/inc/sfx2/templateonlineview.hxx
Dosyayı görüntüle @
c49fbe94
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
const
std
::
vector
<
TemplateOnlineViewItem
*>&
getRepositories
()
const
{
return
maRepositories
;
}
const
std
::
vector
<
TemplateOnlineViewItem
*>&
getRepositories
()
const
{
return
maRepositories
;
}
void
insertRepository
(
const
OUString
&
rName
,
const
OUString
&
rURL
);
bool
insertRepository
(
const
OUString
&
rName
,
const
OUString
&
rURL
);
bool
deleteRepository
(
const
sal_uInt16
nRepositoryId
);
bool
deleteRepository
(
const
sal_uInt16
nRepositoryId
);
...
...
sfx2/source/control/templateonlineview.cxx
Dosyayı görüntüle @
c49fbe94
...
@@ -259,8 +259,14 @@ bool TemplateOnlineView::loadRepository (const sal_uInt16 nRepositoryId, bool bR
...
@@ -259,8 +259,14 @@ bool TemplateOnlineView::loadRepository (const sal_uInt16 nRepositoryId, bool bR
return
true
;
return
true
;
}
}
void
TemplateOnlineView
::
insertRepository
(
const
OUString
&
rName
,
const
OUString
&
rURL
)
bool
TemplateOnlineView
::
insertRepository
(
const
OUString
&
rName
,
const
OUString
&
rURL
)
{
{
for
(
size_t
i
=
0
,
n
=
maRepositories
.
size
();
i
<
n
;
++
i
)
{
if
(
maRepositories
[
i
]
->
maTitle
==
rName
)
return
false
;
}
TemplateOnlineViewItem
*
pItem
=
new
TemplateOnlineViewItem
(
*
this
,
this
);
TemplateOnlineViewItem
*
pItem
=
new
TemplateOnlineViewItem
(
*
this
,
this
);
pItem
->
mnId
=
maRepositories
.
size
()
+
1
;
pItem
->
mnId
=
maRepositories
.
size
()
+
1
;
...
@@ -270,6 +276,7 @@ void TemplateOnlineView::insertRepository(const OUString &rName, const OUString
...
@@ -270,6 +276,7 @@ void TemplateOnlineView::insertRepository(const OUString &rName, const OUString
maRepositories
.
push_back
(
pItem
);
maRepositories
.
push_back
(
pItem
);
mbIsSynced
=
false
;
mbIsSynced
=
false
;
return
true
;
}
}
bool
TemplateOnlineView
::
deleteRepository
(
const
sal_uInt16
nRepositoryId
)
bool
TemplateOnlineView
::
deleteRepository
(
const
sal_uInt16
nRepositoryId
)
...
...
sfx2/source/doc/templatedlg.cxx
Dosyayı görüntüle @
c49fbe94
...
@@ -583,10 +583,17 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu)
...
@@ -583,10 +583,17 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu)
{
{
boost
::
shared_ptr
<
Place
>
pPlace
=
dlg
.
GetPlace
();
boost
::
shared_ptr
<
Place
>
pPlace
=
dlg
.
GetPlace
();
mpOnlineView
->
insertRepository
(
pPlace
->
GetName
(),
pPlace
->
GetUrl
());
if
(
mpOnlineView
->
insertRepository
(
pPlace
->
GetName
(),
pPlace
->
GetUrl
()))
{
// update repository list menu.
// update repository list menu.
createRepositoryMenu
();
createRepositoryMenu
();
}
else
{
OUString
aMsg
(
SfxResId
(
STR_MSG_ERROR_REPOSITORY_NAME
).
toString
());
aMsg
=
aMsg
.
replaceFirst
(
"$1"
,
pPlace
->
GetName
());
ErrorBox
(
this
,
WB_OK
,
aMsg
).
Execute
();
}
}
}
}
}
else
else
...
...
sfx2/source/doc/templatedlg.hrc
Dosyayı görüntüle @
c49fbe94
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
#define STR_MSG_ERROR_EXPORT 281
#define STR_MSG_ERROR_EXPORT 281
#define STR_MSG_ERROR_DELETE_TEMPLATE 282
#define STR_MSG_ERROR_DELETE_TEMPLATE 282
#define STR_MSG_ERROR_DELETE_FOLDER 283
#define STR_MSG_ERROR_DELETE_FOLDER 283
#define STR_MSG_ERROR_REPOSITORY_NAME 284
#define IMG_ACTION_SORT 304
#define IMG_ACTION_SORT 304
#define IMG_ACTION_REFRESH 305
#define IMG_ACTION_REFRESH 305
sfx2/source/doc/templatedlg.src
Dosyayı görüntüle @
c49fbe94
...
@@ -70,6 +70,11 @@ String STR_MSG_ERROR_DELETE_FOLDER
...
@@ -70,6 +70,11 @@ String STR_MSG_ERROR_DELETE_FOLDER
Text [ en-US ] = "The following folders cannot be deleted:\n$1";
Text [ en-US ] = "The following folders cannot be deleted:\n$1";
};
};
String STR_MSG_ERROR_REPOSITORY_NAME
{
Text [ en-US ] = "Failed to create repository \"$1\".\nA repository with this name may already exist.";
};
ModelessDialog DLG_TEMPLATE_MANAGER
ModelessDialog DLG_TEMPLATE_MANAGER
{
{
OutputSize = TRUE;
OutputSize = TRUE;
...
...
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