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
6f7f22df
Kaydet (Commit)
6f7f22df
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, constify some sal_uInt16
Change-Id: Ib85b1dde7916720bded3d39019277001b160afce
üst
3723784a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
view2.cxx
sw/source/uibase/uiview/view2.cxx
+22
-23
No files found.
sw/source/uibase/uiview/view2.cxx
Dosyayı görüntüle @
6f7f22df
...
@@ -230,7 +230,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
...
@@ -230,7 +230,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
GraphicNativeMetadata
aMetadata
;
GraphicNativeMetadata
aMetadata
;
if
(
aMetadata
.
read
(
aGraphic
)
)
if
(
aMetadata
.
read
(
aGraphic
)
)
{
{
sal_uInt16
aRotation
=
aMetadata
.
getRotation
();
const
sal_uInt16
aRotation
=
aMetadata
.
getRotation
();
if
(
aRotation
!=
0
)
if
(
aRotation
!=
0
)
{
{
MessageDialog
aQueryBox
(
GetWindow
(),
"QueryRotateIntoStandardOrientationDialog"
,
"modules/swriter/ui/queryrotateintostandarddialog.ui"
);
MessageDialog
aQueryBox
(
GetWindow
(),
"QueryRotateIntoStandardOrientationDialog"
,
"modules/swriter/ui/queryrotateintostandarddialog.ui"
);
...
@@ -289,7 +289,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
...
@@ -289,7 +289,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
{
bool
bReturn
=
false
;
bool
bReturn
=
false
;
SwDocShell
*
pDocShell
=
GetDocShell
();
SwDocShell
*
pDocShell
=
GetDocShell
();
sal_uInt16
nHtmlMode
=
::
GetHtmlMode
(
pDocShell
);
const
sal_uInt16
nHtmlMode
=
::
GetHtmlMode
(
pDocShell
);
// when in HTML mode insert only as a link
// when in HTML mode insert only as a link
boost
::
scoped_ptr
<
FileDialogHelper
>
pFileDlg
(
new
FileDialogHelper
(
boost
::
scoped_ptr
<
FileDialogHelper
>
pFileDlg
(
new
FileDialogHelper
(
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE
,
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE
,
...
@@ -308,9 +308,8 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
...
@@ -308,9 +308,8 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
std
::
vector
<
OUString
>
aFormats
;
std
::
vector
<
OUString
>
aFormats
;
SwDoc
*
pDoc
=
pDocShell
->
GetDoc
();
SwDoc
*
pDoc
=
pDocShell
->
GetDoc
();
const
sal_uInt16
nArrLen
=
pDoc
->
GetFrmFmts
()
->
size
();
const
size_t
nArrLen
=
pDoc
->
GetFrmFmts
()
->
size
();
sal_uInt16
i
;
for
(
size_t
i
=
0
;
i
<
nArrLen
;
++
i
)
for
(
i
=
0
;
i
<
nArrLen
;
i
++
)
{
{
SwFrmFmt
*
pFmt
=
(
*
pDoc
->
GetFrmFmts
())[
i
];
SwFrmFmt
*
pFmt
=
(
*
pDoc
->
GetFrmFmts
())[
i
];
if
(
pFmt
->
IsDefault
()
||
pFmt
->
IsAuto
())
if
(
pFmt
->
IsDefault
()
||
pFmt
->
IsAuto
())
...
@@ -322,7 +321,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
...
@@ -322,7 +321,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
const
::
std
::
vector
<
OUString
>&
rFrmPoolArr
(
const
::
std
::
vector
<
OUString
>&
rFrmPoolArr
(
SwStyleNameMapper
::
GetFrmFmtUINameArray
());
SwStyleNameMapper
::
GetFrmFmtUINameArray
());
for
(
i
=
0
;
i
<
rFrmPoolArr
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
rFrmPoolArr
.
size
();
++
i
)
{
{
aFormats
.
push_back
(
rFrmPoolArr
[
i
]);
aFormats
.
push_back
(
rFrmPoolArr
[
i
]);
}
}
...
@@ -334,7 +333,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
...
@@ -334,7 +333,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
OUString
*
pEntries
=
aListBoxEntries
.
getArray
();
OUString
*
pEntries
=
aListBoxEntries
.
getArray
();
sal_Int16
nSelect
=
0
;
sal_Int16
nSelect
=
0
;
OUString
sGraphicFormat
=
SW_RESSTR
(
STR_POOLFRM_GRAPHIC
);
OUString
sGraphicFormat
=
SW_RESSTR
(
STR_POOLFRM_GRAPHIC
);
for
(
i
=
0
;
i
<
aFormats
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
aFormats
.
size
();
++
i
)
{
{
pEntries
[
i
]
=
aFormats
[
i
];
pEntries
[
i
]
=
aFormats
[
i
];
if
(
pEntries
[
i
].
equals
(
sGraphicFormat
))
if
(
pEntries
[
i
].
equals
(
sGraphicFormat
))
...
@@ -521,7 +520,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
...
@@ -521,7 +520,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
void
SwView
::
Execute
(
SfxRequest
&
rReq
)
void
SwView
::
Execute
(
SfxRequest
&
rReq
)
{
{
sal_uInt16
nSlot
=
rReq
.
GetSlot
();
const
sal_uInt16
nSlot
=
rReq
.
GetSlot
();
const
SfxItemSet
*
pArgs
=
rReq
.
GetArgs
();
const
SfxItemSet
*
pArgs
=
rReq
.
GetArgs
();
const
SfxPoolItem
*
pItem
;
const
SfxPoolItem
*
pItem
;
bool
bIgnore
=
false
;
bool
bIgnore
=
false
;
...
@@ -596,8 +595,9 @@ void SwView::Execute(SfxRequest &rReq)
...
@@ -596,8 +595,9 @@ void SwView::Execute(SfxRequest &rReq)
}
}
}
}
sal_uInt16
nOn
=
((
const
SfxBoolItem
*
)
pItem
)
->
GetValue
()
?
nsRedlineMode_t
::
REDLINE_ON
:
0
;
const
sal_uInt16
nOn
=
((
const
SfxBoolItem
*
)
pItem
)
->
GetValue
()
sal_uInt16
nMode
=
m_pWrtShell
->
GetRedlineMode
();
?
nsRedlineMode_t
::
REDLINE_ON
:
0
;
const
sal_uInt16
nMode
=
m_pWrtShell
->
GetRedlineMode
();
m_pWrtShell
->
SetRedlineModeAndCheckInsMode
(
(
nMode
&
~
nsRedlineMode_t
::
REDLINE_ON
)
|
nOn
);
m_pWrtShell
->
SetRedlineModeAndCheckInsMode
(
(
nMode
&
~
nsRedlineMode_t
::
REDLINE_ON
)
|
nOn
);
}
}
}
}
...
@@ -638,7 +638,7 @@ void SwView::Execute(SfxRequest &rReq)
...
@@ -638,7 +638,7 @@ void SwView::Execute(SfxRequest &rReq)
pIDRA
->
SetRedlinePassword
(
Sequence
<
sal_Int8
>
());
pIDRA
->
SetRedlinePassword
(
Sequence
<
sal_Int8
>
());
nOn
=
0
;
nOn
=
0
;
}
}
sal_uInt16
nMode
=
pIDRA
->
GetRedlineMode
();
const
sal_uInt16
nMode
=
pIDRA
->
GetRedlineMode
();
m_pWrtShell
->
SetRedlineModeAndCheckInsMode
(
(
nMode
&
~
nsRedlineMode_t
::
REDLINE_ON
)
|
nOn
);
m_pWrtShell
->
SetRedlineModeAndCheckInsMode
(
(
nMode
&
~
nsRedlineMode_t
::
REDLINE_ON
)
|
nOn
);
rReq
.
AppendItem
(
SfxBoolItem
(
FN_REDLINE_PROTECT
,
((
nMode
&
nsRedlineMode_t
::
REDLINE_ON
)
==
0
)
)
);
rReq
.
AppendItem
(
SfxBoolItem
(
FN_REDLINE_PROTECT
,
((
nMode
&
nsRedlineMode_t
::
REDLINE_ON
)
==
0
)
)
);
}
}
...
@@ -780,7 +780,7 @@ void SwView::Execute(SfxRequest &rReq)
...
@@ -780,7 +780,7 @@ void SwView::Execute(SfxRequest &rReq)
pVFrame
->
ShowChildWindow
(
FN_REDLINE_ACCEPT
);
pVFrame
->
ShowChildWindow
(
FN_REDLINE_ACCEPT
);
// re-initialize the Redline dialog
// re-initialize the Redline dialog
sal_uInt16
nId
=
SwRedlineAcceptChild
::
GetChildWindowId
();
const
sal_uInt16
nId
=
SwRedlineAcceptChild
::
GetChildWindowId
();
SwRedlineAcceptChild
*
pRed
=
(
SwRedlineAcceptChild
*
)
SwRedlineAcceptChild
*
pRed
=
(
SwRedlineAcceptChild
*
)
pVFrame
->
GetChildWindow
(
nId
);
pVFrame
->
GetChildWindow
(
nId
);
if
(
pRed
)
if
(
pRed
)
...
@@ -922,10 +922,9 @@ void SwView::Execute(SfxRequest &rReq)
...
@@ -922,10 +922,9 @@ void SwView::Execute(SfxRequest &rReq)
bool
bOldCrsrInReadOnly
=
m_pWrtShell
->
IsReadOnlyAvailable
();
bool
bOldCrsrInReadOnly
=
m_pWrtShell
->
IsReadOnlyAvailable
();
m_pWrtShell
->
SetReadOnlyAvailable
(
true
);
m_pWrtShell
->
SetReadOnlyAvailable
(
true
);
for
(
sal_uInt16
i
=
0
;
i
<
2
;
++
i
)
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
{
sal_uInt16
nCount
=
m_pWrtShell
->
GetTOXCount
();
if
(
m_pWrtShell
->
GetTOXCount
()
==
1
)
if
(
1
==
nCount
)
++
i
;
++
i
;
while
(
m_pWrtShell
->
GotoPrevTOXBase
()
)
while
(
m_pWrtShell
->
GotoPrevTOXBase
()
)
...
@@ -987,7 +986,7 @@ void SwView::Execute(SfxRequest &rReq)
...
@@ -987,7 +986,7 @@ void SwView::Execute(SfxRequest &rReq)
{
{
if
(
pArgs
&&
SFX_ITEM_SET
==
pArgs
->
GetItemState
(
nSlot
,
false
,
&
pItem
))
if
(
pArgs
&&
SFX_ITEM_SET
==
pArgs
->
GetItemState
(
nSlot
,
false
,
&
pItem
))
{
{
sal_uInt16
nValue
=
((
SfxUInt16Item
*
)
pItem
)
->
GetValue
();
const
sal_uInt16
nValue
=
((
SfxUInt16Item
*
)
pItem
)
->
GetValue
();
switch
(
nSlot
)
switch
(
nSlot
)
{
{
case
FN_INSERT_CTRL
:
case
FN_INSERT_CTRL
:
...
@@ -1018,7 +1017,7 @@ void SwView::Execute(SfxRequest &rReq)
...
@@ -1018,7 +1017,7 @@ void SwView::Execute(SfxRequest &rReq)
if
(
pArgs
&&
SFX_ITEM_SET
==
pArgs
->
GetItemState
(
SID_ATTR_DEFTABSTOP
,
false
,
&
pItem
))
if
(
pArgs
&&
SFX_ITEM_SET
==
pArgs
->
GetItemState
(
SID_ATTR_DEFTABSTOP
,
false
,
&
pItem
))
{
{
SvxTabStopItem
aDefTabs
(
0
,
0
,
SVX_TAB_ADJUST_DEFAULT
,
RES_PARATR_TABSTOP
);
SvxTabStopItem
aDefTabs
(
0
,
0
,
SVX_TAB_ADJUST_DEFAULT
,
RES_PARATR_TABSTOP
);
sal_uInt16
nTab
=
((
const
SfxUInt16Item
*
)
pItem
)
->
GetValue
();
const
sal_uInt16
nTab
=
((
const
SfxUInt16Item
*
)
pItem
)
->
GetValue
();
MakeDefTabs
(
nTab
,
aDefTabs
);
MakeDefTabs
(
nTab
,
aDefTabs
);
m_pWrtShell
->
SetDefault
(
aDefTabs
);
m_pWrtShell
->
SetDefault
(
aDefTabs
);
}
}
...
@@ -1331,7 +1330,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
...
@@ -1331,7 +1330,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rShell
.
FirePageChangeEvent
(
m_nOldPageNum
,
nLogPage
);
rShell
.
FirePageChangeEvent
(
m_nOldPageNum
,
nLogPage
);
m_nOldPageNum
=
nLogPage
;
m_nOldPageNum
=
nLogPage
;
}
}
sal_uInt16
nCnt
=
GetWrtShell
().
GetPageCnt
();
const
sal_uInt16
nCnt
=
GetWrtShell
().
GetPageCnt
();
if
(
m_nPageCnt
!=
nCnt
)
// notify Basic
if
(
m_nPageCnt
!=
nCnt
)
// notify Basic
{
{
m_nPageCnt
=
nCnt
;
m_nPageCnt
=
nCnt
;
...
@@ -1778,7 +1777,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
...
@@ -1778,7 +1777,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case
SID_ATTR_SIZE
:
case
SID_ATTR_SIZE
:
{
{
sal_u
Long
nId
=
FN_INSERT_FIELD
;
sal_u
Int16
nId
=
FN_INSERT_FIELD
;
if
(
rSh
.
IsCrsrInTbl
()
)
if
(
rSh
.
IsCrsrInTbl
()
)
nId
=
FN_FORMAT_TABLE_DLG
;
nId
=
FN_FORMAT_TABLE_DLG
;
else
if
(
rSh
.
GetCurTOX
()
)
else
if
(
rSh
.
GetCurTOX
()
)
...
@@ -1804,8 +1803,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
...
@@ -1804,8 +1803,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
nId
=
SID_ATTR_TRANSFORM
;
nId
=
SID_ATTR_TRANSFORM
;
}
}
if
(
nId
)
if
(
nId
)
GetViewFrame
()
->
GetDispatcher
()
->
Execute
(
GetViewFrame
()
->
GetDispatcher
()
->
Execute
(
nId
,
static_cast
<
sal_uInt16
>
(
nId
),
SFX_CALLMODE_SYNCHRON
|
SFX_CALLMODE_RECORD
);
SFX_CALLMODE_SYNCHRON
|
SFX_CALLMODE_RECORD
);
}
}
break
;
break
;
...
@@ -2073,7 +2072,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
...
@@ -2073,7 +2072,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
{
m_pViewImpl
->
InitRequest
(
rRequest
);
m_pViewImpl
->
InitRequest
(
rRequest
);
m_pViewImpl
->
SetParam
(
pItem
?
1
:
0
);
m_pViewImpl
->
SetParam
(
pItem
?
1
:
0
);
sal_uInt16
nSlot
=
rRequest
.
GetSlot
();
const
sal_uInt16
nSlot
=
rRequest
.
GetSlot
();
if
(
!
pItem
)
if
(
!
pItem
)
{
{
...
@@ -2451,7 +2450,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
...
@@ -2451,7 +2450,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
SfxMedium
*
pMed
=
m_pViewImpl
->
CreateMedium
();
SfxMedium
*
pMed
=
m_pViewImpl
->
CreateMedium
();
if
(
pMed
)
if
(
pMed
)
{
{
sal_uInt16
nSlot
=
m_pViewImpl
->
GetRequest
()
->
GetSlot
();
const
sal_uInt16
nSlot
=
m_pViewImpl
->
GetRequest
()
->
GetSlot
();
long
nFound
=
InsertMedium
(
nSlot
,
pMed
,
m_pViewImpl
->
GetParam
()
);
long
nFound
=
InsertMedium
(
nSlot
,
pMed
,
m_pViewImpl
->
GetParam
()
);
if
(
SID_INSERTDOC
==
nSlot
)
if
(
SID_INSERTDOC
==
nSlot
)
...
...
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