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
f9f4c631
Kaydet (Commit)
f9f4c631
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 Calc
üst
3f845c29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
docuno.cxx
sc/source/ui/unoobj/docuno.cxx
+11
-15
No files found.
sc/source/ui/unoobj/docuno.cxx
Dosyayı görüntüle @
f9f4c631
...
...
@@ -785,7 +785,7 @@ sal_Bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
{
rOptions
[
i
].
Value
>>=
bIncludeEmptyPages
;
}
else
if
(
rOptions
[
i
].
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"PageRange"
)
)
)
else
if
(
rOptions
[
i
].
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"PageRange"
)
)
)
{
rOptions
[
i
].
Value
>>=
aPageRange
;
}
...
...
@@ -956,9 +956,8 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
sal_Int32
nSelectCount
=
nPages
;
if
(
aPagesStr
.
Len
()
)
{
MultiSelection
aPageRanges
(
aPagesStr
);
aPageRanges
.
SetTotalRange
(
Range
(
1
,
nPages
)
);
nSelectCount
=
aPageRanges
.
GetSelectCount
();
StringRangeEnumerator
aRangeEnum
(
aPagesStr
,
0
,
nPages
-
1
);
nSelectCount
=
aRangeEnum
.
size
();
}
return
nSelectCount
;
}
...
...
@@ -968,16 +967,13 @@ sal_Int32 lcl_GetRendererNum( sal_Int32 nSelRenderer, const String& rPagesStr, s
if
(
!
rPagesStr
.
Len
()
)
return
nSelRenderer
;
MultiSelection
aPageRanges
(
rPagesStr
);
aPageRanges
.
SetTotalRange
(
Range
(
1
,
nTotalPages
)
);
StringRangeEnumerator
aRangeEnum
(
rPagesStr
,
0
,
nTotalPages
-
1
);
StringRangeEnumerator
::
Iterator
aIter
=
aRangeEnum
.
begin
();
StringRangeEnumerator
::
Iterator
aEnd
=
aRangeEnum
.
end
();
for
(
;
nSelRenderer
>
0
&&
aIter
!=
aEnd
;
--
nSelRenderer
)
++
aIter
;
sal_Int32
nSelected
=
aPageRanges
.
FirstSelected
();
while
(
nSelRenderer
>
0
)
{
nSelected
=
aPageRanges
.
NextSelected
();
--
nSelRenderer
;
}
return
nSelected
-
1
;
// selection is 1-based
return
*
aIter
;
// returns -1 if reached the end
}
uno
::
Sequence
<
beans
::
PropertyValue
>
SAL_CALL
ScModelObj
::
getRenderer
(
sal_Int32
nSelRenderer
,
...
...
@@ -1003,7 +999,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
nTotalPages
=
pPrintFuncCache
->
GetPageCount
();
}
sal_Int32
nRenderer
=
lcl_GetRendererNum
(
nSelRenderer
,
aPagesStr
,
nTotalPages
);
if
(
nRenderer
>=
nTotalPages
)
if
(
nRenderer
<
0
)
{
if
(
nSelRenderer
==
0
)
{
...
...
@@ -1108,7 +1104,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
long
nTotalPages
=
pPrintFuncCache
->
GetPageCount
();
sal_Int32
nRenderer
=
lcl_GetRendererNum
(
nSelRenderer
,
aPagesStr
,
nTotalPages
);
if
(
nRenderer
>=
nTotalPages
)
if
(
nRenderer
<
0
)
throw
lang
::
IllegalArgumentException
();
OutputDevice
*
pDev
=
lcl_GetRenderDevice
(
rOptions
);
...
...
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