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
d3193875
Kaydet (Commit)
d3193875
authored
Ock 17, 2012
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SvPtrarr->std::vector
üst
cd10d4e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
56 deletions
+12
-56
rulritem.hxx
svx/inc/svx/rulritem.hxx
+7
-24
rulritem.cxx
svx/source/dialog/rulritem.cxx
+5
-32
No files found.
svx/inc/svx/rulritem.hxx
Dosyayı görüntüle @
d3193875
...
@@ -28,14 +28,10 @@
...
@@ -28,14 +28,10 @@
#ifndef _SVX_RULRITEM_HXX
#ifndef _SVX_RULRITEM_HXX
#define _SVX_RULRITEM_HXX
#define _SVX_RULRITEM_HXX
// include ---------------------------------------------------------------
#include <tools/gen.hxx>
#include <tools/gen.hxx>
#include <svl/poolitem.hxx>
#include <svl/poolitem.hxx>
#include "svx/svxdllapi.h"
#include "svx/svxdllapi.h"
#include <vector>
// class SvxLongLRSpaceItem ----------------------------------------------
class
SVX_DLLPUBLIC
SvxLongLRSpaceItem
:
public
SfxPoolItem
class
SVX_DLLPUBLIC
SvxLongLRSpaceItem
:
public
SfxPoolItem
{
{
...
@@ -71,8 +67,6 @@ public:
...
@@ -71,8 +67,6 @@ public:
void
SetRight
(
long
lArgRight
)
{
lRight
=
lArgRight
;}
void
SetRight
(
long
lArgRight
)
{
lRight
=
lArgRight
;}
};
};
// class SvxLongULSpaceItem ----------------------------------------------
class
SVX_DLLPUBLIC
SvxLongULSpaceItem
:
public
SfxPoolItem
class
SVX_DLLPUBLIC
SvxLongULSpaceItem
:
public
SfxPoolItem
{
{
long
lLeft
;
// nLeft or the negative first-line indentation
long
lLeft
;
// nLeft or the negative first-line indentation
...
@@ -107,8 +101,6 @@ public:
...
@@ -107,8 +101,6 @@ public:
void
SetLower
(
long
lArgRight
)
{
lRight
=
lArgRight
;}
void
SetLower
(
long
lArgRight
)
{
lRight
=
lArgRight
;}
};
};
// class SvxPagePosSizeItem ----------------------------------------------
class
SVX_DLLPUBLIC
SvxPagePosSizeItem
:
public
SfxPoolItem
class
SVX_DLLPUBLIC
SvxPagePosSizeItem
:
public
SfxPoolItem
{
{
Point
aPos
;
Point
aPos
;
...
@@ -140,8 +132,6 @@ public:
...
@@ -140,8 +132,6 @@ public:
long
GetHeight
()
const
{
return
lHeight
;
}
long
GetHeight
()
const
{
return
lHeight
;
}
};
};
// struct SvxColumnDescription -------------------------------------------
struct
SvxColumnDescription
struct
SvxColumnDescription
{
{
long
nStart
;
/* Start of the column */
long
nStart
;
/* Start of the column */
...
@@ -185,13 +175,9 @@ struct SvxColumnDescription
...
@@ -185,13 +175,9 @@ struct SvxColumnDescription
long
GetWidth
()
const
{
return
nEnd
-
nStart
;
}
long
GetWidth
()
const
{
return
nEnd
-
nStart
;
}
};
};
// class SvxColumnItem ---------------------------------------------------
typedef
SvPtrarr
SvxColumns
;
class
SVX_DLLPUBLIC
SvxColumnItem
:
public
SfxPoolItem
class
SVX_DLLPUBLIC
SvxColumnItem
:
public
SfxPoolItem
{
{
SvxColumns
aColumns
;
// Column array
std
::
vector
<
SvxColumnDescription
>
aColumns
;
// Column array
long
nLeft
,
// Left edge for the table
long
nLeft
,
// Left edge for the table
nRight
;
// Right edge for the table; for columns always
nRight
;
// Right edge for the table; for columns always
// equal to the surrounding frame
// equal to the surrounding frame
...
@@ -199,8 +185,6 @@ class SVX_DLLPUBLIC SvxColumnItem : public SfxPoolItem
...
@@ -199,8 +185,6 @@ class SVX_DLLPUBLIC SvxColumnItem : public SfxPoolItem
sal_uInt8
bTable
;
// table?
sal_uInt8
bTable
;
// table?
sal_uInt8
bOrtho
;
// evenly spread columns
sal_uInt8
bOrtho
;
// evenly spread columns
void
DeleteAndDestroyColumns
();
protected
:
protected
:
virtual
int
operator
==
(
const
SfxPoolItem
&
)
const
;
virtual
int
operator
==
(
const
SfxPoolItem
&
)
const
;
...
@@ -225,14 +209,13 @@ public:
...
@@ -225,14 +209,13 @@ public:
const
SvxColumnItem
&
operator
=
(
const
SvxColumnItem
&
);
const
SvxColumnItem
&
operator
=
(
const
SvxColumnItem
&
);
sal_uInt16
Count
()
const
{
return
aColumns
.
Count
();
}
sal_uInt16
Count
()
const
{
return
aColumns
.
size
();
}
SvxColumnDescription
&
operator
[](
sal_uInt16
i
)
SvxColumnDescription
&
operator
[](
sal_uInt16
i
)
{
return
*
(
SvxColumnDescription
*
)
aColumns
[
i
];
}
{
return
aColumns
[
i
];
}
const
SvxColumnDescription
&
operator
[](
sal_uInt16
i
)
const
const
SvxColumnDescription
&
operator
[](
sal_uInt16
i
)
const
{
return
*
(
SvxColumnDescription
*
)
aColumns
[
i
];
}
{
return
aColumns
[
i
];
}
void
Insert
(
const
SvxColumnDescription
&
rDesc
,
sal_uInt16
nPos
)
{
void
Insert
(
const
SvxColumnDescription
&
rDesc
,
sal_uInt16
nPos
)
{
SvxColumnDescription
*
pDesc
=
new
SvxColumnDescription
(
rDesc
);
aColumns
.
insert
(
aColumns
.
begin
()
+
nPos
,
rDesc
);
aColumns
.
Insert
(
pDesc
,
nPos
);
}
}
void
Append
(
const
SvxColumnDescription
&
rDesc
)
{
Insert
(
rDesc
,
Count
());
}
void
Append
(
const
SvxColumnDescription
&
rDesc
)
{
Insert
(
rDesc
,
Count
());
}
void
SetLeft
(
long
left
)
{
nLeft
=
left
;
}
void
SetLeft
(
long
left
)
{
nLeft
=
left
;
}
...
@@ -251,7 +234,7 @@ public:
...
@@ -251,7 +234,7 @@ public:
void
SetOrtho
(
sal_Bool
bVal
)
{
bOrtho
=
bVal
;
}
void
SetOrtho
(
sal_Bool
bVal
)
{
bOrtho
=
bVal
;
}
sal_Bool
IsOrtho
()
const
{
return
sal_False
;
}
sal_Bool
IsOrtho
()
const
{
return
sal_False
;
}
sal_Bool
IsConsistent
()
const
{
return
nActColumn
<
aColumns
.
Count
();
}
sal_Bool
IsConsistent
()
const
{
return
nActColumn
<
aColumns
.
size
();
}
long
GetVisibleRight
()
const
;
// right visible edge of the current column
long
GetVisibleRight
()
const
;
// right visible edge of the current column
};
};
...
...
svx/source/dialog/rulritem.cxx
Dosyayı görüntüle @
d3193875
...
@@ -429,18 +429,6 @@ SvxPagePosSizeItem::SvxPagePosSizeItem()
...
@@ -429,18 +429,6 @@ SvxPagePosSizeItem::SvxPagePosSizeItem()
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void
SvxColumnItem
::
DeleteAndDestroyColumns
()
{
for
(
sal_uInt16
i
=
aColumns
.
Count
();
i
>
0
;
)
{
SvxColumnDescription
*
pTmp
=
(
SvxColumnDescription
*
)
aColumns
[
--
i
];
aColumns
.
Remove
(
i
);
delete
pTmp
;
}
}
//------------------------------------------------------------------------
int
SvxColumnItem
::
operator
==
(
const
SfxPoolItem
&
rCmp
)
const
int
SvxColumnItem
::
operator
==
(
const
SfxPoolItem
&
rCmp
)
const
{
{
if
(
!
SfxPoolItem
::
operator
==
(
rCmp
)
||
if
(
!
SfxPoolItem
::
operator
==
(
rCmp
)
||
...
@@ -515,50 +503,35 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, sal_uInt16 left, sal_uInt16 ri
...
@@ -515,50 +503,35 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, sal_uInt16 left, sal_uInt16 ri
{
{
}
}
//------------------------------------------------------------------------
SvxColumnItem
::
SvxColumnItem
(
const
SvxColumnItem
&
rCopy
)
:
SvxColumnItem
::
SvxColumnItem
(
const
SvxColumnItem
&
rCopy
)
:
SfxPoolItem
(
rCopy
),
SfxPoolItem
(
rCopy
),
aColumns
(
(
sal_uInt8
)
rCopy
.
Count
()
),
aColumns
(
(
sal_uInt8
)
rCopy
.
Count
()
),
nLeft
(
rCopy
.
nLeft
),
nLeft
(
rCopy
.
nLeft
),
nRight
(
rCopy
.
nRight
),
nRight
(
rCopy
.
nRight
),
nActColumn
(
rCopy
.
nActColumn
),
nActColumn
(
rCopy
.
nActColumn
),
bTable
(
rCopy
.
bTable
),
bTable
(
rCopy
.
bTable
),
bOrtho
(
rCopy
.
bOrtho
)
bOrtho
(
rCopy
.
bOrtho
)
{
{
const
sal_uInt16
nCount
=
rCopy
.
Count
();
for
(
size_t
i
=
0
;
i
<
rCopy
.
Count
();
++
i
)
aColumns
.
push_back
(
rCopy
[
i
]);
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
Append
(
rCopy
[
i
]
);
}
}
//------------------------------------------------------------------------
SvxColumnItem
::~
SvxColumnItem
()
SvxColumnItem
::~
SvxColumnItem
()
{
{
DeleteAndDestroyColumns
();
}
}
//------------------------------------------------------------------------
const
SvxColumnItem
&
SvxColumnItem
::
operator
=
(
const
SvxColumnItem
&
rCopy
)
const
SvxColumnItem
&
SvxColumnItem
::
operator
=
(
const
SvxColumnItem
&
rCopy
)
{
{
nLeft
=
rCopy
.
nLeft
;
nLeft
=
rCopy
.
nLeft
;
nRight
=
rCopy
.
nRight
;
nRight
=
rCopy
.
nRight
;
bTable
=
rCopy
.
bTable
;
bTable
=
rCopy
.
bTable
;
nActColumn
=
rCopy
.
nActColumn
;
nActColumn
=
rCopy
.
nActColumn
;
DeleteAndDestroyColumns
();
aColumns
.
clear
();
const
sal_uInt16
nCount
=
rCopy
.
Count
();
for
(
size_t
i
=
0
;
i
<
rCopy
.
Count
();
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
aColumns
.
push_back
(
rCopy
[
i
]);
Insert
(
rCopy
[
i
],
i
);
return
*
this
;
return
*
this
;
}
}
//------------------------------------------------------------------------
sal_Bool
SvxColumnItem
::
CalcOrtho
()
const
sal_Bool
SvxColumnItem
::
CalcOrtho
()
const
{
{
const
sal_uInt16
nCount
=
Count
();
const
sal_uInt16
nCount
=
Count
();
...
...
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