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
af331776
Kaydet (Commit)
af331776
authored
Ock 31, 2013
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Template Manager: show some icons if there is no thumbnail
üst
bdb3c21e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
0 deletions
+58
-0
sfx.hrc
sfx2/inc/sfx2/sfx.hrc
+5
-0
templatedlg.hxx
sfx2/inc/templatedlg.hxx
+2
-0
sfx.src
sfx2/source/appl/sfx.src
+20
-0
templateview.cxx
sfx2/source/control/templateview.cxx
+6
-0
templatedlg.cxx
sfx2/source/doc/templatedlg.cxx
+25
-0
No files found.
sfx2/inc/sfx2/sfx.hrc
Dosyayı görüntüle @
af331776
...
...
@@ -169,6 +169,11 @@
#define BT_CHECKOUT (RID_SFX_START+126)
#define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157)
#define SFX_THUMBNAIL_TEXT (RID_SFX_START+158)
#define SFX_THUMBNAIL_SHEET (RID_SFX_START+159)
#define SFX_THUMBNAIL_PRESENTATION (RID_SFX_START+160)
#define SFX_THUMBNAIL_DRAWING (RID_SFX_START+161)
//=========================================================================
// group ids
...
...
sfx2/inc/templatedlg.hxx
Dosyayı görüntüle @
af331776
...
...
@@ -50,6 +50,8 @@ public:
DECL_LINK
(
ActivatePageHdl
,
void
*
);
static
BitmapEx
getDefaultThumbnail
(
const
rtl
::
OUString
&
rPath
);
private
:
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
...
...
sfx2/source/appl/sfx.src
Dosyayı görüntüle @
af331776
...
...
@@ -37,3 +37,23 @@ String STR_PASSWD
{
Text [ en-US ] = "Password" ;
};
Bitmap ( SFX_THUMBNAIL_TEXT )
{
File = "odt_48_8.png";
};
Bitmap ( SFX_THUMBNAIL_SHEET )
{
File = "ods_48_8.png";
};
Bitmap ( SFX_THUMBNAIL_PRESENTATION )
{
File = "odp_48_8.png";
};
Bitmap ( SFX_THUMBNAIL_DRAWING )
{
File = "odg_48_8.png";
};
sfx2/source/control/templateview.cxx
Dosyayı görüntüle @
af331776
...
...
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "templatedlg.hxx"
#include <sfx2/templateview.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
...
...
@@ -63,6 +64,11 @@ void TemplateView::InsertItems (const std::vector<TemplateItemProperties> &rTemp
pItem
->
maTitle
=
pCur
->
aName
;
pItem
->
setPath
(
pCur
->
aPath
);
pItem
->
maPreview1
=
pCur
->
aThumbnail
;
if
(
pCur
->
aThumbnail
.
IsEmpty
()
)
{
// Use the default thumbnail if we have nothing else
pItem
->
maPreview1
=
SfxTemplateManagerDlg
::
getDefaultThumbnail
(
pItem
->
getPath
()
);
}
pItem
->
setSelectClickHdl
(
LINK
(
this
,
ThumbnailView
,
OnItemSelected
));
mItemList
.
push_back
(
pItem
);
...
...
sfx2/source/doc/templatedlg.cxx
Dosyayı görüntüle @
af331776
...
...
@@ -1534,6 +1534,31 @@ void SfxTemplateManagerDlg::syncRepositories() const
}
}
BitmapEx
SfxTemplateManagerDlg
::
getDefaultThumbnail
(
const
OUString
&
rPath
)
{
INetURLObject
aUrl
(
rPath
);
OUString
aExt
=
aUrl
.
getExtension
();
BitmapEx
aImg
;
if
(
aExt
==
"ott"
||
aExt
==
"stw"
||
aExt
==
"oth"
||
aExt
==
"dot"
||
aExt
==
"dotx"
)
{
aImg
=
BitmapEx
(
SfxResId
(
SFX_THUMBNAIL_TEXT
)
);
}
else
if
(
aExt
==
"ots"
||
aExt
==
"stc"
||
aExt
==
"xlt"
||
aExt
==
"xltm"
||
aExt
==
"xltx"
)
{
aImg
=
BitmapEx
(
SfxResId
(
SFX_THUMBNAIL_SHEET
)
);
}
else
if
(
aExt
==
"otp"
||
aExt
==
"sti"
||
aExt
==
"pot"
||
aExt
==
"potm"
||
aExt
==
"potx"
)
{
aImg
=
BitmapEx
(
SfxResId
(
SFX_THUMBNAIL_PRESENTATION
)
);
}
else
if
(
aExt
==
"otg"
||
aExt
==
"std"
)
{
aImg
=
BitmapEx
(
SfxResId
(
SFX_THUMBNAIL_DRAWING
)
);
}
return
aImg
;
}
static
bool
lcl_getServiceName
(
const
OUString
&
rFileURL
,
OUString
&
rName
)
{
bool
bRet
=
false
;
...
...
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