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
361824bb
Kaydet (Commit)
361824bb
authored
Tem 24, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use more proper integer types, avoid temporaries, constify
Change-Id: I8352df21754e7b12ad0851dcdb64be6aa679537e
üst
6f7f22df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
srcview.cxx
sw/source/uibase/uiview/srcview.cxx
+11
-12
uivwimp.cxx
sw/source/uibase/uiview/uivwimp.cxx
+1
-2
No files found.
sw/source/uibase/uiview/srcview.cxx
Dosyayı görüntüle @
361824bb
...
@@ -127,7 +127,7 @@ void SwSrcView::InitInterface_Impl()
...
@@ -127,7 +127,7 @@ void SwSrcView::InitInterface_Impl()
TYPEINIT1
(
SwSrcView
,
SfxViewShell
)
TYPEINIT1
(
SwSrcView
,
SfxViewShell
)
static
void
lcl_PrintHeader
(
OutputDevice
&
rOutDev
,
sal_
uInt16
nPages
,
sal_uInt16
nCurPage
,
const
OUString
&
rTitle
)
static
void
lcl_PrintHeader
(
OutputDevice
&
rOutDev
,
sal_
Int32
nPages
,
sal_Int32
nCurPage
,
const
OUString
&
rTitle
)
{
{
short
nLeftMargin
=
LMARGPRN
;
short
nLeftMargin
=
LMARGPRN
;
Size
aSz
=
rOutDev
.
GetOutputSize
();
Size
aSz
=
rOutDev
.
GetOutputSize
();
...
@@ -287,9 +287,8 @@ void SwSrcView::SaveContent(const OUString& rTmpFile)
...
@@ -287,9 +287,8 @@ void SwSrcView::SaveContent(const OUString& rTmpFile)
void
SwSrcView
::
Execute
(
SfxRequest
&
rReq
)
void
SwSrcView
::
Execute
(
SfxRequest
&
rReq
)
{
{
sal_uInt16
nSlot
=
rReq
.
GetSlot
();
TextView
*
pTextView
=
aEditWin
.
GetTextView
();
TextView
*
pTextView
=
aEditWin
.
GetTextView
();
switch
(
nSlot
)
switch
(
rReq
.
GetSlot
()
)
{
{
case
SID_SAVEACOPY
:
case
SID_SAVEACOPY
:
case
SID_SAVEASDOC
:
case
SID_SAVEASDOC
:
...
@@ -364,7 +363,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
...
@@ -364,7 +363,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
{
const
SfxItemSet
*
pTmpArgs
=
rReq
.
GetArgs
();
const
SfxItemSet
*
pTmpArgs
=
rReq
.
GetArgs
();
sal_uInt16
nWhich
=
pTmpArgs
->
GetWhichByPos
(
0
);
const
sal_uInt16
nWhich
=
pTmpArgs
->
GetWhichByPos
(
0
);
OSL_ENSURE
(
nWhich
,
"Which for SearchItem ?"
);
OSL_ENSURE
(
nWhich
,
"Which for SearchItem ?"
);
const
SfxPoolItem
&
rItem
=
pTmpArgs
->
Get
(
nWhich
);
const
SfxPoolItem
&
rItem
=
pTmpArgs
->
Get
(
nWhich
);
SetSearchItem
(
(
const
SvxSearchItem
&
)
rItem
);
SetSearchItem
(
(
const
SvxSearchItem
&
)
rItem
);
...
@@ -578,7 +577,7 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
...
@@ -578,7 +577,7 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
bool
bAtStart
=
pTextView
->
GetSelection
()
==
TextSelection
(
aPaM
,
aPaM
);
bool
bAtStart
=
pTextView
->
GetSelection
()
==
TextSelection
(
aPaM
,
aPaM
);
if
(
!
bForward
)
if
(
!
bForward
)
aPaM
=
TextPaM
(
(
sal_uLong
)
-
1
,
(
sal_uInt16
)
-
1
);
aPaM
=
TextPaM
(
(
sal_uLong
)
-
1
,
USHRT_MAX
);
if
(
bFromStart
)
if
(
bFromStart
)
{
{
...
@@ -712,28 +711,28 @@ sal_Int32 SwSrcView::PrintSource(
...
@@ -712,28 +711,28 @@ sal_Int32 SwSrcView::PrintSource(
OUString
aTitle
(
GetViewFrame
()
->
GetWindow
().
GetText
()
);
OUString
aTitle
(
GetViewFrame
()
->
GetWindow
().
GetText
()
);
sal_uInt16
nLineHeight
=
(
sal_uInt16
)
pOutDev
->
GetTextHeight
();
// slightly more
const
long
nLineHeight
=
pOutDev
->
GetTextHeight
();
// slightly more
sal_uInt16
nParaSpace
=
10
;
const
long
nParaSpace
=
10
;
Size
aPaperSz
=
pOutDev
->
GetOutputSize
();
Size
aPaperSz
=
pOutDev
->
GetOutputSize
();
aPaperSz
.
Width
()
-=
(
LMARGPRN
+
RMARGPRN
);
aPaperSz
.
Width
()
-=
(
LMARGPRN
+
RMARGPRN
);
aPaperSz
.
Height
()
-=
(
TMARGPRN
+
BMARGPRN
);
aPaperSz
.
Height
()
-=
(
TMARGPRN
+
BMARGPRN
);
// nLinepPage is not true, if lines have to be wrapped...
// nLinepPage is not true, if lines have to be wrapped...
sal_uInt16
nLinespPage
=
(
sal_uInt16
)
(
aPaperSz
.
Height
()
/
nLineHeight
)
;
const
long
nLinespPage
=
aPaperSz
.
Height
()
/
nLineHeight
;
const
sal_Int32
nCharspLine
=
const
sal_Int32
nCharspLine
=
static_cast
<
sal_Int32
>
(
aPaperSz
.
Width
()
/
pOutDev
->
GetTextWidth
(
"X"
));
static_cast
<
sal_Int32
>
(
aPaperSz
.
Width
()
/
pOutDev
->
GetTextWidth
(
"X"
));
sal_uInt16
nParas
=
static_cast
<
sal_uInt16
>
(
pTextEngine
->
GetParagraphCount
()
);
const
sal_uLong
nParas
=
pTextEngine
->
GetParagraphCount
(
);
sal_uInt16
nPages
=
(
sal_uInt16
)
(
nParas
/
nLinespPage
+
1
);
const
sal_Int32
nPages
=
static_cast
<
sal_Int32
>
(
nParas
/
nLinespPage
+
1
);
sal_
uInt16
nCurPage
=
1
;
sal_
Int32
nCurPage
=
1
;
// Print header...
// Print header...
if
(
!
bCalcNumPagesOnly
&&
nPage
==
nCurPage
)
if
(
!
bCalcNumPagesOnly
&&
nPage
==
nCurPage
)
lcl_PrintHeader
(
*
pOutDev
,
nPages
,
nCurPage
,
aTitle
);
lcl_PrintHeader
(
*
pOutDev
,
nPages
,
nCurPage
,
aTitle
);
const
Point
aStartPos
(
LMARGPRN
,
TMARGPRN
);
const
Point
aStartPos
(
LMARGPRN
,
TMARGPRN
);
Point
aPos
(
aStartPos
);
Point
aPos
(
aStartPos
);
for
(
sal_u
Int16
nPara
=
0
;
nPara
<
nParas
;
++
nPara
)
for
(
sal_u
Long
nPara
=
0
;
nPara
<
nParas
;
++
nPara
)
{
{
const
OUString
aLine
(
lcl_ConvertTabsToSpaces
(
pTextEngine
->
GetText
(
nPara
))
);
const
OUString
aLine
(
lcl_ConvertTabsToSpaces
(
pTextEngine
->
GetText
(
nPara
))
);
const
sal_Int32
nLineLen
=
aLine
.
getLength
();
const
sal_Int32
nLineLen
=
aLine
.
getLength
();
...
...
sw/source/uibase/uiview/uivwimp.cxx
Dosyayı görüntüle @
361824bb
...
@@ -121,8 +121,7 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl()
...
@@ -121,8 +121,7 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl()
void
SwView_Impl
::
ExecuteScan
(
SfxRequest
&
rReq
)
void
SwView_Impl
::
ExecuteScan
(
SfxRequest
&
rReq
)
{
{
sal_uInt16
nSlot
=
rReq
.
GetSlot
();
switch
(
rReq
.
GetSlot
())
switch
(
nSlot
)
{
{
case
SID_TWAIN_SELECT
:
case
SID_TWAIN_SELECT
:
{
{
...
...
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