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
8a1ad93a
Kaydet (Commit)
8a1ad93a
authored
Agu 13, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
reduce code duplication
Change-Id: Ie5910239d7a54a29262e556af779bda9fa2dddca
üst
cc6bd125
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
31 deletions
+51
-31
unomodel.hxx
sd/source/ui/inc/unomodel.hxx
+4
-0
unomodel.cxx
sd/source/ui/unoidl/unomodel.cxx
+47
-31
No files found.
sd/source/ui/inc/unomodel.hxx
Dosyayı görüntüle @
8a1ad93a
...
...
@@ -56,6 +56,7 @@ class SdPage;
namespace
sd
{
class
DrawDocShell
;
class
DrawViewShell
;
}
extern
OUString
getPageApiName
(
SdPage
*
pPage
);
...
...
@@ -123,6 +124,9 @@ private:
OUString
maBuildId
;
void
initializeDocument
();
sd
::
DrawViewShell
*
GetViewShell
();
public
:
SdXImpressDocument
(
::
sd
::
DrawDocShell
*
pShell
,
bool
bClipBoard
=
false
)
throw
();
SdXImpressDocument
(
SdDrawDocument
*
pDoc
,
bool
bClipBoard
=
false
)
throw
();
...
...
sd/source/ui/unoidl/unomodel.cxx
Dosyayı görüntüle @
8a1ad93a
...
...
@@ -2188,11 +2188,26 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
}
}
DrawViewShell
*
SdXImpressDocument
::
GetViewShell
()
{
DrawViewShell
*
pViewSh
=
dynamic_cast
<
DrawViewShell
*>
(
mpDocShell
->
GetViewShell
());
if
(
!
pViewSh
)
{
SAL_WARN
(
"sd"
,
"DrawViewShell not available!"
);
return
NULL
;
}
return
pViewSh
;
}
void
SdXImpressDocument
::
paintTile
(
VirtualDevice
&
rDevice
,
int
nOutputWidth
,
int
nOutputHeight
,
int
nTilePosX
,
int
nTilePosY
,
long
nTileWidth
,
long
nTileHeight
)
{
DrawViewShell
*
pViewSh
=
GetViewShell
();
if
(
!
pViewSh
)
return
;
// Scaling. Must convert from pixels to twips. We know
// that VirtualDevices use a DPI of 96.
// We specifically calculate these scales first as we're still
...
...
@@ -2221,26 +2236,27 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice,
rDevice
.
SetMapMode
(
aMapMode
);
rDevice
.
SetOutputSizePixel
(
Size
(
nOutputWidth
,
nOutputHeight
)
);
mpDoc
->
GetDocSh
()
->
GetViewShell
()
->
GetView
()
->
CompleteRedraw
(
&
rDevice
,
Region
(
Rectangle
(
Point
(
nTilePosX
,
nTilePosY
),
Size
(
nTileWidth
,
nTileHeight
)
)
)
);
Point
aPoint
(
nTilePosX
,
nTilePosY
);
Size
aSize
(
nTileWidth
,
nTileHeight
);
Rectangle
aRect
(
aPoint
,
aSize
);
pViewSh
->
GetView
()
->
CompleteRedraw
(
&
rDevice
,
Region
(
aRect
));
}
void
SdXImpressDocument
::
setPart
(
int
nPart
)
{
DrawViewShell
*
pViewSh
=
dynamic_cast
<
DrawViewShell
*
>
(
mpDoc
->
GetDocSh
()
->
GetViewShell
()
);
if
(
pViewSh
)
{
// TODO: have an API to allow selecting between PK_STANDARD (just slide)
// and PK_NOTES (which shows the combined slide above notes). There is alo
// a PK_HANDOUT -- that however just shows multiple empty pages (it's als
o
// only possible to select page 0 in this mode, I have no idea how you
// then actually select what is on the handout page, which defaults to
// a 4x4 grid of empty pages).
pViewSh
->
SwitchPage
(
nPart
);
}
DrawViewShell
*
pViewSh
=
GetViewShell
(
);
if
(
!
pViewSh
)
return
;
// TODO: have an API to allow selecting between PK_STANDARD (just slide)
// and PK_NOTES (which shows the combined slide above notes). There is al
o
// a PK_HANDOUT -- that however just shows multiple empty pages (it's also
// only possible to select page 0 in this mode, I have no idea how you
// then actually select what is on the handout page, which defaults to
// a 4x4 grid of empty pages).
pViewSh
->
SwitchPage
(
nPart
);
}
int
SdXImpressDocument
::
getParts
()
...
...
@@ -2252,29 +2268,31 @@ int SdXImpressDocument::getParts()
int
SdXImpressDocument
::
getPart
()
{
DrawViewShell
*
pViewSh
=
dynamic_cast
<
DrawViewShell
*
>
(
mpDoc
->
GetDocSh
()
->
GetViewShell
()
);
if
(
pViewSh
)
{
// curPageId seems to start at 1
return
pViewSh
->
GetCurPageId
()
-
1
;
}
return
0
;
DrawViewShell
*
pViewSh
=
GetViewShell
();
if
(
!
pViewSh
)
return
0
;
// curPageId seems to start at 1
return
pViewSh
->
GetCurPageId
()
-
1
;
}
OUString
SdXImpressDocument
::
getPartName
(
int
nPart
)
{
SdPage
*
pPage
=
mpDoc
->
GetSdPage
(
nPart
,
PK_STANDARD
);
assert
(
pPage
);
if
(
!
pPage
)
{
SAL_WARN
(
"sd"
,
"DrawViewShell not available!"
);
return
OUString
();
}
return
pPage
->
GetName
();
}
void
SdXImpressDocument
::
setPartMode
(
LibreOfficeKitPartMode
ePartMode
)
{
DrawViewShell
*
pViewSh
=
dynamic_cast
<
DrawViewShell
*
>
(
mpDoc
->
GetDocSh
()
->
GetViewShell
()
);
DrawViewShell
*
pViewSh
=
GetViewShell
(
);
if
(
!
pViewSh
)
{
return
;
}
PageKind
aPageKind
(
PK_STANDARD
);
switch
(
ePartMode
)
...
...
@@ -2303,14 +2321,12 @@ void SdXImpressDocument::setPartMode( LibreOfficeKitPartMode ePartMode )
Size
SdXImpressDocument
::
getDocumentSize
()
{
DrawViewShell
*
pViewSh
=
dynamic_cast
<
DrawViewShell
*>
(
mpDoc
->
GetDocSh
()
->
GetViewShell
()
);
DrawViewShell
*
pViewSh
=
GetViewShell
(
);
if
(
!
pViewSh
)
{
SAL_WARN
(
"sd"
,
"DrawViewShell not available!"
);
return
Size
();
}
SdrPageView
*
pCurPageView
=
pViewSh
->
GetView
()
->
GetSdrPageView
();
Size
aSize
=
pCurPageView
->
GetPageRect
().
GetSize
();
// Convert the size in 100th mm to TWIP
// See paintTile above for further info.
...
...
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