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
9bd78655
Kaydet (Commit)
9bd78655
authored
Ock 04, 2011
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed units mess in SvxBorderLine and BorderLineImpl
üst
302b7b09
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
40 deletions
+29
-40
borderline.hxx
editeng/inc/editeng/borderline.hxx
+1
-1
borderline_test.cxx
editeng/qa/items/borderline_test.cxx
+7
-7
makefile.mk
editeng/qa/items/makefile.mk
+2
-11
borderline.cxx
editeng/source/items/borderline.cxx
+14
-10
frmsel.hxx
svx/inc/svx/frmsel.hxx
+2
-3
frmsel.cxx
svx/source/dialog/frmsel.cxx
+3
-8
No files found.
editeng/inc/editeng/borderline.hxx
Dosyayı görüntüle @
9bd78655
...
@@ -108,7 +108,7 @@ enum SvxBorderStyle
...
@@ -108,7 +108,7 @@ enum SvxBorderStyle
ENGRAVED
,
ENGRAVED
,
OUTSET
,
OUTSET
,
INSET
,
INSET
,
NO
N
E
=
-
1
NO
_STYL
E
=
-
1
};
};
class
EDITENG_DLLPUBLIC
SvxBorderLine
class
EDITENG_DLLPUBLIC
SvxBorderLine
...
...
editeng/qa/items/borderline_test.cxx
Dosyayı görüntüle @
9bd78655
...
@@ -33,15 +33,15 @@
...
@@ -33,15 +33,15 @@
#include <editeng/borderline.hxx>
#include <editeng/borderline.hxx>
#define TEST_WIDTH long(
20
0 )
#define TEST_WIDTH long(
4
0 )
#define THINTHICKSG_IN_WIDTH long(
200
)
#define THINTHICKSG_IN_WIDTH long(
15
)
#define THINTHICKSG_OUT_WIDTH long(
75
)
#define THINTHICKSG_OUT_WIDTH long(
40
)
#define THINTHICKSG_DIST_WIDTH long(
7
5 )
#define THINTHICKSG_DIST_WIDTH long(
1
5 )
#define THINTHICKLG_IN_WIDTH long(
7
5 )
#define THINTHICKLG_IN_WIDTH long(
1
5 )
#define THINTHICKLG_OUT_WIDTH long(
15
0 )
#define THINTHICKLG_OUT_WIDTH long(
3
0 )
#define THINTHICKLG_DIST_WIDTH long(
20
0 )
#define THINTHICKLG_DIST_WIDTH long(
4
0 )
namespace
{
namespace
{
...
...
editeng/qa/items/makefile.mk
Dosyayı görüntüle @
9bd78655
...
@@ -51,16 +51,6 @@ SHL1TARGET = borderline_test
...
@@ -51,16 +51,6 @@ SHL1TARGET = borderline_test
SHL1OBJS
=
\
SHL1OBJS
=
\
$(SLO)$/
borderline_test.obj
$(SLO)$/
borderline_test.obj
SHL1LIBS
=
\
$(SLB)$/
items.lib
\
$(SLB)$/
misc.lib
\
$(SLB)$/
rtf.lib
\
$(SLB)$/
uno.lib
\
$(SLB)$/
accessibility.lib
\
$(SLB)$/
editeng.lib
\
$(SLB)$/
outliner.lib
\
$(SLB)$/
xml.lib
SHL1STDLIBS
=
\
SHL1STDLIBS
=
\
$(CPPUNITLIB)
\
$(CPPUNITLIB)
\
$(XMLOFFLIB)
\
$(XMLOFFLIB)
\
...
@@ -81,7 +71,8 @@ SHL1STDLIBS= \
...
@@ -81,7 +71,8 @@ SHL1STDLIBS= \
$(CPPULIB)
\
$(CPPULIB)
\
$(SALLIB)
\
$(SALLIB)
\
$(SALHELPERLIB)
\
$(SALHELPERLIB)
\
$(ICUUCLIB)
$(ICUUCLIB)
\
$(EDITENGLIB)
SHL1VERSIONMAP
=
version.map
SHL1VERSIONMAP
=
version.map
SHL1IMPLIB
=
i
$(SHL1TARGET)
SHL1IMPLIB
=
i
$(SHL1TARGET)
...
...
editeng/source/items/borderline.cxx
Dosyayı görüntüle @
9bd78655
...
@@ -112,6 +112,10 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
...
@@ -112,6 +112,10 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
aColor
=
*
pCol
;
aColor
=
*
pCol
;
}
}
/** Get the BorderWithImpl object corresponding to the given #nStyle, all the
units handled by the resulting object are Twips and the
BorderWidthImpl::GetLine1() corresponds to the Outer Line.
*/
BorderWidthImpl
SvxBorderLine
::
getWidthImpl
(
SvxBorderStyle
nStyle
)
BorderWidthImpl
SvxBorderLine
::
getWidthImpl
(
SvxBorderStyle
nStyle
)
{
{
BorderWidthImpl
aImpl
;
BorderWidthImpl
aImpl
;
...
@@ -119,8 +123,8 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
...
@@ -119,8 +123,8 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
switch
(
nStyle
)
switch
(
nStyle
)
{
{
// No line: no width
// No line: no width
case
NO
N
E
:
case
NO
_STYL
E
:
aImpl
=
BorderWidthImpl
(
CHANGE_LINE1
,
0.0
);
aImpl
=
BorderWidthImpl
(
0
,
0.0
);
break
;
break
;
// Single lines
// Single lines
...
@@ -139,7 +143,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
...
@@ -139,7 +143,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
break
;
break
;
case
THINTHICK_SMALLGAP
:
case
THINTHICK_SMALLGAP
:
aImpl
=
BorderWidthImpl
(
CHANGE_LINE1
,
1.0
,
75.0
,
7
5.0
);
aImpl
=
BorderWidthImpl
(
CHANGE_LINE1
,
1.0
,
15.0
,
1
5.0
);
break
;
break
;
case
THINTHICK_MEDIUMGAP
:
case
THINTHICK_MEDIUMGAP
:
...
@@ -149,11 +153,11 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
...
@@ -149,11 +153,11 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
break
;
break
;
case
THINTHICK_LARGEGAP
:
case
THINTHICK_LARGEGAP
:
aImpl
=
BorderWidthImpl
(
CHANGE_DIST
,
75.0
,
150
.0
,
1.0
);
aImpl
=
BorderWidthImpl
(
CHANGE_DIST
,
30.0
,
15
.0
,
1.0
);
break
;
break
;
case
THICKTHIN_SMALLGAP
:
case
THICKTHIN_SMALLGAP
:
aImpl
=
BorderWidthImpl
(
CHANGE_
DIST
,
75.0
,
1.0
,
7
5.0
);
aImpl
=
BorderWidthImpl
(
CHANGE_
LINE2
,
15.0
,
1.0
,
1
5.0
);
break
;
break
;
case
THICKTHIN_MEDIUMGAP
:
case
THICKTHIN_MEDIUMGAP
:
...
@@ -163,7 +167,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
...
@@ -163,7 +167,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
break
;
break
;
case
THICKTHIN_LARGEGAP
:
case
THICKTHIN_LARGEGAP
:
aImpl
=
BorderWidthImpl
(
CHANGE_DIST
,
15
0.0
,
75
.0
,
1.0
);
aImpl
=
BorderWidthImpl
(
CHANGE_DIST
,
15
.0
,
30
.0
,
1.0
);
break
;
break
;
// Engraved / Embossed
// Engraved / Embossed
...
@@ -187,13 +191,13 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
...
@@ -187,13 +191,13 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
case
OUTSET
:
case
OUTSET
:
aImpl
=
BorderWidthImpl
(
aImpl
=
BorderWidthImpl
(
CHANGE_LINE2
|
CHANGE_DIST
,
CHANGE_LINE2
|
CHANGE_DIST
,
7
5.0
,
1.0
,
1.0
);
1
5.0
,
1.0
,
1.0
);
break
;
break
;
case
INSET
:
case
INSET
:
aImpl
=
BorderWidthImpl
(
aImpl
=
BorderWidthImpl
(
CHANGE_LINE1
|
CHANGE_DIST
,
CHANGE_LINE1
|
CHANGE_DIST
,
1.0
,
7
5.0
,
1.0
);
1.0
,
1
5.0
,
1.0
);
break
;
break
;
}
}
...
@@ -252,7 +256,7 @@ void SvxBorderLine::SetLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nIn, sal_u
...
@@ -252,7 +256,7 @@ void SvxBorderLine::SetLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nIn, sal_u
{
{
nTestStyle
=
aDoubleStyles
[
i
];
nTestStyle
=
aDoubleStyles
[
i
];
BorderWidthImpl
aWidthImpl
=
getWidthImpl
(
nTestStyle
);
BorderWidthImpl
aWidthImpl
=
getWidthImpl
(
nTestStyle
);
nWidth
=
aWidthImpl
.
GuessWidth
(
n
In
,
nOut
,
nDist
);
nWidth
=
aWidthImpl
.
GuessWidth
(
n
Out
,
nIn
,
nDist
);
i
++
;
i
++
;
}
}
...
@@ -266,7 +270,7 @@ void SvxBorderLine::SetLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nIn, sal_u
...
@@ -266,7 +270,7 @@ void SvxBorderLine::SetLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nIn, sal_u
else
else
{
{
SetStyle
(
nStyle
);
SetStyle
(
nStyle
);
m_nWidth
=
m_aWidthImpl
.
GuessWidth
(
n
In
,
nOut
,
nDist
);
m_nWidth
=
m_aWidthImpl
.
GuessWidth
(
n
Out
,
nIn
,
nDist
);
}
}
}
}
...
...
svx/inc/svx/frmsel.hxx
Dosyayı görüntüle @
9bd78655
...
@@ -129,9 +129,8 @@ public:
...
@@ -129,9 +129,8 @@ public:
/** Returns true, if all visible frame borders have equal widths.
/** Returns true, if all visible frame borders have equal widths.
@descr Ignores hidden and "don't care" frame borders. On success,
@descr Ignores hidden and "don't care" frame borders. On success,
returns the widths in the passed parameters. */
returns the width in the passed parameter. */
bool
GetVisibleWidth
(
sal_uInt16
&
rnPrim
,
sal_uInt16
&
rnDist
,
sal_uInt16
&
rnSec
,
bool
GetVisibleWidth
(
long
&
rnWidth
,
SvxBorderStyle
&
rnStyle
)
const
;
SvxBorderStyle
&
rnStyle
)
const
;
/** Returns true, if all visible frame borders have equal color.
/** Returns true, if all visible frame borders have equal color.
@descr Ignores hidden and "don't care" frame borders. On success,
@descr Ignores hidden and "don't care" frame borders. On success,
returns the color in the passed parameter. */
returns the color in the passed parameter. */
...
...
svx/source/dialog/frmsel.cxx
Dosyayı görüntüle @
9bd78655
...
@@ -887,8 +887,7 @@ void FrameSelector::HideAllBorders()
...
@@ -887,8 +887,7 @@ void FrameSelector::HideAllBorders()
mxImpl
->
SetBorderState
(
**
aIt
,
FRAMESTATE_HIDE
);
mxImpl
->
SetBorderState
(
**
aIt
,
FRAMESTATE_HIDE
);
}
}
bool
FrameSelector
::
GetVisibleWidth
(
sal_uInt16
&
rnPrim
,
sal_uInt16
&
rnDist
,
sal_uInt16
&
rnSecn
,
bool
FrameSelector
::
GetVisibleWidth
(
long
&
rnWidth
,
SvxBorderStyle
&
rnStyle
)
const
SvxBorderStyle
&
rnStyle
)
const
{
{
VisFrameBorderCIter
aIt
(
mxImpl
->
maEnabBorders
);
VisFrameBorderCIter
aIt
(
mxImpl
->
maEnabBorders
);
if
(
!
aIt
.
Is
()
)
if
(
!
aIt
.
Is
()
)
...
@@ -898,16 +897,12 @@ bool FrameSelector::GetVisibleWidth( sal_uInt16& rnPrim, sal_uInt16& rnDist, sal
...
@@ -898,16 +897,12 @@ bool FrameSelector::GetVisibleWidth( sal_uInt16& rnPrim, sal_uInt16& rnDist, sal
bool
bFound
=
true
;
bool
bFound
=
true
;
for
(
++
aIt
;
bFound
&&
aIt
.
Is
();
++
aIt
)
for
(
++
aIt
;
bFound
&&
aIt
.
Is
();
++
aIt
)
bFound
=
bFound
=
(
rStyle
.
GetOutWidth
()
==
(
*
aIt
)
->
GetCoreStyle
().
GetOutWidth
())
&&
(
rStyle
.
GetWidth
()
==
(
*
aIt
)
->
GetCoreStyle
().
GetWidth
())
&&
(
rStyle
.
GetDistance
()
==
(
*
aIt
)
->
GetCoreStyle
().
GetDistance
())
&&
(
rStyle
.
GetInWidth
()
==
(
*
aIt
)
->
GetCoreStyle
().
GetInWidth
())
&&
(
rStyle
.
GetStyle
()
==
(
*
aIt
)
->
GetCoreStyle
().
GetStyle
());
(
rStyle
.
GetStyle
()
==
(
*
aIt
)
->
GetCoreStyle
().
GetStyle
());
if
(
bFound
)
if
(
bFound
)
{
{
rnPrim
=
rStyle
.
GetOutWidth
();
rnWidth
=
rStyle
.
GetWidth
();
rnDist
=
rStyle
.
GetDistance
();
rnSecn
=
rStyle
.
GetInWidth
();
rnStyle
=
rStyle
.
GetStyle
();
rnStyle
=
rStyle
.
GetStyle
();
}
}
return
bFound
;
return
bFound
;
...
...
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