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
fa10ab03
Kaydet (Commit)
fa10ab03
authored
Tem 08, 2012
tarafından
Rafael Dominguez
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add an option in toolbar to delete folders when you select them.
Change-Id: Iff10ff99340d9680b924c11956dc036a5f2dac4f
üst
babc1806
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
0 deletions
+45
-0
templatefolderview.hxx
sfx2/inc/sfx2/templatefolderview.hxx
+2
-0
templatedlg.hxx
sfx2/inc/templatedlg.hxx
+1
-0
templatefolderview.cxx
sfx2/source/control/templatefolderview.cxx
+12
-0
templatedlg.cxx
sfx2/source/doc/templatedlg.cxx
+21
-0
templatedlg.hrc
sfx2/source/doc/templatedlg.hrc
+2
-0
templatedlg.src
sfx2/source/doc/templatedlg.src
+7
-0
No files found.
sfx2/inc/sfx2/templatefolderview.hxx
Dosyayı görüntüle @
fa10ab03
...
@@ -62,6 +62,8 @@ public:
...
@@ -62,6 +62,8 @@ public:
sal_uInt16
createRegion
(
const
rtl
::
OUString
&
rName
);
sal_uInt16
createRegion
(
const
rtl
::
OUString
&
rName
);
bool
removeRegion
(
const
sal_uInt16
nItemId
);
bool
removeTemplate
(
const
sal_uInt16
nItemId
);
bool
removeTemplate
(
const
sal_uInt16
nItemId
);
bool
moveTemplates
(
std
::
set
<
const
ThumbnailViewItem
*>
&
rItems
,
const
sal_uInt16
nTargetItem
,
bool
bCopy
);
bool
moveTemplates
(
std
::
set
<
const
ThumbnailViewItem
*>
&
rItems
,
const
sal_uInt16
nTargetItem
,
bool
bCopy
);
...
...
sfx2/inc/templatedlg.hxx
Dosyayı görüntüle @
fa10ab03
...
@@ -72,6 +72,7 @@ private:
...
@@ -72,6 +72,7 @@ private:
void
OnTemplateEdit
();
void
OnTemplateEdit
();
void
OnTemplateProperties
();
void
OnTemplateProperties
();
void
OnTemplateDelete
();
void
OnTemplateDelete
();
void
OnFolderDelete
();
void
centerTopButtons
();
void
centerTopButtons
();
...
...
sfx2/source/control/templatefolderview.cxx
Dosyayı görüntüle @
fa10ab03
...
@@ -468,6 +468,18 @@ sal_uInt16 TemplateFolderView::createRegion(const rtl::OUString &rName)
...
@@ -468,6 +468,18 @@ sal_uInt16 TemplateFolderView::createRegion(const rtl::OUString &rName)
return
true
;
return
true
;
}
}
bool
TemplateFolderView
::
removeRegion
(
const
sal_uInt16
nItemId
)
{
sal_uInt16
nRegionId
=
nItemId
-
1
;
if
(
!
mpDocTemplates
->
Delete
(
nRegionId
,
USHRT_MAX
))
return
false
;
RemoveItem
(
nItemId
);
return
true
;
}
bool
TemplateFolderView
::
removeTemplate
(
const
sal_uInt16
nItemId
)
bool
TemplateFolderView
::
removeTemplate
(
const
sal_uInt16
nItemId
)
{
{
sal_uInt16
nRegionId
=
mpItemView
->
getRegionId
();
sal_uInt16
nRegionId
=
mpItemView
->
getRegionId
();
...
...
sfx2/source/doc/templatedlg.cxx
Dosyayı görüntüle @
fa10ab03
...
@@ -310,6 +310,9 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXViewHdl)
...
@@ -310,6 +310,9 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXViewHdl)
case
TBI_TEMPLATE_IMPORT
:
case
TBI_TEMPLATE_IMPORT
:
OnTemplateImport
();
OnTemplateImport
();
break
;
break
;
case
TBI_TEMPLATE_FOLDER_DEL
:
OnFolderDelete
();
break
;
default
:
default
:
break
;
break
;
}
}
...
@@ -418,7 +421,10 @@ IMPL_LINK(SfxTemplateManagerDlg, TVFolderStateHdl, const ThumbnailViewItem*, pIt
...
@@ -418,7 +421,10 @@ IMPL_LINK(SfxTemplateManagerDlg, TVFolderStateHdl, const ThumbnailViewItem*, pIt
if
(
pItem
->
isSelected
())
if
(
pItem
->
isSelected
())
{
{
if
(
maSelFolders
.
empty
())
if
(
maSelFolders
.
empty
())
{
mpViewBar
->
EnableItem
(
TBI_TEMPLATE_IMPORT
,
true
);
mpViewBar
->
EnableItem
(
TBI_TEMPLATE_IMPORT
,
true
);
mpViewBar
->
ShowItem
(
TBI_TEMPLATE_FOLDER_DEL
);
}
maSelFolders
.
insert
(
pItem
);
maSelFolders
.
insert
(
pItem
);
}
}
...
@@ -427,7 +433,10 @@ IMPL_LINK(SfxTemplateManagerDlg, TVFolderStateHdl, const ThumbnailViewItem*, pIt
...
@@ -427,7 +433,10 @@ IMPL_LINK(SfxTemplateManagerDlg, TVFolderStateHdl, const ThumbnailViewItem*, pIt
maSelFolders
.
erase
(
pItem
);
maSelFolders
.
erase
(
pItem
);
if
(
maSelFolders
.
empty
())
if
(
maSelFolders
.
empty
())
{
mpViewBar
->
EnableItem
(
TBI_TEMPLATE_IMPORT
,
false
);
mpViewBar
->
EnableItem
(
TBI_TEMPLATE_IMPORT
,
false
);
mpViewBar
->
HideItem
(
TBI_TEMPLATE_FOLDER_DEL
);
}
}
}
return
0
;
return
0
;
...
@@ -762,6 +771,18 @@ void SfxTemplateManagerDlg::OnTemplateDelete ()
...
@@ -762,6 +771,18 @@ void SfxTemplateManagerDlg::OnTemplateDelete ()
}
}
}
}
void
SfxTemplateManagerDlg
::
OnFolderDelete
()
{
std
::
set
<
const
ThumbnailViewItem
*>::
const_iterator
pIter
;
for
(
pIter
=
maSelFolders
.
begin
();
pIter
!=
maSelFolders
.
end
();)
{
if
(
maView
->
removeRegion
((
*
pIter
)
->
mnId
))
maSelFolders
.
erase
(
pIter
++
);
else
++
pIter
;
}
}
void
SfxTemplateManagerDlg
::
centerTopButtons
()
void
SfxTemplateManagerDlg
::
centerTopButtons
()
{
{
Point
aFirstBtnPos
=
aButtonAll
.
GetPosPixel
();
Point
aFirstBtnPos
=
aButtonAll
.
GetPosPixel
();
...
...
sfx2/source/doc/templatedlg.hrc
Dosyayı görüntüle @
fa10ab03
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
#define BTN_TEMPLATE_CLOSE 24
#define BTN_TEMPLATE_CLOSE 24
#define TBI_TEMPLATE_FOLDER_DEL 25
#define STR_CREATE_TEXT 260
#define STR_CREATE_TEXT 260
#define STR_CREATE_SHEET 261
#define STR_CREATE_SHEET 261
#define STR_CREATE_PRESENT 262
#define STR_CREATE_PRESENT 262
...
...
sfx2/source/doc/templatedlg.src
Dosyayı görüntüle @
fa10ab03
...
@@ -195,6 +195,13 @@ ModalDialog DLG_TEMPLATE_MANAGER
...
@@ -195,6 +195,13 @@ ModalDialog DLG_TEMPLATE_MANAGER
ImageBitmap = Bitmap { File = "import.png" ; };
ImageBitmap = Bitmap { File = "import.png" ; };
};
};
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_FOLDER_DEL;
Hide = TRUE;
Text [ en-US ] = "Delete";
};
};
};
};
};
...
...
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