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
08857f14
Kaydet (Commit)
08857f14
authored
Ock 15, 2018
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More loplugin:cstylecast: toolkit
Change-Id: I65b3c17c516d364326ce6dc3f7ba90c885a3e5e3
üst
1c6eb2d2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
31 deletions
+31
-31
vclxgraphics.cxx
toolkit/source/awt/vclxgraphics.cxx
+2
-2
vclxmenu.cxx
toolkit/source/awt/vclxmenu.cxx
+2
-2
vclxpointer.cxx
toolkit/source/awt/vclxpointer.cxx
+2
-2
vclxwindow.cxx
toolkit/source/awt/vclxwindow.cxx
+4
-4
vclxwindows.cxx
toolkit/source/awt/vclxwindows.cxx
+5
-5
unocontrolmodel.cxx
toolkit/source/controls/unocontrolmodel.cxx
+6
-6
vclunohelper.cxx
toolkit/source/helper/vclunohelper.cxx
+10
-10
No files found.
toolkit/source/awt/vclxgraphics.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -220,7 +220,7 @@ void VCLXGraphics::setRasterOp( awt::RasterOperation eROP )
{
SolarMutexGuard
aGuard
;
meRasterOp
=
(
RasterOp
)
eROP
;
meRasterOp
=
static_cast
<
RasterOp
>
(
eROP
)
;
}
void
VCLXGraphics
::
setClipRegion
(
const
uno
::
Reference
<
awt
::
XRegion
>&
rxRegion
)
...
...
@@ -460,7 +460,7 @@ void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_
if
(
mpOutputDevice
)
{
InitOutputDevice
(
InitOutDevFlags
::
COLORS
);
Gradient
aGradient
(
(
GradientStyle
)
rGradient
.
Style
,
rGradient
.
StartColor
,
rGradient
.
EndColor
);
Gradient
aGradient
(
static_cast
<
GradientStyle
>
(
rGradient
.
Style
)
,
rGradient
.
StartColor
,
rGradient
.
EndColor
);
aGradient
.
SetAngle
(
rGradient
.
Angle
);
aGradient
.
SetBorder
(
rGradient
.
Border
);
aGradient
.
SetOfsX
(
rGradient
.
XOffset
);
...
...
toolkit/source/awt/vclxmenu.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -309,7 +309,7 @@ void VCLXMenu::insertItem(
::
osl
::
Guard
<
::
osl
::
Mutex
>
aGuard
(
GetMutex
()
);
if
(
mpMenu
)
mpMenu
->
InsertItem
(
nItemId
,
aText
,
(
MenuItemBits
)
nItemStyle
,
OString
(),
nPos
);
mpMenu
->
InsertItem
(
nItemId
,
aText
,
static_cast
<
MenuItemBits
>
(
nItemStyle
)
,
OString
(),
nPos
);
}
void
VCLXMenu
::
removeItem
(
...
...
@@ -657,7 +657,7 @@ css::awt::MenuItemType SAL_CALL VCLXMenu::getItemType(
css
::
awt
::
MenuItemType_DONTKNOW
;
if
(
mpMenu
)
{
aMenuItemType
=
(
(
css
::
awt
::
MenuItemType
)
mpMenu
->
GetItemType
(
nItemPos
)
);
aMenuItemType
=
static_cast
<
css
::
awt
::
MenuItemType
>
(
mpMenu
->
GetItemType
(
nItemPos
)
);
}
return
aMenuItemType
;
...
...
toolkit/source/awt/vclxpointer.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -37,14 +37,14 @@ void VCLXPointer::setType( sal_Int32 nType )
{
::
osl
::
Guard
<
::
osl
::
Mutex
>
aGuard
(
GetMutex
()
);
maPointer
=
Pointer
(
(
PointerStyle
)
nType
);
maPointer
=
Pointer
(
static_cast
<
PointerStyle
>
(
nType
)
);
}
sal_Int32
VCLXPointer
::
getType
()
{
::
osl
::
Guard
<
::
osl
::
Mutex
>
aGuard
(
GetMutex
()
);
return
(
sal_Int32
)
maPointer
.
GetStyle
(
);
return
static_cast
<
sal_Int32
>
(
maPointer
.
GetStyle
()
);
}
OUString
VCLXPointer
::
getImplementationName
()
...
...
toolkit/source/awt/vclxwindow.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -1551,7 +1551,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
if
(
Value
>>=
n
)
{
vcl
::
Font
aFont
=
pWindow
->
GetControlFont
();
aFont
.
SetRelief
(
(
FontRelief
)
n
);
aFont
.
SetRelief
(
static_cast
<
FontRelief
>
(
n
)
);
pWindow
->
SetControlFont
(
aFont
);
}
}
...
...
@@ -1562,7 +1562,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
if
(
Value
>>=
n
)
{
vcl
::
Font
aFont
=
pWindow
->
GetControlFont
();
aFont
.
SetEmphasisMark
(
(
FontEmphasisMark
)
n
);
aFont
.
SetEmphasisMark
(
static_cast
<
FontEmphasisMark
>
(
n
)
);
pWindow
->
SetControlFont
(
aFont
);
}
}
...
...
@@ -2007,10 +2007,10 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
aProp
<<=
static_cast
<
sal_Int32
>
(
GetWindow
()
->
GetDisplayBackground
().
GetColor
().
GetColor
());
break
;
case
BASEPROPERTY_FONTRELIEF
:
aProp
<<=
(
sal_Int16
)
GetWindow
()
->
GetControlFont
().
GetRelief
(
);
aProp
<<=
static_cast
<
sal_Int16
>
(
GetWindow
()
->
GetControlFont
().
GetRelief
()
);
break
;
case
BASEPROPERTY_FONTEMPHASISMARK
:
aProp
<<=
(
sal_Int16
)
GetWindow
()
->
GetControlFont
().
GetEmphasisMark
(
);
aProp
<<=
static_cast
<
sal_Int16
>
(
GetWindow
()
->
GetControlFont
().
GetEmphasisMark
()
);
break
;
case
BASEPROPERTY_TEXTCOLOR
:
aProp
<<=
static_cast
<
sal_Int32
>
(
GetWindow
()
->
GetControlForeground
().
GetColor
());
...
...
toolkit/source/awt/vclxwindows.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -517,7 +517,7 @@ void VCLXButton::setProperty( const OUString& PropertyName, const css::uno::Any&
{
sal_Int16
n
=
sal_Int16
();
if
(
Value
>>=
n
)
static_cast
<
PushButton
*>
(
pButton
.
get
())
->
SetState
(
(
TriState
)
n
);
static_cast
<
PushButton
*>
(
pButton
.
get
())
->
SetState
(
static_cast
<
TriState
>
(
n
)
);
}
}
break
;
...
...
@@ -4813,7 +4813,7 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const css::uno::A
{
sal_Int16
n
=
sal_Int16
();
if
(
Value
>>=
n
)
GetAs
<
DateField
>
()
->
SetExtDateFormat
(
(
ExtDateFieldFormat
)
n
);
GetAs
<
DateField
>
()
->
SetExtDateFormat
(
static_cast
<
ExtDateFieldFormat
>
(
n
)
);
}
break
;
case
BASEPROPERTY_DATESHOWCENTURY
:
...
...
@@ -5296,7 +5296,7 @@ void VCLXTimeField::setProperty( const OUString& PropertyName, const css::uno::A
{
sal_Int16
n
=
sal_Int16
();
if
(
Value
>>=
n
)
GetAs
<
TimeField
>
()
->
SetExtFormat
(
(
ExtTimeFieldFormat
)
n
);
GetAs
<
TimeField
>
()
->
SetExtFormat
(
static_cast
<
ExtTimeFieldFormat
>
(
n
)
);
}
break
;
case
BASEPROPERTY_ENFORCE_FORMAT
:
...
...
@@ -5772,7 +5772,7 @@ IMPL_XTYPEPROVIDER_START( VCLXMetricField )
IMPL_XTYPEPROVIDER_END
// FIXME: later ...
#define MetricUnitUnoToVcl(a) (
(FieldUnit)
(a))
#define MetricUnitUnoToVcl(a) (
static_cast<FieldUnit>
(a))
#define METRIC_MAP_PAIR(method,parent) \
sal_Int64 VCLXMetricField::get##method( sal_Int16 nUnit ) \
...
...
@@ -5896,7 +5896,7 @@ void VCLXMetricField::setProperty( const OUString& PropertyName, const css::uno:
{
sal_uInt16
nVal
=
0
;
if
(
Value
>>=
nVal
)
GetAs
<
MetricField
>
()
->
SetUnit
(
(
FieldUnit
)
nVal
);
GetAs
<
MetricField
>
()
->
SetUnit
(
static_cast
<
FieldUnit
>
(
nVal
)
);
break
;
}
case
BASEPROPERTY_CUSTOMUNITTEXT
:
...
...
toolkit/source/controls/unocontrolmodel.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -85,7 +85,7 @@ static void lcl_ImplMergeFontProperty( FontDescriptor& rFD, sal_uInt16 nPropId,
case
BASEPROPERTY_FONTDESCRIPTORPART_WEIGHT
:
rValue
>>=
rFD
.
Weight
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_SLANT
:
if
(
rValue
>>=
nExtractShort
)
rFD
.
Slant
=
(
css
::
awt
::
FontSlant
)
nExtractShort
;
rFD
.
Slant
=
static_cast
<
css
::
awt
::
FontSlant
>
(
nExtractShort
)
;
else
rValue
>>=
rFD
.
Slant
;
break
;
...
...
@@ -176,7 +176,7 @@ css::uno::Any UnoControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
case
BASEPROPERTY_FONTDESCRIPTORPART_CHARSET
:
aDefault
<<=
aFD
.
CharSet
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_HEIGHT
:
aDefault
<<=
static_cast
<
float
>
(
aFD
.
Height
);
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_WEIGHT
:
aDefault
<<=
aFD
.
Weight
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_SLANT
:
aDefault
<<=
(
sal_Int16
)
aFD
.
Slant
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_SLANT
:
aDefault
<<=
static_cast
<
sal_Int16
>
(
aFD
.
Slant
)
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_UNDERLINE
:
aDefault
<<=
aFD
.
Underline
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_STRIKEOUT
:
aDefault
<<=
aFD
.
Strikeout
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_WIDTH
:
aDefault
<<=
aFD
.
Width
;
break
;
...
...
@@ -840,7 +840,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
aFD
.
Pitch
=
InStream
->
readShort
();
aFD
.
CharacterWidth
=
static_cast
<
float
>
(
InStream
->
readDouble
());
aFD
.
Weight
=
static_cast
<
float
>
(
InStream
->
readDouble
());
aFD
.
Slant
=
(
css
::
awt
::
FontSlant
)
InStream
->
readShort
(
);
aFD
.
Slant
=
static_cast
<
css
::
awt
::
FontSlant
>
(
InStream
->
readShort
()
);
aFD
.
Underline
=
InStream
->
readShort
();
aFD
.
Strikeout
=
InStream
->
readShort
();
aFD
.
Orientation
=
static_cast
<
float
>
(
InStream
->
readDouble
());
...
...
@@ -951,8 +951,8 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
if
(
maData
.
find
(
BASEPROPERTY_FONTDESCRIPTOR
)
!=
maData
.
end
()
)
// due to defaults...
maData
[
BASEPROPERTY_FONTDESCRIPTOR
]
>>=
*
pFD
;
}
pFD
->
Weight
=
vcl
::
unohelper
::
ConvertFontWeight
(
(
FontWeight
)
InStream
->
readShort
(
));
pFD
->
Slant
=
(
css
::
awt
::
FontSlant
)
InStream
->
readShort
(
);
pFD
->
Weight
=
vcl
::
unohelper
::
ConvertFontWeight
(
static_cast
<
FontWeight
>
(
InStream
->
readShort
()
));
pFD
->
Slant
=
static_cast
<
css
::
awt
::
FontSlant
>
(
InStream
->
readShort
()
);
pFD
->
Underline
=
InStream
->
readShort
();
pFD
->
Strikeout
=
InStream
->
readShort
();
pFD
->
Orientation
=
static_cast
<
float
>
(
static_cast
<
double
>
(
InStream
->
readShort
()))
/
10
;
...
...
@@ -1201,7 +1201,7 @@ void UnoControlModel::getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nPr
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_WEIGHT
:
rValue
<<=
aFD
.
Weight
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_SLANT
:
rValue
<<=
(
sal_Int16
)
aFD
.
Slant
;
case
BASEPROPERTY_FONTDESCRIPTORPART_SLANT
:
rValue
<<=
static_cast
<
sal_Int16
>
(
aFD
.
Slant
)
;
break
;
case
BASEPROPERTY_FONTDESCRIPTORPART_UNDERLINE
:
rValue
<<=
aFD
.
Underline
;
break
;
...
...
toolkit/source/helper/vclunohelper.cxx
Dosyayı görüntüle @
08857f14
...
...
@@ -228,22 +228,22 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons
aFont
.
SetStyleName
(
rDescr
.
StyleName
);
if
(
rDescr
.
Height
)
aFont
.
SetFontSize
(
Size
(
rDescr
.
Width
,
rDescr
.
Height
)
);
if
(
(
FontFamily
)
rDescr
.
Family
!=
FAMILY_DONTKNOW
)
aFont
.
SetFamily
(
(
FontFamily
)
rDescr
.
Family
);
if
(
static_cast
<
FontFamily
>
(
rDescr
.
Family
)
!=
FAMILY_DONTKNOW
)
aFont
.
SetFamily
(
static_cast
<
FontFamily
>
(
rDescr
.
Family
)
);
if
(
static_cast
<
rtl_TextEncoding
>
(
rDescr
.
CharSet
)
!=
RTL_TEXTENCODING_DONTKNOW
)
aFont
.
SetCharSet
(
static_cast
<
rtl_TextEncoding
>
(
rDescr
.
CharSet
)
);
if
(
(
FontPitch
)
rDescr
.
Pitch
!=
PITCH_DONTKNOW
)
aFont
.
SetPitch
(
(
FontPitch
)
rDescr
.
Pitch
);
if
(
static_cast
<
FontPitch
>
(
rDescr
.
Pitch
)
!=
PITCH_DONTKNOW
)
aFont
.
SetPitch
(
static_cast
<
FontPitch
>
(
rDescr
.
Pitch
)
);
if
(
rDescr
.
CharacterWidth
)
aFont
.
SetWidthType
(
vcl
::
unohelper
::
ConvertFontWidth
(
rDescr
.
CharacterWidth
));
if
(
rDescr
.
Weight
)
aFont
.
SetWeight
(
vcl
::
unohelper
::
ConvertFontWeight
(
rDescr
.
Weight
));
if
(
rDescr
.
Slant
!=
css
::
awt
::
FontSlant_DONTKNOW
)
aFont
.
SetItalic
(
vcl
::
unohelper
::
ConvertFontSlant
(
rDescr
.
Slant
));
if
(
(
FontLineStyle
)
rDescr
.
Underline
!=
LINESTYLE_DONTKNOW
)
aFont
.
SetUnderline
(
(
FontLineStyle
)
rDescr
.
Underline
);
if
(
(
FontStrikeout
)
rDescr
.
Strikeout
!=
STRIKEOUT_DONTKNOW
)
aFont
.
SetStrikeout
(
(
FontStrikeout
)
rDescr
.
Strikeout
);
if
(
static_cast
<
FontLineStyle
>
(
rDescr
.
Underline
)
!=
LINESTYLE_DONTKNOW
)
aFont
.
SetUnderline
(
static_cast
<
FontLineStyle
>
(
rDescr
.
Underline
)
);
if
(
static_cast
<
FontStrikeout
>
(
rDescr
.
Strikeout
)
!=
STRIKEOUT_DONTKNOW
)
aFont
.
SetStrikeout
(
static_cast
<
FontStrikeout
>
(
rDescr
.
Strikeout
)
);
// Not DONTKNOW
aFont
.
SetOrientation
(
static_cast
<
short
>
(
rDescr
.
Orientation
)
);
...
...
@@ -385,7 +385,7 @@ namespace
{
if
(
eDirection
==
FieldUnitToMeasurementUnit
)
{
if
(
(
aUnit
.
eFieldUnit
==
(
FieldUnit
)
_nUnit
)
&&
(
aUnit
.
nFieldToMeasureFactor
==
_rFieldToUNOValueFactor
)
)
if
(
(
aUnit
.
eFieldUnit
==
static_cast
<
FieldUnit
>
(
_nUnit
)
)
&&
(
aUnit
.
nFieldToMeasureFactor
==
_rFieldToUNOValueFactor
)
)
return
aUnit
.
nMeasurementUnit
;
}
else
...
...
@@ -416,7 +416,7 @@ sal_Int16 VCLUnoHelper::ConvertToMeasurementUnit( FieldUnit _nFieldUnit, sal_Int
FieldUnit
VCLUnoHelper
::
ConvertToFieldUnit
(
sal_Int16
_nMeasurementUnit
,
sal_Int16
&
_rFieldToUNOValueFactor
)
{
return
(
FieldUnit
)
convertMeasurementUnit
(
_nMeasurementUnit
,
MeasurementUnitToFieldUnit
,
_rFieldToUNOValueFactor
);
return
static_cast
<
FieldUnit
>
(
convertMeasurementUnit
(
_nMeasurementUnit
,
MeasurementUnitToFieldUnit
,
_rFieldToUNOValueFactor
)
);
}
...
...
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