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
2f91d6c4
Kaydet (Commit)
2f91d6c4
authored
Mar 07, 2014
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: add prefix to SwTextGridItem members
Change-Id: Ie086d56f01bc06de14c6fb1713a43aec8e6335f9
üst
71b55cf5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
101 deletions
+105
-101
tgrditem.hxx
sw/inc/tgrditem.hxx
+40
-37
atrfrm.cxx
sw/source/core/layout/atrfrm.cxx
+65
-64
No files found.
sw/inc/tgrditem.hxx
Dosyayı görüntüle @
2f91d6c4
...
@@ -31,18 +31,21 @@ enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS };
...
@@ -31,18 +31,21 @@ enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS };
class
SW_DLLPUBLIC
SwTextGridItem
:
public
SfxPoolItem
class
SW_DLLPUBLIC
SwTextGridItem
:
public
SfxPoolItem
{
{
Color
aColor
;
private
:
sal_uInt16
nLines
;
Color
m_aColor
;
sal_uInt16
nBaseHeight
,
nRubyHeight
;
sal_uInt16
m_nLines
;
SwTextGrid
eGridType
;
sal_uInt16
m_nBaseHeight
;
sal_Bool
bRubyTextBelow
;
sal_uInt16
m_nRubyHeight
;
sal_Bool
bPrintGrid
;
SwTextGrid
m_eGridType
;
sal_Bool
bDisplayGrid
;
sal_Bool
m_bRubyTextBelow
;
sal_Bool
m_bPrintGrid
;
sal_Bool
m_bDisplayGrid
;
//for textgrid enhancement
//for textgrid enhancement
sal_uInt16
nBaseWidth
;
sal_uInt16
m_nBaseWidth
;
sal_Bool
bSnapToChars
;
sal_Bool
m_bSnapToChars
;
sal_Bool
bSquaredMode
;
sal_Bool
m_bSquaredMode
;
public
:
public
:
SwTextGridItem
();
SwTextGridItem
();
virtual
~
SwTextGridItem
();
virtual
~
SwTextGridItem
();
...
@@ -60,44 +63,44 @@ public:
...
@@ -60,44 +63,44 @@ public:
SwTextGridItem
&
operator
=
(
const
SwTextGridItem
&
);
SwTextGridItem
&
operator
=
(
const
SwTextGridItem
&
);
const
Color
&
GetColor
()
const
{
return
aColor
;
}
const
Color
&
GetColor
()
const
{
return
m_
aColor
;
}
void
SetColor
(
const
Color
&
rCol
)
{
aColor
=
rCol
;
}
void
SetColor
(
const
Color
&
rCol
)
{
m_
aColor
=
rCol
;
}
sal_uInt16
GetLines
()
const
{
return
nLines
;
}
sal_uInt16
GetLines
()
const
{
return
m_
nLines
;
}
void
SetLines
(
sal_uInt16
nNew
)
{
nLines
=
nNew
;
}
void
SetLines
(
sal_uInt16
nNew
)
{
m_
nLines
=
nNew
;
}
sal_uInt16
GetBaseHeight
()
const
{
return
nBaseHeight
;
}
sal_uInt16
GetBaseHeight
()
const
{
return
m_
nBaseHeight
;
}
void
SetBaseHeight
(
sal_uInt16
nNew
)
{
nBaseHeight
=
nNew
;
}
void
SetBaseHeight
(
sal_uInt16
nNew
)
{
m_
nBaseHeight
=
nNew
;
}
sal_uInt16
GetRubyHeight
()
const
{
return
nRubyHeight
;
}
sal_uInt16
GetRubyHeight
()
const
{
return
m_
nRubyHeight
;
}
void
SetRubyHeight
(
sal_uInt16
nNew
)
{
nRubyHeight
=
nNew
;
}
void
SetRubyHeight
(
sal_uInt16
nNew
)
{
m_
nRubyHeight
=
nNew
;
}
SwTextGrid
GetGridType
()
const
{
return
eGridType
;
}
SwTextGrid
GetGridType
()
const
{
return
m_
eGridType
;
}
void
SetGridType
(
SwTextGrid
eNew
)
{
eGridType
=
eNew
;
}
void
SetGridType
(
SwTextGrid
eNew
)
{
m_
eGridType
=
eNew
;
}
sal_Bool
IsRubyTextBelow
()
const
{
return
bRubyTextBelow
;
}
sal_Bool
IsRubyTextBelow
()
const
{
return
m_
bRubyTextBelow
;
}
sal_Bool
GetRubyTextBelow
()
const
{
return
bRubyTextBelow
;
}
sal_Bool
GetRubyTextBelow
()
const
{
return
m_
bRubyTextBelow
;
}
void
SetRubyTextBelow
(
sal_Bool
bNew
)
{
bRubyTextBelow
=
bNew
;
}
void
SetRubyTextBelow
(
sal_Bool
bNew
)
{
m_
bRubyTextBelow
=
bNew
;
}
sal_Bool
IsPrintGrid
()
const
{
return
bPrintGrid
;
}
sal_Bool
IsPrintGrid
()
const
{
return
m_
bPrintGrid
;
}
sal_Bool
GetPrintGrid
()
const
{
return
bPrintGrid
;
}
sal_Bool
GetPrintGrid
()
const
{
return
m_
bPrintGrid
;
}
void
SetPrintGrid
(
sal_Bool
bNew
)
{
bPrintGrid
=
bNew
;
}
void
SetPrintGrid
(
sal_Bool
bNew
)
{
m_
bPrintGrid
=
bNew
;
}
sal_Bool
IsDisplayGrid
()
const
{
return
bDisplayGrid
;
}
sal_Bool
IsDisplayGrid
()
const
{
return
m_
bDisplayGrid
;
}
sal_Bool
GetDisplayGrid
()
const
{
return
bDisplayGrid
;
}
sal_Bool
GetDisplayGrid
()
const
{
return
m_
bDisplayGrid
;
}
void
SetDisplayGrid
(
sal_Bool
bNew
)
{
bDisplayGrid
=
bNew
;
}
void
SetDisplayGrid
(
sal_Bool
bNew
)
{
m_
bDisplayGrid
=
bNew
;
}
//for textgrid enhancement
//for textgrid enhancement
sal_uInt16
GetBaseWidth
()
const
{
return
nBaseWidth
;}
sal_uInt16
GetBaseWidth
()
const
{
return
m_
nBaseWidth
;}
void
SetBaseWidth
(
sal_uInt16
nNew
)
{
nBaseWidth
=
nNew
;
}
void
SetBaseWidth
(
sal_uInt16
nNew
)
{
m_
nBaseWidth
=
nNew
;
}
sal_Bool
IsSnapToChars
()
const
{
return
bSnapToChars
;
}
sal_Bool
IsSnapToChars
()
const
{
return
m_
bSnapToChars
;
}
sal_Bool
GetSnapToChars
()
const
{
return
bSnapToChars
;
}
sal_Bool
GetSnapToChars
()
const
{
return
m_
bSnapToChars
;
}
void
SetSnapToChars
(
sal_Bool
bNew
)
{
bSnapToChars
=
bNew
;
}
void
SetSnapToChars
(
sal_Bool
bNew
)
{
m_
bSnapToChars
=
bNew
;
}
sal_Bool
IsSquaredMode
()
const
{
return
bSquaredMode
;
}
sal_Bool
IsSquaredMode
()
const
{
return
m_
bSquaredMode
;
}
sal_Bool
GetSquaredMode
()
const
{
return
bSquaredMode
;
}
sal_Bool
GetSquaredMode
()
const
{
return
m_
bSquaredMode
;
}
void
SetSquaredMode
(
sal_Bool
bNew
)
{
bSquaredMode
=
bNew
;
}
void
SetSquaredMode
(
sal_Bool
bNew
)
{
m_
bSquaredMode
=
bNew
;
}
void
SwitchPaperMode
(
sal_Bool
bNew
);
void
SwitchPaperMode
(
sal_Bool
bNew
);
void
Init
();
void
Init
();
...
...
sw/source/core/layout/atrfrm.cxx
Dosyayı görüntüle @
2f91d6c4
...
@@ -2105,10 +2105,10 @@ bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
...
@@ -2105,10 +2105,10 @@ bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
// class SwTextGridItem
// class SwTextGridItem
SwTextGridItem
::
SwTextGridItem
()
SwTextGridItem
::
SwTextGridItem
()
:
SfxPoolItem
(
RES_TEXTGRID
),
aColor
(
COL_LIGHTGRAY
),
nLines
(
20
),
:
SfxPoolItem
(
RES_TEXTGRID
),
m_aColor
(
COL_LIGHTGRAY
),
m_nLines
(
20
)
nBaseHeight
(
400
),
nRubyHeight
(
200
),
eGridType
(
GRID_NONE
),
,
m_nBaseHeight
(
400
),
m_nRubyHeight
(
200
),
m_eGridType
(
GRID_NONE
)
bRubyTextBelow
(
0
),
bPrintGrid
(
1
),
bDisplayGrid
(
1
),
,
m_bRubyTextBelow
(
0
),
m_bPrintGrid
(
1
),
m_bDisplayGrid
(
1
)
nBaseWidth
(
400
),
bSnapToChars
(
1
),
bSquaredMode
(
1
)
,
m_nBaseWidth
(
400
),
m_bSnapToChars
(
1
),
m_
bSquaredMode
(
1
)
{
{
}
}
...
@@ -2119,17 +2119,18 @@ SwTextGridItem::~SwTextGridItem()
...
@@ -2119,17 +2119,18 @@ SwTextGridItem::~SwTextGridItem()
bool
SwTextGridItem
::
operator
==
(
const
SfxPoolItem
&
rAttr
)
const
bool
SwTextGridItem
::
operator
==
(
const
SfxPoolItem
&
rAttr
)
const
{
{
OSL_ENSURE
(
SfxPoolItem
::
operator
==
(
rAttr
),
"keine gleichen Attribute"
);
OSL_ENSURE
(
SfxPoolItem
::
operator
==
(
rAttr
),
"keine gleichen Attribute"
);
return
eGridType
==
((
SwTextGridItem
&
)
rAttr
).
GetGridType
()
&&
SwTextGridItem
const
&
rOther
(
static_cast
<
SwTextGridItem
const
&>
(
rAttr
));
nLines
==
((
SwTextGridItem
&
)
rAttr
).
GetLines
()
&&
return
m_eGridType
==
rOther
.
GetGridType
()
nBaseHeight
==
((
SwTextGridItem
&
)
rAttr
).
GetBaseHeight
()
&&
&&
m_nLines
==
rOther
.
GetLines
()
nRubyHeight
==
((
SwTextGridItem
&
)
rAttr
).
GetRubyHeight
()
&&
&&
m_nBaseHeight
==
rOther
.
GetBaseHeight
()
bRubyTextBelow
==
((
SwTextGridItem
&
)
rAttr
).
GetRubyTextBelow
()
&&
&&
m_nRubyHeight
==
rOther
.
GetRubyHeight
()
bDisplayGrid
==
((
SwTextGridItem
&
)
rAttr
).
GetDisplayGrid
()
&&
&&
m_bRubyTextBelow
==
rOther
.
GetRubyTextBelow
()
bPrintGrid
==
((
SwTextGridItem
&
)
rAttr
).
GetPrintGrid
()
&&
&&
m_bDisplayGrid
==
rOther
.
GetDisplayGrid
()
aColor
==
((
SwTextGridItem
&
)
rAttr
).
GetColor
()
&&
&&
m_bPrintGrid
==
rOther
.
GetPrintGrid
()
nBaseWidth
==
((
SwTextGridItem
&
)
rAttr
).
GetBaseWidth
()
&&
&&
m_aColor
==
rOther
.
GetColor
()
bSnapToChars
==
((
SwTextGridItem
&
)
rAttr
).
GetSnapToChars
()
&&
&&
m_nBaseWidth
==
rOther
.
GetBaseWidth
()
bSquaredMode
==
((
SwTextGridItem
&
)
rAttr
).
GetSquaredMode
();
&&
m_bSnapToChars
==
rOther
.
GetSnapToChars
()
&&
m_bSquaredMode
==
rOther
.
GetSquaredMode
();
}
}
SfxPoolItem
*
SwTextGridItem
::
Clone
(
SfxItemPool
*
)
const
SfxPoolItem
*
SwTextGridItem
::
Clone
(
SfxItemPool
*
)
const
...
@@ -2139,17 +2140,17 @@ SfxPoolItem* SwTextGridItem::Clone( SfxItemPool* ) const
...
@@ -2139,17 +2140,17 @@ SfxPoolItem* SwTextGridItem::Clone( SfxItemPool* ) const
SwTextGridItem
&
SwTextGridItem
::
operator
=
(
const
SwTextGridItem
&
rCpy
)
SwTextGridItem
&
SwTextGridItem
::
operator
=
(
const
SwTextGridItem
&
rCpy
)
{
{
aColor
=
rCpy
.
GetColor
();
m_
aColor
=
rCpy
.
GetColor
();
nLines
=
rCpy
.
GetLines
();
m_
nLines
=
rCpy
.
GetLines
();
nBaseHeight
=
rCpy
.
GetBaseHeight
();
m_
nBaseHeight
=
rCpy
.
GetBaseHeight
();
nRubyHeight
=
rCpy
.
GetRubyHeight
();
m_
nRubyHeight
=
rCpy
.
GetRubyHeight
();
eGridType
=
rCpy
.
GetGridType
();
m_
eGridType
=
rCpy
.
GetGridType
();
bRubyTextBelow
=
rCpy
.
GetRubyTextBelow
();
m_
bRubyTextBelow
=
rCpy
.
GetRubyTextBelow
();
bPrintGrid
=
rCpy
.
GetPrintGrid
();
m_
bPrintGrid
=
rCpy
.
GetPrintGrid
();
bDisplayGrid
=
rCpy
.
GetDisplayGrid
();
m_
bDisplayGrid
=
rCpy
.
GetDisplayGrid
();
nBaseWidth
=
rCpy
.
GetBaseWidth
();
m_
nBaseWidth
=
rCpy
.
GetBaseWidth
();
bSnapToChars
=
rCpy
.
GetSnapToChars
();
m_
bSnapToChars
=
rCpy
.
GetSnapToChars
();
bSquaredMode
=
rCpy
.
GetSquaredMode
();
m_
bSquaredMode
=
rCpy
.
GetSquaredMode
();
return
*
this
;
return
*
this
;
}
}
...
@@ -2167,28 +2168,28 @@ bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
...
@@ -2167,28 +2168,28 @@ bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal
<<=
GetLines
();
rVal
<<=
GetLines
();
break
;
break
;
case
MID_GRID_RUBY_BELOW
:
case
MID_GRID_RUBY_BELOW
:
rVal
.
setValue
(
&
bRubyTextBelow
,
::
getBooleanCppuType
()
);
rVal
.
setValue
(
&
m_
bRubyTextBelow
,
::
getBooleanCppuType
()
);
break
;
break
;
case
MID_GRID_PRINT
:
case
MID_GRID_PRINT
:
rVal
.
setValue
(
&
bPrintGrid
,
::
getBooleanCppuType
()
);
rVal
.
setValue
(
&
m_
bPrintGrid
,
::
getBooleanCppuType
()
);
break
;
break
;
case
MID_GRID_DISPLAY
:
case
MID_GRID_DISPLAY
:
rVal
.
setValue
(
&
bDisplayGrid
,
::
getBooleanCppuType
()
);
rVal
.
setValue
(
&
m_
bDisplayGrid
,
::
getBooleanCppuType
()
);
break
;
break
;
case
MID_GRID_BASEHEIGHT
:
case
MID_GRID_BASEHEIGHT
:
OSL_ENSURE
(
(
nMemberId
&
CONVERT_TWIPS
)
!=
0
,
OSL_ENSURE
(
(
nMemberId
&
CONVERT_TWIPS
)
!=
0
,
"This value needs TWIPS-MM100 conversion"
);
"This value needs TWIPS-MM100 conversion"
);
rVal
<<=
(
sal_Int32
)
TWIP_TO_MM100_UNSIGNED
(
nBaseHeight
);
rVal
<<=
(
sal_Int32
)
TWIP_TO_MM100_UNSIGNED
(
m_
nBaseHeight
);
break
;
break
;
case
MID_GRID_BASEWIDTH
:
case
MID_GRID_BASEWIDTH
:
OSL_ENSURE
(
(
nMemberId
&
CONVERT_TWIPS
)
!=
0
,
OSL_ENSURE
(
(
nMemberId
&
CONVERT_TWIPS
)
!=
0
,
"This value needs TWIPS-MM100 conversion"
);
"This value needs TWIPS-MM100 conversion"
);
rVal
<<=
(
sal_Int32
)
TWIP_TO_MM100_UNSIGNED
(
nBaseWidth
);
rVal
<<=
(
sal_Int32
)
TWIP_TO_MM100_UNSIGNED
(
m_
nBaseWidth
);
break
;
break
;
case
MID_GRID_RUBYHEIGHT
:
case
MID_GRID_RUBYHEIGHT
:
OSL_ENSURE
(
(
nMemberId
&
CONVERT_TWIPS
)
!=
0
,
OSL_ENSURE
(
(
nMemberId
&
CONVERT_TWIPS
)
!=
0
,
"This value needs TWIPS-MM100 conversion"
);
"This value needs TWIPS-MM100 conversion"
);
rVal
<<=
(
sal_Int32
)
TWIP_TO_MM100_UNSIGNED
(
nRubyHeight
);
rVal
<<=
(
sal_Int32
)
TWIP_TO_MM100_UNSIGNED
(
m_
nRubyHeight
);
break
;
break
;
case
MID_GRID_TYPE
:
case
MID_GRID_TYPE
:
switch
(
GetGridType
()
)
switch
(
GetGridType
()
)
...
@@ -2209,11 +2210,11 @@ bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
...
@@ -2209,11 +2210,11 @@ bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
}
break
;
break
;
case
MID_GRID_SNAPTOCHARS
:
case
MID_GRID_SNAPTOCHARS
:
rVal
.
setValue
(
&
bSnapToChars
,
::
getBooleanCppuType
()
);
rVal
.
setValue
(
&
m_
bSnapToChars
,
::
getBooleanCppuType
()
);
break
;
break
;
case
MID_GRID_STANDARD_MODE
:
case
MID_GRID_STANDARD_MODE
:
{
{
sal_Bool
bStandardMode
=
!
bSquaredMode
;
sal_Bool
bStandardMode
=
!
m_
bSquaredMode
;
rVal
.
setValue
(
&
bStandardMode
,
::
getBooleanCppuType
()
);
rVal
.
setValue
(
&
bStandardMode
,
::
getBooleanCppuType
()
);
}
}
break
;
break
;
...
@@ -2333,62 +2334,62 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
...
@@ -2333,62 +2334,62 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
void
SwTextGridItem
::
SwitchPaperMode
(
sal_Bool
bNew
)
void
SwTextGridItem
::
SwitchPaperMode
(
sal_Bool
bNew
)
{
{
if
(
bNew
==
bSquaredMode
)
if
(
bNew
==
m_bSquaredMode
)
{
{
//same paper mode, not switch
//same paper mode, not switch
return
;
return
;
}
}
// use default value when grid is disable
// use default value when grid is disable
if
(
eGridType
==
GRID_NONE
)
if
(
m_eGridType
==
GRID_NONE
)
{
{
bSquaredMode
=
bNew
;
m_
bSquaredMode
=
bNew
;
Init
();
Init
();
return
;
return
;
}
}
if
(
bSquaredMode
)
if
(
m_bSquaredMode
)
{
{
//switch from "squared mode" to "standard mode"
//switch from "squared mode" to "standard mode"
nBaseWidth
=
nBaseHeight
;
m_nBaseWidth
=
m_
nBaseHeight
;
nBaseHeight
=
nBaseHeight
+
nRubyHeight
;
m_nBaseHeight
=
m_nBaseHeight
+
m_
nRubyHeight
;
nRubyHeight
=
0
;
m_
nRubyHeight
=
0
;
}
}
else
else
{
{
//switch from "standard mode" to "squared mode"
//switch from "standard mode" to "squared mode"
nRubyHeight
=
nBaseHeight
/
3
;
m_nRubyHeight
=
m_
nBaseHeight
/
3
;
nBaseHeight
=
nBaseHeight
-
nRubyHeight
;
m_nBaseHeight
=
m_nBaseHeight
-
m_
nRubyHeight
;
nBaseWidth
=
nBaseHeight
;
m_nBaseWidth
=
m_
nBaseHeight
;
}
}
bSquaredMode
=
!
bSquaredMode
;
m_bSquaredMode
=
!
m_
bSquaredMode
;
}
}
void
SwTextGridItem
::
Init
()
void
SwTextGridItem
::
Init
()
{
{
if
(
bSquaredMode
)
if
(
m_bSquaredMode
)
{
{
nLines
=
20
;
m_
nLines
=
20
;
nBaseHeight
=
400
;
m_
nBaseHeight
=
400
;
nRubyHeight
=
200
;
m_
nRubyHeight
=
200
;
eGridType
=
GRID_NONE
;
m_
eGridType
=
GRID_NONE
;
bRubyTextBelow
=
0
;
m_
bRubyTextBelow
=
0
;
bPrintGrid
=
1
;
m_
bPrintGrid
=
1
;
bDisplayGrid
=
1
;
m_
bDisplayGrid
=
1
;
bSnapToChars
=
1
;
m_
bSnapToChars
=
1
;
nBaseWidth
=
400
;
m_
nBaseWidth
=
400
;
}
}
else
else
{
{
nLines
=
44
;
m_
nLines
=
44
;
nBaseHeight
=
312
;
m_
nBaseHeight
=
312
;
nRubyHeight
=
0
;
m_
nRubyHeight
=
0
;
eGridType
=
GRID_NONE
;
m_
eGridType
=
GRID_NONE
;
bRubyTextBelow
=
0
;
m_
bRubyTextBelow
=
0
;
bPrintGrid
=
1
;
m_
bPrintGrid
=
1
;
bDisplayGrid
=
1
;
m_
bDisplayGrid
=
1
;
nBaseWidth
=
210
;
m_
nBaseWidth
=
210
;
bSnapToChars
=
1
;
m_
bSnapToChars
=
1
;
}
}
}
}
...
...
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