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
cda4febf
Kaydet (Commit)
cda4febf
authored
Agu 14, 2012
tarafından
Rafael Dominguez
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Display template information like author,type,keywords,etc.
Change-Id: I541ba1e40bd320701fac5d75615c8c9486dfebb9
üst
0c03f794
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
templateinfodlg.hxx
sfx2/inc/sfx2/templateinfodlg.hxx
+2
-0
templateinfodlg.cxx
sfx2/source/dialog/templateinfodlg.cxx
+50
-1
templatedlg.cxx
sfx2/source/doc/templatedlg.cxx
+3
-0
No files found.
sfx2/inc/sfx2/templateinfodlg.hxx
Dosyayı görüntüle @
cda4febf
...
...
@@ -25,6 +25,8 @@ public:
~
SfxTemplateInfoDlg
();
void
loadDocument
(
const
OUString
&
rURL
);
private
:
PushButton
maBtnClose
;
...
...
sfx2/source/dialog/templateinfodlg.cxx
Dosyayı görüntüle @
cda4febf
...
...
@@ -9,19 +9,68 @@
#include <sfx2/templateinfodlg.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/sfxresid.hxx>
#include <svtools/DocumentInfoPreview.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include "templateinfodlg.hrc"
#define DLG_BORDER_SIZE 12
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
beans
;
using
namespace
::
com
::
sun
::
star
::
document
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
task
;
SfxTemplateInfoDlg
::
SfxTemplateInfoDlg
(
Window
*
pParent
)
:
ModalDialog
(
pParent
,
SfxResId
(
DLG_TEMPLATE_INFORMATION
)),
maBtnClose
(
this
,
SfxResId
(
BTN_TEMPLATE_INFO_CLOSE
))
maBtnClose
(
this
,
SfxResId
(
BTN_TEMPLATE_INFO_CLOSE
)),
mpInfoView
(
new
svtools
::
ODocumentInfoPreview
(
this
,
WB_LEFT
|
WB_VSCROLL
|
WB_READONLY
|
WB_BORDER
|
WB_3DLOOK
))
{
Size
aWinSize
=
GetOutputSizePixel
();
aWinSize
.
setHeight
(
aWinSize
.
getHeight
()
-
3
*
DLG_BORDER_SIZE
-
maBtnClose
.
GetOutputHeightPixel
()
);
aWinSize
.
setWidth
(
(
aWinSize
.
getWidth
()
-
3
*
DLG_BORDER_SIZE
)
/
2
);
mpInfoView
->
SetPosSizePixel
(
Point
(
DLG_BORDER_SIZE
,
DLG_BORDER_SIZE
),
aWinSize
);
mpInfoView
->
Show
();
}
SfxTemplateInfoDlg
::~
SfxTemplateInfoDlg
()
{
delete
mpInfoView
;
}
void
SfxTemplateInfoDlg
::
loadDocument
(
const
OUString
&
rURL
)
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xContext
(
comphelper
::
getProcessServiceFactory
());
try
{
uno
::
Reference
<
task
::
XInteractionHandler
>
xInteractionHandler
(
xContext
->
createInstance
(
"com.sun.star.task.InteractionHandler"
),
uno
::
UNO_QUERY
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aProps
(
1
);
aProps
[
0
].
Name
=
"InteractionHandler"
;
aProps
[
0
].
Value
<<=
xInteractionHandler
;
uno
::
Reference
<
document
::
XDocumentProperties
>
xDocProps
(
xContext
->
createInstance
(
"com.sun.star.document.DocumentProperties"
),
uno
::
UNO_QUERY
);
xDocProps
->
loadFromMedium
(
rURL
,
aProps
);
mpInfoView
->
fill
(
xDocProps
,
rURL
);
}
catch
(
beans
::
UnknownPropertyException
&
)
{
}
catch
(
uno
::
Exception
&
)
{
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/doc/templatedlg.cxx
Dosyayı görüntüle @
cda4febf
...
...
@@ -947,7 +947,10 @@ void SfxTemplateManagerDlg::OnTemplateEdit ()
void
SfxTemplateManagerDlg
::
OnTemplateProperties
()
{
const
TemplateViewItem
*
pItem
=
static_cast
<
const
TemplateViewItem
*>
(
*
maSelTemplates
.
begin
());
SfxTemplateInfoDlg
aDlg
;
aDlg
.
loadDocument
(
pItem
->
getPath
());
aDlg
.
Execute
();
}
...
...
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