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
643b7000
Kaydet (Commit)
643b7000
authored
Haz 03, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Teach loplugin:stringconstant about RTL_CONSTASCII_STRINGPARAM
Change-Id: I8ff0e104aad045f3835dc8facc760a8339b1d088
üst
9cf0ac71
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
86 additions
and
89 deletions
+86
-89
player.mm
avmedia/source/macavf/player.mm
+1
-1
window.mm
avmedia/source/macavf/window.mm
+1
-1
stringconstant.cxx
compilerplugins/clang/stringconstant.cxx
+14
-0
typecheck.cxx
compilerplugins/clang/typecheck.cxx
+10
-0
typecheck.hxx
compilerplugins/clang/typecheck.hxx
+2
-0
protocols.h
framework/inc/protocols.h
+10
-10
rtl_OUString2.cxx
sal/qa/rtl/oustring/rtl_OUString2.cxx
+12
-41
printaccessoryview.mm
vcl/osx/printaccessoryview.mm
+36
-36
No files found.
avmedia/source/macavf/player.mm
Dosyayı görüntüle @
643b7000
...
@@ -392,7 +392,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
...
@@ -392,7 +392,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
throw (uno::RuntimeException)
throw (uno::RuntimeException)
{
{
return ServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_MACAVF_PLAYER_SERVICENAME ) )
;
return ServiceName
== AVMEDIA_MACAVF_PLAYER_SERVICENAME
;
}
}
...
...
avmedia/source/macavf/window.mm
Dosyayı görüntüle @
643b7000
...
@@ -282,7 +282,7 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis
...
@@ -282,7 +282,7 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis
sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName )
sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName )
throw (uno::RuntimeException)
throw (uno::RuntimeException)
{
{
return ServiceName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_MACAVF_WINDOW_SERVICENAME ) )
;
return ServiceName
== AVMEDIA_MACAVF_WINDOW_SERVICENAME
;
}
}
...
...
compilerplugins/clang/stringconstant.cxx
Dosyayı görüntüle @
643b7000
...
@@ -821,6 +821,20 @@ bool StringConstant::isStringConstant(
...
@@ -821,6 +821,20 @@ bool StringConstant::isStringConstant(
assert
(
embeddedNuls
!=
nullptr
);
assert
(
embeddedNuls
!=
nullptr
);
assert
(
terminatingNul
!=
nullptr
);
assert
(
terminatingNul
!=
nullptr
);
QualType
t
=
expr
->
getType
();
QualType
t
=
expr
->
getType
();
// Look inside RTL_CONSTASCII_STRINGPARAM:
if
(
loplugin
::
TypeCheck
(
t
).
Pointer
().
Const
().
Char
())
{
auto
e2
=
dyn_cast
<
UnaryOperator
>
(
expr
);
if
(
e2
==
nullptr
||
e2
->
getOpcode
()
!=
UO_AddrOf
)
{
return
false
;
}
auto
e3
=
dyn_cast
<
ArraySubscriptExpr
>
(
e2
->
getSubExpr
()
->
IgnoreParenImpCasts
());
if
(
e3
==
nullptr
||
!
isZero
(
e3
->
getIdx
()
->
IgnoreParenImpCasts
()))
{
return
false
;
}
expr
=
e3
->
getBase
()
->
IgnoreParenImpCasts
();
t
=
expr
->
getType
();
}
if
(
!
(
t
->
isConstantArrayType
()
&&
t
.
isConstQualified
()
if
(
!
(
t
->
isConstantArrayType
()
&&
t
.
isConstQualified
()
&&
(
loplugin
::
TypeCheck
(
t
->
getAsArrayTypeUnsafe
()
->
getElementType
())
&&
(
loplugin
::
TypeCheck
(
t
->
getAsArrayTypeUnsafe
()
->
getElementType
())
.
Char
())))
.
Char
())))
...
...
compilerplugins/clang/typecheck.cxx
Dosyayı görüntüle @
643b7000
...
@@ -39,6 +39,16 @@ TypeCheck TypeCheck::LvalueReference() const {
...
@@ -39,6 +39,16 @@ TypeCheck TypeCheck::LvalueReference() const {
return
TypeCheck
();
return
TypeCheck
();
}
}
TypeCheck
TypeCheck
::
Pointer
()
const
{
if
(
!
type_
.
isNull
())
{
auto
const
t
=
type_
->
getAs
<
clang
::
PointerType
>
();
if
(
t
!=
nullptr
)
{
return
TypeCheck
(
t
->
getPointeeType
());
}
}
return
TypeCheck
();
}
TypeCheck
TypeCheck
::
NotSubstTemplateTypeParmType
()
const
{
TypeCheck
TypeCheck
::
NotSubstTemplateTypeParmType
()
const
{
return
return
(
!
type_
.
isNull
()
(
!
type_
.
isNull
()
...
...
compilerplugins/clang/typecheck.hxx
Dosyayı görüntüle @
643b7000
...
@@ -31,6 +31,8 @@ public:
...
@@ -31,6 +31,8 @@ public:
TerminalCheck
Char
()
const
;
TerminalCheck
Char
()
const
;
TypeCheck
Pointer
()
const
;
TypeCheck
LvalueReference
()
const
;
TypeCheck
LvalueReference
()
const
;
template
<
std
::
size_t
N
>
inline
NamespaceCheck
Class
(
char
const
(
&
id
)[
N
])
template
<
std
::
size_t
N
>
inline
NamespaceCheck
Class
(
char
const
(
&
id
)[
N
])
...
...
framework/inc/protocols.h
Dosyayı görüntüle @
643b7000
...
@@ -86,34 +86,34 @@ class ProtocolCheck
...
@@ -86,34 +86,34 @@ class ProtocolCheck
switch
(
eRequired
)
switch
(
eRequired
)
{
{
case
E_PRIVATE
:
case
E_PRIVATE
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_PRIVATE
);
break
;
break
;
case
E_PRIVATE_OBJECT
:
case
E_PRIVATE_OBJECT
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_OBJECT
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_PRIVATE_OBJECT
);
break
;
break
;
case
E_PRIVATE_STREAM
:
case
E_PRIVATE_STREAM
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_STREAM
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_PRIVATE_STREAM
);
break
;
break
;
case
E_PRIVATE_FACTORY
:
case
E_PRIVATE_FACTORY
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_FACTORY
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_PRIVATE_FACTORY
);
break
;
break
;
case
E_SLOT
:
case
E_SLOT
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_SLOT
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_SLOT
);
break
;
break
;
case
E_UNO
:
case
E_UNO
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_UNO
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_UNO
);
break
;
break
;
case
E_MACRO
:
case
E_MACRO
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_MACRO
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_MACRO
);
break
;
break
;
case
E_SERVICE
:
case
E_SERVICE
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_SERVICE
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_SERVICE
);
break
;
break
;
case
E_MAILTO
:
case
E_MAILTO
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_MAILTO
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_MAILTO
);
break
;
break
;
case
E_NEWS
:
case
E_NEWS
:
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_NEWS
)
);
bRet
=
sURL
.
startsWith
(
SPECIALPROTOCOL_NEWS
);
break
;
break
;
default:
default:
bRet
=
sal_False
;
bRet
=
sal_False
;
...
...
sal/qa/rtl/oustring/rtl_OUString2.cxx
Dosyayı görüntüle @
643b7000
...
@@ -925,32 +925,16 @@ public:
...
@@ -925,32 +925,16 @@ public:
};
};
void
indexOfAscii
::
test
()
{
void
indexOfAscii
::
test
()
{
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
-
1
),
rtl
::
OUString
().
indexOf
(
""
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
-
1
),
rtl
::
OUString
().
lastIndexOf
(
""
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
rtl
::
OUString
(
"foo"
).
indexOf
(
"foo"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
rtl
::
OUString
(
"foo"
).
lastIndexOf
(
"foo"
));
CPPUNIT_ASSERT_EQUAL
(
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
-
1
),
sal_Int32
(
2
),
rtl
::
OUString
(
"fofoobar"
).
indexOf
(
"foo"
));
rtl
::
OUString
().
indexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
""
)));
CPPUNIT_ASSERT_EQUAL
(
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
-
1
),
sal_Int32
(
3
),
rtl
::
OUString
(
"foofoofob"
).
lastIndexOf
(
"foo"
));
rtl
::
OUString
().
lastIndexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
""
)));
CPPUNIT_ASSERT_EQUAL
(
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
sal_Int32
(
3
),
rtl
::
OUString
(
"foofoobar"
).
indexOf
(
"foo"
,
1
));
rtl
::
OUString
(
"foo"
).
indexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"foo"
)));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
rtl
::
OUString
(
"foo"
).
lastIndexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"foo"
)));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
2
),
rtl
::
OUString
(
"fofoobar"
).
indexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"foo"
)));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
3
),
rtl
::
OUString
(
"foofoofob"
).
lastIndexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"foo"
)));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
3
),
rtl
::
OUString
(
"foofoobar"
).
indexOfAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"foo"
),
1
));
}
}
class
endsWith
:
public
CppUnit
::
TestFixture
{
class
endsWith
:
public
CppUnit
::
TestFixture
{
...
@@ -963,24 +947,11 @@ public:
...
@@ -963,24 +947,11 @@ public:
};
};
void
endsWith
::
test
()
{
void
endsWith
::
test
()
{
CPPUNIT_ASSERT_EQUAL
(
CPPUNIT_ASSERT_EQUAL
(
true
,
rtl
::
OUString
().
endsWith
(
""
));
true
,
CPPUNIT_ASSERT_EQUAL
(
false
,
rtl
::
OUString
().
endsWith
(
"foo"
));
rtl
::
OUString
().
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
""
)));
CPPUNIT_ASSERT_EQUAL
(
true
,
rtl
::
OUString
(
"bar"
).
endsWith
(
"bar"
));
CPPUNIT_ASSERT_EQUAL
(
CPPUNIT_ASSERT_EQUAL
(
true
,
rtl
::
OUString
(
"foobar"
).
endsWith
(
"bar"
));
false
,
CPPUNIT_ASSERT_EQUAL
(
false
,
rtl
::
OUString
(
"FOOBAR"
).
endsWith
(
"bar"
));
rtl
::
OUString
().
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"foo"
)));
CPPUNIT_ASSERT_EQUAL
(
true
,
rtl
::
OUString
(
"bar"
).
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"bar"
)));
CPPUNIT_ASSERT_EQUAL
(
true
,
rtl
::
OUString
(
"foobar"
).
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"bar"
)));
CPPUNIT_ASSERT_EQUAL
(
false
,
rtl
::
OUString
(
"FOOBAR"
).
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"bar"
)));
}
}
class
isEmpty
:
public
CppUnit
::
TestFixture
{
class
isEmpty
:
public
CppUnit
::
TestFixture
{
...
...
vcl/osx/printaccessoryview.mm
Dosyayı görüntüle @
643b7000
...
@@ -259,7 +259,7 @@ public:
...
@@ -259,7 +259,7 @@ public:
if( pVal )
if( pVal )
{
{
// ugly
// ugly
if( name_it->second
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PrintContent"))
)
if( name_it->second
== "PrintContent"
)
pVal->Value <<= i_bValue ? sal_Int32(2) : sal_Int32(0);
pVal->Value <<= i_bValue ? sal_Int32(2) : sal_Int32(0);
else
else
pVal->Value <<= i_bValue;
pVal->Value <<= i_bValue;
...
@@ -301,7 +301,7 @@ public:
...
@@ -301,7 +301,7 @@ public:
-1;
-1;
std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( nTag );
std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( nTag );
if( name_it != maTagToPropertyName.end() &&
! name_it->second.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PrintContent"))
)
if( name_it != maTagToPropertyName.end() &&
name_it->second != "PrintContent"
)
{
{
vcl::PrinterController * mpController = [mpAccessoryController printerController];
vcl::PrinterController * mpController = [mpAccessoryController printerController];
BOOL bEnabled = mpController->isUIOptionEnabled( name_it->second ) ? YES : NO;
BOOL bEnabled = mpController->isUIOptionEnabled( name_it->second ) ? YES : NO;
...
@@ -889,7 +889,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -889,7 +889,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
aFieldRect.origin.y = rCurY - aFieldRect.size.height;
aFieldRect.origin.y = rCurY - aFieldRect.size.height;
[pFieldView setFrame: aFieldRect];
[pFieldView setFrame: aFieldRect];
if( rCtrlType
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Range" ) )
)
if( rCtrlType
== "Range"
)
{
{
// add a stepper control
// add a stepper control
NSRect aStepFrame = { { aFieldRect.origin.x + aFieldRect.size.width + 5,
NSRect aStepFrame = { { aFieldRect.origin.x + aFieldRect.size.width + 5,
...
@@ -1011,29 +1011,29 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1011,29 +1011,29 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
for( int n = 0; n < aOptProp.getLength(); n++ )
for( int n = 0; n < aOptProp.getLength(); n++ )
{
{
const beans::PropertyValue& rEntry( aOptProp[ n ] );
const beans::PropertyValue& rEntry( aOptProp[ n ] );
if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ControlType"))
)
if( rEntry.Name
== "ControlType"
)
{
{
rEntry.Value >>= aCtrlType;
rEntry.Value >>= aCtrlType;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Choices"))
)
else if( rEntry.Name
== "Choices"
)
{
{
rEntry.Value >>= aChoices;
rEntry.Value >>= aChoices;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ChoicesDisabled"))
)
else if( rEntry.Name
== "ChoicesDisabled"
)
{
{
rEntry.Value >>= aChoicesDisabled;
rEntry.Value >>= aChoicesDisabled;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Property"))
)
else if( rEntry.Name
== "Property"
)
{
{
PropertyValue aVal;
PropertyValue aVal;
rEntry.Value >>= aVal;
rEntry.Value >>= aVal;
aPropertyName = aVal.Name;
aPropertyName = aVal.Name;
if( aPropertyName
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PrintContent"))
)
if( aPropertyName
== "PrintContent"
)
aVal.Value >>= aSelectionChecked;
aVal.Value >>= aSelectionChecked;
}
}
}
}
if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Radio"))
&&
if( aCtrlType
== "Radio"
&&
aPropertyName
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PrintContent"))
&&
aPropertyName
== "PrintContent"
&&
aChoices.getLength() > 2 )
aChoices.getLength() > 2 )
{
{
bAddSelectionCheckBox = true;
bAddSelectionCheckBox = true;
...
@@ -1062,74 +1062,74 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1062,74 +1062,74 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
for( int n = 0; n < aOptProp.getLength(); n++ )
for( int n = 0; n < aOptProp.getLength(); n++ )
{
{
const beans::PropertyValue& rEntry( aOptProp[ n ] );
const beans::PropertyValue& rEntry( aOptProp[ n ] );
if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Text"))
)
if( rEntry.Name
== "Text"
)
{
{
rEntry.Value >>= aText;
rEntry.Value >>= aText;
aText = filterAccelerator( aText );
aText = filterAccelerator( aText );
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ControlType"))
)
else if( rEntry.Name
== "ControlType"
)
{
{
rEntry.Value >>= aCtrlType;
rEntry.Value >>= aCtrlType;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Choices"))
)
else if( rEntry.Name
== "Choices"
)
{
{
rEntry.Value >>= aChoices;
rEntry.Value >>= aChoices;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Property"))
)
else if( rEntry.Name
== "Property"
)
{
{
PropertyValue aVal;
PropertyValue aVal;
rEntry.Value >>= aVal;
rEntry.Value >>= aVal;
aPropertyName = aVal.Name;
aPropertyName = aVal.Name;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Enabled"))
)
else if( rEntry.Name
== "Enabled"
)
{
{
sal_Bool bValue = true;
sal_Bool bValue = true;
rEntry.Value >>= bValue;
rEntry.Value >>= bValue;
bEnabled = bValue;
bEnabled = bValue;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MinValue"))
)
else if( rEntry.Name
== "MinValue"
)
{
{
rEntry.Value >>= nMinValue;
rEntry.Value >>= nMinValue;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MaxValue"))
)
else if( rEntry.Name
== "MaxValue"
)
{
{
rEntry.Value >>= nMaxValue;
rEntry.Value >>= nMaxValue;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AttachToDependency"))
)
else if( rEntry.Name
== "AttachToDependency"
)
{
{
nAttachOffset = 20;
nAttachOffset = 20;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InternalUIOnly"))
)
else if( rEntry.Name
== "InternalUIOnly"
)
{
{
sal_Bool bValue = false;
sal_Bool bValue = false;
rEntry.Value >>= bValue;
rEntry.Value >>= bValue;
bIgnore = bValue;
bIgnore = bValue;
}
}
else if( rEntry.Name
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GroupingHint"))
)
else if( rEntry.Name
== "GroupingHint"
)
{
{
rEntry.Value >>= aGroupHint;
rEntry.Value >>= aGroupHint;
}
}
}
}
if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Group"))
||
if( aCtrlType
== "Group"
||
aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Subgroup"))
||
aCtrlType
== "Subgroup"
||
aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Radio"))
||
aCtrlType
== "Radio"
||
aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("List"))
||
aCtrlType
== "List"
||
aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Edit"))
||
aCtrlType
== "Edit"
||
aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Range"))
||
aCtrlType
== "Range"
||
aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bool"))
)
aCtrlType
== "Bool"
)
{
{
bool bIgnoreSubgroup = false;
bool bIgnoreSubgroup = false;
// with `setAccessoryView' method only one accessory view can be set
// with `setAccessoryView' method only one accessory view can be set
// so create this single accessory view as tabbed for grouping
// so create this single accessory view as tabbed for grouping
if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Group"))
if( aCtrlType
== "Group"
|| ! pCurParent
|| ! pCurParent
|| ( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Subgroup")) && nCurY < -250 && ! bIgnore )
|| ( aCtrlType
== "Subgroup" && nCurY < -250 && ! bIgnore )
)
)
{
{
rtl::OUString aGroupTitle( aText );
rtl::OUString aGroupTitle( aText );
if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Subgroup"))
)
if( aCtrlType
== "Subgroup"
)
aGroupTitle = pControllerProperties->getMoreString();
aGroupTitle = pControllerProperties->getMoreString();
// set size of current parent
// set size of current parent
...
@@ -1163,7 +1163,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1163,7 +1163,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
}
}
}
}
if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Subgroup"))
&& pCurParent )
if( aCtrlType
== "Subgroup"
&& pCurParent )
{
{
bIgnoreSubgroup = bIgnore;
bIgnoreSubgroup = bIgnore;
if( bIgnore )
if( bIgnore )
...
@@ -1175,7 +1175,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1175,7 +1175,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
{
{
continue;
continue;
}
}
else if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bool"))
&& pCurParent )
else if( aCtrlType
== "Bool"
&& pCurParent )
{
{
sal_Bool bVal = false;
sal_Bool bVal = false;
PropertyValue* pVal = pController->getValue( aPropertyName );
PropertyValue* pVal = pController->getValue( aPropertyName );
...
@@ -1185,7 +1185,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1185,7 +1185,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
aText, true, aPropertyName, bVal,
aText, true, aPropertyName, bVal,
aRightColumn, pControllerProperties, pCtrlTarget );
aRightColumn, pControllerProperties, pCtrlTarget );
}
}
else if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Radio"))
&& pCurParent )
else if( aCtrlType
== "Radio"
&& pCurParent )
{
{
// get currently selected value
// get currently selected value
sal_Int32 nSelectVal = 0;
sal_Int32 nSelectVal = 0;
...
@@ -1198,7 +1198,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1198,7 +1198,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
aLeftColumn, aRightColumn,
aLeftColumn, aRightColumn,
pControllerProperties, pCtrlTarget );
pControllerProperties, pCtrlTarget );
}
}
else if( aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("List"))
&& pCurParent )
else if( aCtrlType
== "List"
&& pCurParent )
{
{
PropertyValue* pVal = pController->getValue( aPropertyName );
PropertyValue* pVal = pController->getValue( aPropertyName );
sal_Int32 aSelectVal = 0;
sal_Int32 aSelectVal = 0;
...
@@ -1210,8 +1210,8 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1210,8 +1210,8 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
aLeftColumn, aRightColumn,
aLeftColumn, aRightColumn,
pControllerProperties, pCtrlTarget );
pControllerProperties, pCtrlTarget );
}
}
else if( (aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Edit"))
else if( (aCtrlType
== "Edit"
|| aCtrlType
.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Range"))
) && pCurParent )
|| aCtrlType
== "Range"
) && pCurParent )
{
{
// current value
// current value
PropertyValue* pVal = pController->getValue( aPropertyName );
PropertyValue* pVal = pController->getValue( aPropertyName );
...
...
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