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
5a025886
Kaydet (Commit)
5a025886
authored
Ock 13, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Hide the implementation of svx::frame::Array.
Change-Id: Iad2d494bf7dd9f1f69e4e863aeaa514bf76c7c76
üst
ebba1f50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
87 deletions
+81
-87
framelinkarray.hxx
include/svx/framelinkarray.hxx
+1
-85
framelinkarray.cxx
svx/source/dialog/framelinkarray.cxx
+80
-2
No files found.
include/svx/framelinkarray.hxx
Dosyayı görüntüle @
5a025886
...
@@ -31,91 +31,7 @@
...
@@ -31,91 +31,7 @@
namespace
svx
{
namespace
svx
{
namespace
frame
{
namespace
frame
{
// ============================================================================
class
ArrayImpl
;
struct
Cell
{
Style
maLeft
;
Style
maRight
;
Style
maTop
;
Style
maBottom
;
Style
maTLBR
;
Style
maBLTR
;
long
mnAddLeft
;
long
mnAddRight
;
long
mnAddTop
;
long
mnAddBottom
;
bool
mbMergeOrig
;
bool
mbOverlapX
;
bool
mbOverlapY
;
explicit
Cell
();
inline
bool
IsMerged
()
const
{
return
mbMergeOrig
||
mbOverlapX
||
mbOverlapY
;
}
inline
bool
IsOverlapped
()
const
{
return
mbOverlapX
||
mbOverlapY
;
}
void
MirrorSelfX
(
bool
bMirrorStyles
,
bool
bSwapDiag
);
};
typedef
std
::
vector
<
long
>
LongVec
;
typedef
std
::
vector
<
Cell
>
CellVec
;
struct
ArrayImpl
{
CellVec
maCells
;
LongVec
maWidths
;
LongVec
maHeights
;
mutable
LongVec
maXCoords
;
mutable
LongVec
maYCoords
;
size_t
mnWidth
;
size_t
mnHeight
;
size_t
mnFirstClipCol
;
size_t
mnFirstClipRow
;
size_t
mnLastClipCol
;
size_t
mnLastClipRow
;
mutable
bool
mbXCoordsDirty
;
mutable
bool
mbYCoordsDirty
;
bool
mbDiagDblClip
;
explicit
ArrayImpl
(
size_t
nWidth
,
size_t
nHeight
,
bool
bDiagDblClip
);
inline
bool
IsValidPos
(
size_t
nCol
,
size_t
nRow
)
const
{
return
(
nCol
<
mnWidth
)
&&
(
nRow
<
mnHeight
);
}
inline
size_t
GetIndex
(
size_t
nCol
,
size_t
nRow
)
const
{
return
nRow
*
mnWidth
+
nCol
;
}
const
Cell
&
GetCell
(
size_t
nCol
,
size_t
nRow
)
const
;
Cell
&
GetCellAcc
(
size_t
nCol
,
size_t
nRow
);
size_t
GetMergedFirstCol
(
size_t
nCol
,
size_t
nRow
)
const
;
size_t
GetMergedFirstRow
(
size_t
nCol
,
size_t
nRow
)
const
;
size_t
GetMergedLastCol
(
size_t
nCol
,
size_t
nRow
)
const
;
size_t
GetMergedLastRow
(
size_t
nCol
,
size_t
nRow
)
const
;
const
Cell
&
GetMergedOriginCell
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedLeft
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedRight
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedTop
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedBottom
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsInClipRange
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsColInClipRange
(
size_t
nCol
)
const
;
bool
IsRowInClipRange
(
size_t
nRow
)
const
;
inline
size_t
GetMirrorCol
(
size_t
nCol
)
const
{
return
mnWidth
-
nCol
-
1
;
}
inline
size_t
GetMirrorRow
(
size_t
nRow
)
const
{
return
mnHeight
-
nRow
-
1
;
}
long
GetColPosition
(
size_t
nCol
)
const
;
long
GetRowPosition
(
size_t
nRow
)
const
;
long
GetColWidth
(
size_t
nFirstCol
,
size_t
nLastCol
)
const
;
long
GetRowHeight
(
size_t
nFirstRow
,
size_t
nLastRow
)
const
;
double
GetHorDiagAngle
(
size_t
nCol
,
size_t
nRow
,
bool
bSimple
=
false
)
const
;
double
GetVerDiagAngle
(
size_t
nCol
,
size_t
nRow
,
bool
bSimple
=
false
)
const
;
};
/** Stores frame styles of an array of cells, supports merged ranges.
/** Stores frame styles of an array of cells, supports merged ranges.
...
...
svx/source/dialog/framelinkarray.cxx
Dosyayı görüntüle @
5a025886
...
@@ -27,8 +27,32 @@
...
@@ -27,8 +27,32 @@
namespace
svx
{
namespace
svx
{
namespace
frame
{
namespace
frame
{
// ============================================================================
struct
Cell
{
Style
maLeft
;
Style
maRight
;
Style
maTop
;
Style
maBottom
;
Style
maTLBR
;
Style
maBLTR
;
long
mnAddLeft
;
long
mnAddRight
;
long
mnAddTop
;
long
mnAddBottom
;
bool
mbMergeOrig
;
bool
mbOverlapX
;
bool
mbOverlapY
;
explicit
Cell
();
inline
bool
IsMerged
()
const
{
return
mbMergeOrig
||
mbOverlapX
||
mbOverlapY
;
}
inline
bool
IsOverlapped
()
const
{
return
mbOverlapX
||
mbOverlapY
;
}
void
MirrorSelfX
(
bool
bMirrorStyles
,
bool
bSwapDiag
);
};
typedef
std
::
vector
<
long
>
LongVec
;
typedef
std
::
vector
<
Cell
>
CellVec
;
Cell
::
Cell
()
:
Cell
::
Cell
()
:
mnAddLeft
(
0
),
mnAddLeft
(
0
),
...
@@ -95,7 +119,61 @@ static const Cell OBJ_CELL_NONE;
...
@@ -95,7 +119,61 @@ static const Cell OBJ_CELL_NONE;
const
bool
DIAG_DBL_CLIP_DEFAULT
=
false
;
const
bool
DIAG_DBL_CLIP_DEFAULT
=
false
;
// ============================================================================
struct
ArrayImpl
{
CellVec
maCells
;
LongVec
maWidths
;
LongVec
maHeights
;
mutable
LongVec
maXCoords
;
mutable
LongVec
maYCoords
;
size_t
mnWidth
;
size_t
mnHeight
;
size_t
mnFirstClipCol
;
size_t
mnFirstClipRow
;
size_t
mnLastClipCol
;
size_t
mnLastClipRow
;
mutable
bool
mbXCoordsDirty
;
mutable
bool
mbYCoordsDirty
;
bool
mbDiagDblClip
;
explicit
ArrayImpl
(
size_t
nWidth
,
size_t
nHeight
,
bool
bDiagDblClip
);
inline
bool
IsValidPos
(
size_t
nCol
,
size_t
nRow
)
const
{
return
(
nCol
<
mnWidth
)
&&
(
nRow
<
mnHeight
);
}
inline
size_t
GetIndex
(
size_t
nCol
,
size_t
nRow
)
const
{
return
nRow
*
mnWidth
+
nCol
;
}
const
Cell
&
GetCell
(
size_t
nCol
,
size_t
nRow
)
const
;
Cell
&
GetCellAcc
(
size_t
nCol
,
size_t
nRow
);
size_t
GetMergedFirstCol
(
size_t
nCol
,
size_t
nRow
)
const
;
size_t
GetMergedFirstRow
(
size_t
nCol
,
size_t
nRow
)
const
;
size_t
GetMergedLastCol
(
size_t
nCol
,
size_t
nRow
)
const
;
size_t
GetMergedLastRow
(
size_t
nCol
,
size_t
nRow
)
const
;
const
Cell
&
GetMergedOriginCell
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedLeft
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedRight
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedTop
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsMergedOverlappedBottom
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsInClipRange
(
size_t
nCol
,
size_t
nRow
)
const
;
bool
IsColInClipRange
(
size_t
nCol
)
const
;
bool
IsRowInClipRange
(
size_t
nRow
)
const
;
inline
size_t
GetMirrorCol
(
size_t
nCol
)
const
{
return
mnWidth
-
nCol
-
1
;
}
inline
size_t
GetMirrorRow
(
size_t
nRow
)
const
{
return
mnHeight
-
nRow
-
1
;
}
long
GetColPosition
(
size_t
nCol
)
const
;
long
GetRowPosition
(
size_t
nRow
)
const
;
long
GetColWidth
(
size_t
nFirstCol
,
size_t
nLastCol
)
const
;
long
GetRowHeight
(
size_t
nFirstRow
,
size_t
nLastRow
)
const
;
double
GetHorDiagAngle
(
size_t
nCol
,
size_t
nRow
,
bool
bSimple
=
false
)
const
;
double
GetVerDiagAngle
(
size_t
nCol
,
size_t
nRow
,
bool
bSimple
=
false
)
const
;
};
ArrayImpl
::
ArrayImpl
(
size_t
nWidth
,
size_t
nHeight
,
bool
bDiagDblClip
)
:
ArrayImpl
::
ArrayImpl
(
size_t
nWidth
,
size_t
nHeight
,
bool
bDiagDblClip
)
:
mnWidth
(
nWidth
),
mnWidth
(
nWidth
),
...
...
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