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
773b12b7
Kaydet (Commit)
773b12b7
authored
Şub 15, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwView::WriteUserDataSequence: use comphelper::makePropertyValue()
Change-Id: Ibdb99942ee6c022abad74df93ebfb99c4ce6567f
üst
e95db186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
43 deletions
+15
-43
view.cxx
sw/source/uibase/uiview/view.cxx
+15
-43
No files found.
sw/source/uibase/uiview/view.cxx
Dosyayı görüntüle @
773b12b7
...
@@ -112,6 +112,7 @@
...
@@ -112,6 +112,7 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <svl/cjkoptions.hxx>
#include <svl/cjkoptions.hxx>
#include <comphelper/propertyvalue.hxx>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
...
@@ -1451,73 +1452,44 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
...
@@ -1451,73 +1452,44 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
}
}
}
}
#define NUM_VIEW_SETTINGS 12
void
SwView
::
WriteUserDataSequence
(
uno
::
Sequence
<
beans
::
PropertyValue
>&
rSequence
,
bool
bBrowse
)
void
SwView
::
WriteUserDataSequence
(
uno
::
Sequence
<
beans
::
PropertyValue
>&
rSequence
,
bool
bBrowse
)
{
{
const
SwRect
&
rRect
=
m_pWrtShell
->
GetCharRect
();
const
SwRect
&
rRect
=
m_pWrtShell
->
GetCharRect
();
const
Rectangle
&
rVis
=
GetVisArea
();
const
Rectangle
&
rVis
=
GetVisArea
();
rSequence
.
realloc
(
NUM_VIEW_SETTINGS
);
std
::
vector
<
beans
::
PropertyValue
>
aVector
;
sal_Int16
nIndex
=
0
;
beans
::
PropertyValue
*
pValue
=
rSequence
.
getArray
();
sal_uInt16
nViewID
(
GetViewFrame
()
->
GetCurViewId
());
sal_uInt16
nViewID
(
GetViewFrame
()
->
GetCurViewId
());
pValue
->
Name
=
"ViewId"
;
OUStringBuffer
sBuffer
(
OUString
(
"view"
)
);
OUStringBuffer
sBuffer
(
OUString
(
"view"
)
);
::
sax
::
Converter
::
convertNumber
(
sBuffer
,
static_cast
<
sal_Int32
>
(
nViewID
));
::
sax
::
Converter
::
convertNumber
(
sBuffer
,
static_cast
<
sal_Int32
>
(
nViewID
));
pValue
->
Value
<<=
sBuffer
.
makeStringAndClear
();
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ViewId"
,
sBuffer
.
makeStringAndClear
()));
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"ViewLeft"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ViewLeft"
,
convertTwipToMm100
(
rRect
.
Left
()
)));
pValue
->
Value
<<=
convertTwipToMm100
(
rRect
.
Left
()
);
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"ViewTop"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ViewTop"
,
convertTwipToMm100
(
rRect
.
Top
()
)));
pValue
->
Value
<<=
convertTwipToMm100
(
rRect
.
Top
()
);
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"VisibleLeft"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"VisibleLeft"
,
convertTwipToMm100
(
rVis
.
Left
()
)));
pValue
->
Value
<<=
convertTwipToMm100
(
rVis
.
Left
()
);
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"VisibleTop"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"VisibleTop"
,
convertTwipToMm100
(
rVis
.
Top
()
)));
pValue
->
Value
<<=
convertTwipToMm100
(
rVis
.
Top
()
);
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"VisibleRight"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"VisibleRight"
,
convertTwipToMm100
(
bBrowse
?
LONG_MIN
:
rVis
.
Right
()
)));
pValue
->
Value
<<=
convertTwipToMm100
(
bBrowse
?
LONG_MIN
:
rVis
.
Right
()
);
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"VisibleBottom"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"VisibleBottom"
,
convertTwipToMm100
(
bBrowse
?
LONG_MIN
:
rVis
.
Bottom
()
)));
pValue
->
Value
<<=
convertTwipToMm100
(
bBrowse
?
LONG_MIN
:
rVis
.
Bottom
()
);
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"ZoomType"
;
const
sal_Int16
nZoomType
=
static_cast
<
sal_Int16
>
(
m_pWrtShell
->
GetViewOptions
()
->
GetZoomType
());
const
sal_Int16
nZoomType
=
static_cast
<
sal_Int16
>
(
m_pWrtShell
->
GetViewOptions
()
->
GetZoomType
());
pValue
->
Value
<<=
nZoomType
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ZoomType"
,
nZoomType
));
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"ViewLayoutColumns"
;
const
sal_Int16
nViewLayoutColumns
=
static_cast
<
sal_Int16
>
(
m_pWrtShell
->
GetViewOptions
()
->
GetViewLayoutColumns
());
const
sal_Int16
nViewLayoutColumns
=
static_cast
<
sal_Int16
>
(
m_pWrtShell
->
GetViewOptions
()
->
GetViewLayoutColumns
());
pValue
->
Value
<<=
nViewLayoutColumns
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ViewLayoutColumns"
,
nViewLayoutColumns
));
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"ViewLayoutBookMode"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ViewLayoutBookMode"
,
m_pWrtShell
->
GetViewOptions
()
->
IsViewLayoutBookMode
()));
pValue
->
Value
<<=
m_pWrtShell
->
GetViewOptions
()
->
IsViewLayoutBookMode
();
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"ZoomFactor"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"ZoomFactor"
,
static_cast
<
sal_Int16
>
(
m_pWrtShell
->
GetViewOptions
()
->
GetZoom
())));
pValue
->
Value
<<=
static_cast
<
sal_Int16
>
(
m_pWrtShell
->
GetViewOptions
()
->
GetZoom
());
pValue
++
;
nIndex
++
;
pValue
->
Name
=
"IsSelectedFrame"
;
aVector
.
push_back
(
comphelper
::
makePropertyValue
(
"IsSelectedFrame"
,
FrameTypeFlags
::
NONE
!=
m_pWrtShell
->
GetSelFrameType
()));
pValue
->
Value
<<=
FrameTypeFlags
::
NONE
!=
m_pWrtShell
->
GetSelFrameType
();
nIndex
++
;
assert
(
nIndex
==
NUM_VIEW_SETTINGS
);
rSequence
=
comphelper
::
containerToSequence
(
aVector
);
(
void
)
nIndex
;
}
}
#undef NUM_VIEW_SETTINGS
void
SwView
::
ShowCursor
(
bool
bOn
)
void
SwView
::
ShowCursor
(
bool
bOn
)
{
{
...
...
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