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
5ad4d151
Kaydet (Commit)
5ad4d151
authored
Eki 19, 2011
tarafından
Ivan Timofeev
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
migrate to StringRangeEnumerator in pdfexport
üst
f9f4c631
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
24 deletions
+32
-24
pdfexport.cxx
filter/source/pdf/pdfexport.cxx
+22
-20
pdfexport.hxx
filter/source/pdf/pdfexport.hxx
+6
-2
EnhancedPDFExportHelper.hxx
sw/inc/EnhancedPDFExportHelper.hxx
+4
-2
EnhancedPDFExportHelper.cxx
sw/source/core/text/EnhancedPDFExportHelper.cxx
+0
-0
No files found.
filter/source/pdf/pdfexport.cxx
Dosyayı görüntüle @
5ad4d151
...
...
@@ -168,8 +168,12 @@ PDFExport::~PDFExport()
// -----------------------------------------------------------------------------
sal_Bool
PDFExport
::
ExportSelection
(
vcl
::
PDFWriter
&
rPDFWriter
,
Reference
<
com
::
sun
::
star
::
view
::
XRenderable
>&
rRenderable
,
Any
&
rSelection
,
MultiSelection
aMultiSelection
,
Sequence
<
PropertyValue
>&
rRenderOptions
,
sal_Int32
nPageCount
)
sal_Bool
PDFExport
::
ExportSelection
(
vcl
::
PDFWriter
&
rPDFWriter
,
Reference
<
com
::
sun
::
star
::
view
::
XRenderable
>&
rRenderable
,
const
Any
&
rSelection
,
const
StringRangeEnumerator
&
rRangeEnum
,
Sequence
<
PropertyValue
>&
rRenderOptions
,
sal_Int32
nPageCount
)
{
sal_Bool
bRet
=
sal_False
;
try
...
...
@@ -192,11 +196,12 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, Reference< com:
vcl
::
PDFExtOutDevData
*
pPDFExtOutDevData
=
PTR_CAST
(
vcl
::
PDFExtOutDevData
,
pOut
->
GetExtOutDevData
()
);
if
(
nPageCount
)
{
sal_Int32
nSel
=
aMultiSelection
.
FirstSelected
();
sal_Int32
nCurrentPage
(
0
);
while
(
nSel
!=
sal_Int32
(
SFX_ENDOFSELECTION
)
)
StringRangeEnumerator
::
Iterator
aIter
=
rRangeEnum
.
begin
();
StringRangeEnumerator
::
Iterator
aEnd
=
rRangeEnum
.
end
();
while
(
aIter
!=
aEnd
)
{
Sequence
<
PropertyValue
>
aRenderer
(
rRenderable
->
getRenderer
(
nSel
-
1
,
rSelection
,
rRenderOptions
)
);
Sequence
<
PropertyValue
>
aRenderer
(
rRenderable
->
getRenderer
(
*
aIter
,
rSelection
,
rRenderOptions
)
);
awt
::
Size
aPageSize
;
for
(
sal_Int32
nProperty
=
0
,
nPropertyCount
=
aRenderer
.
getLength
();
nProperty
<
nPropertyCount
;
++
nProperty
)
...
...
@@ -221,9 +226,9 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, Reference< com:
// #i35176#
// IsLastPage property.
const
sal_Int32
nCurrentRenderer
=
nSel
-
1
;
nSel
=
aMultiSelection
.
NextSelected
()
;
if
(
pLastPage
&&
sal_Int32
(
SFX_ENDOFSELECTION
)
==
nSel
)
const
sal_Int32
nCurrentRenderer
=
*
aIter
;
++
aIter
;
if
(
pLastPage
&&
aIter
==
aEnd
)
*
pLastPage
<<=
sal_True
;
rRenderable
->
render
(
nCurrentRenderer
,
rSelection
,
rRenderOptions
);
...
...
@@ -862,8 +867,6 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
}
const
sal_Int32
nPageCount
=
xRenderable
->
getRendererCount
(
aSelection
,
aRenderOptions
);
const
Range
aRange
(
1
,
nPageCount
);
MultiSelection
aMultiSelection
;
if
(
mbExportNotesPages
&&
aCreator
.
EqualsAscii
(
"Impress"
)
)
{
...
...
@@ -874,21 +877,20 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
if
(
!
aPageRange
.
getLength
()
)
{
aMultiSelection
.
SetTotalRange
(
aRange
);
aMultiSelection
.
Select
(
aRange
);
}
else
{
aMultiSelection
=
MultiSelection
(
aPageRange
);
aMultiSelection
.
SetTotalRange
(
aRange
);
aPageRange
=
OUStringBuffer
()
.
append
(
static_cast
<
sal_Int32
>
(
1
)
)
.
append
(
static_cast
<
sal_Unicode
>
(
'-'
)
)
.
append
(
nPageCount
).
makeStringAndClear
();
}
StringRangeEnumerator
aRangeEnum
(
aPageRange
,
0
,
nPageCount
-
1
);
if
(
mxStatusIndicator
.
is
()
)
{
ByteString
aResMgrName
(
"pdffilter"
);
ResMgr
*
pResMgr
=
ResMgr
::
CreateResMgr
(
aResMgrName
.
GetBuffer
(),
Application
::
GetSettings
().
GetUILocale
()
);
if
(
pResMgr
)
{
sal_Int32
nTotalPageCount
=
a
MultiSelection
.
GetSelectCount
();
sal_Int32
nTotalPageCount
=
a
RangeEnum
.
size
();
if
(
bSecondPassForImpressNotes
)
nTotalPageCount
*=
2
;
mxStatusIndicator
->
start
(
String
(
ResId
(
PDF_PROGRESS_BAR
,
*
pResMgr
)
),
nTotalPageCount
);
...
...
@@ -897,14 +899,14 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
}
if
(
nPageCount
>
0
)
bRet
=
ExportSelection
(
*
pPDFWriter
,
xRenderable
,
aSelection
,
a
MultiSelection
,
aRenderOptions
,
nPageCount
);
bRet
=
ExportSelection
(
*
pPDFWriter
,
xRenderable
,
aSelection
,
a
RangeEnum
,
aRenderOptions
,
nPageCount
);
else
bRet
=
sal_False
;
if
(
bRet
&&
bSecondPassForImpressNotes
)
{
rExportNotesValue
<<=
sal_True
;
bRet
=
ExportSelection
(
*
pPDFWriter
,
xRenderable
,
aSelection
,
a
MultiSelection
,
aRenderOptions
,
nPageCount
);
bRet
=
ExportSelection
(
*
pPDFWriter
,
xRenderable
,
aSelection
,
a
RangeEnum
,
aRenderOptions
,
nPageCount
);
}
if
(
mxStatusIndicator
.
is
()
)
mxStatusIndicator
->
end
();
...
...
filter/source/pdf/pdfexport.hxx
Dosyayı görüntüle @
5ad4d151
...
...
@@ -125,8 +125,12 @@ public:
const
Reference
<
lang
::
XMultiServiceFactory
>&
xFact
);
~
PDFExport
();
sal_Bool
ExportSelection
(
vcl
::
PDFWriter
&
rPDFWriter
,
Reference
<
com
::
sun
::
star
::
view
::
XRenderable
>&
rRenderable
,
Any
&
rSelection
,
MultiSelection
aMultiSelection
,
Sequence
<
PropertyValue
>&
rRenderOptions
,
sal_Int32
nPageCount
);
sal_Bool
ExportSelection
(
vcl
::
PDFWriter
&
rPDFWriter
,
Reference
<
com
::
sun
::
star
::
view
::
XRenderable
>&
rRenderable
,
const
Any
&
rSelection
,
const
StringRangeEnumerator
&
rRangeEnum
,
Sequence
<
PropertyValue
>&
rRenderOptions
,
sal_Int32
nPageCount
);
sal_Bool
Export
(
const
OUString
&
rFile
,
const
Sequence
<
PropertyValue
>&
rFilterData
);
...
...
sw/inc/EnhancedPDFExportHelper.hxx
Dosyayı görüntüle @
5ad4d151
...
...
@@ -51,7 +51,7 @@ namespace rtl
{
class
OUString
;
}
class
MultiSelection
;
class
StringRangeEnumerator
;
class
SwTxtNode
;
class
SwNumRule
;
class
SwTable
;
...
...
@@ -215,7 +215,8 @@ class SwEnhancedPDFExportHelper
SwEditShell
&
mrSh
;
OutputDevice
&
mrOut
;
MultiSelection
*
pPageRange
;
StringRangeEnumerator
*
mpRangeEnum
;
std
::
vector
<
bool
>
maIsPageEmpty
;
bool
mbSkipEmptyPages
;
bool
mbEditEngineOnly
;
...
...
@@ -230,6 +231,7 @@ class SwEnhancedPDFExportHelper
void
EnhancedPDFExport
();
sal_Int32
CalcOutputPageNum
(
const
SwRect
&
rRect
)
const
;
void
CalcOutputPageNums
(
const
SwRect
&
rRect
,
std
::
vector
<
sal_Int32
>&
rPageNums
)
const
;
void
MakeHeaderFooterLinks
(
vcl
::
PDFExtOutDevData
&
rPDFExtOutDevData
,
const
SwTxtNode
&
rTNd
,
const
SwRect
&
rLinkRect
,
...
...
sw/source/core/text/EnhancedPDFExportHelper.cxx
Dosyayı görüntüle @
5ad4d151
This diff is collapsed.
Click to expand it.
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