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
c4b76f04
Kaydet (Commit)
c4b76f04
authored
Eki 10, 2013
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i123405 Allow to not limit size to PageSize when creating Metafile content
üst
225fe06a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
transobj.cxx
sc/source/ui/app/transobj.cxx
+13
-6
transobj.hxx
sc/source/ui/inc/transobj.hxx
+3
-1
No files found.
sc/source/ui/app/transobj.cxx
Dosyayı görüntüle @
c4b76f04
...
...
@@ -346,11 +346,15 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
}
else
if
(
nFormat
==
SOT_FORMAT_GDIMETAFILE
)
{
InitDocShell
();
// #123405# Do not limit visual size calculation for metafile creation.
// It seems unlikely that removing the limitation causes problems since
// metafile creation means that no real pixel device in the needed size is
// created.
InitDocShell
(
false
);
SfxObjectShell
*
pEmbObj
=
aDocShellRef
;
// like SvEmbeddedTransfer::GetData:
GDIMetaFile
aMtf
;
VirtualDevice
aVDev
;
MapMode
aMapMode
(
pEmbObj
->
GetMapUnit
()
);
...
...
@@ -372,7 +376,8 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
else
if
(
nFormat
==
SOT_FORMATSTR_ID_EMBED_SOURCE
)
{
//TODO/LATER: differentiate between formats?!
InitDocShell
();
// set aDocShellRef
// #123405# Do limit visual size calculation to PageSize
InitDocShell
(
true
);
// set aDocShellRef
SfxObjectShell
*
pEmbObj
=
aDocShellRef
;
bOK
=
SetObject
(
pEmbObj
,
SCTRANS_TYPE_EMBOBJ
,
rFlavor
);
...
...
@@ -574,8 +579,10 @@ ScMarkData ScTransferObj::GetSourceMarkData()
//
// initialize aDocShellRef with a live document from the ClipDoc
//
// #123405# added parameter to allow size calculation without limitation
// to PageSize, e.g. used for Metafile creation for clipboard.
void
ScTransferObj
::
InitDocShell
()
void
ScTransferObj
::
InitDocShell
(
bool
bLimitToPageSize
)
{
if
(
!
aDocShellRef
.
Is
()
)
{
...
...
@@ -697,14 +704,14 @@ void ScTransferObj::InitDocShell()
for
(
nCol
=
nStartX
;
nCol
<=
nEndX
;
nCol
++
)
{
long
nAdd
=
pDestDoc
->
GetColWidth
(
nCol
,
0
);
if
(
nSizeX
+
nAdd
>
aPaperSize
.
Width
()
&&
nSizeX
)
// above limit?
if
(
bLimitToPageSize
&&
nSizeX
+
nAdd
>
aPaperSize
.
Width
()
&&
nSizeX
)
// above limit?
break
;
nSizeX
+=
nAdd
;
}
for
(
SCROW
nRow
=
nStartY
;
nRow
<=
nEndY
;
nRow
++
)
{
long
nAdd
=
pDestDoc
->
GetRowHeight
(
nRow
,
0
);
if
(
nSizeY
+
nAdd
>
aPaperSize
.
Height
()
&&
nSizeY
)
// above limit?
if
(
bLimitToPageSize
&&
nSizeY
+
nAdd
>
aPaperSize
.
Height
()
&&
nSizeY
)
// above limit?
break
;
nSizeY
+=
nAdd
;
}
...
...
sc/source/ui/inc/transobj.hxx
Dosyayı görüntüle @
c4b76f04
...
...
@@ -62,7 +62,9 @@ private:
bool
bHasFiltered
;
// if has filtered rows
bool
bUseInApi
;
// to recognize clipboard content copied from API
void
InitDocShell
();
// #123405# added parameter to allow size calculation without limitation
// to PageSize, e.g. used for Metafile creation for clipboard.
void
InitDocShell
(
bool
bLimitToPageSize
);
static
void
StripRefs
(
ScDocument
*
pDoc
,
SCCOL
nStartX
,
SCROW
nStartY
,
SCCOL
nEndX
,
SCROW
nEndY
,
ScDocument
*
pDestDoc
=
0
,
...
...
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