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
7f8c4b84
Kaydet (Commit)
7f8c4b84
authored
Ara 03, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use comphelper::containerToSequence()
Change-Id: I18d6ef04ff00f971a4c54ba259733c07501c6c1a
üst
d40d756f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
60 deletions
+56
-60
characterattributeshelper.hxx
...ty/inc/accessibility/helper/characterattributeshelper.hxx
+1
-1
characterattributeshelper.cxx
accessibility/source/helper/characterattributeshelper.cxx
+30
-35
textlayout.cxx
canvas/source/vcl/textlayout.cxx
+3
-3
InternalDataProvider.cxx
chart2/source/tools/InternalDataProvider.cxx
+21
-19
AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
+1
-2
No files found.
accessibility/inc/accessibility/helper/characterattributeshelper.hxx
Dosyayı görüntüle @
7f8c4b84
...
...
@@ -43,7 +43,7 @@ public:
CharacterAttributesHelper
(
const
vcl
::
Font
&
rFont
,
sal_Int32
nBackColor
,
sal_Int32
nColor
);
~
CharacterAttributesHelper
();
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
GetCharacterAttributes
();
std
::
vector
<
css
::
beans
::
PropertyValue
>
GetCharacterAttributes
();
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
GetCharacterAttributes
(
const
css
::
uno
::
Sequence
<
OUString
>&
aRequestedAttributes
);
};
...
...
accessibility/source/helper/characterattributeshelper.cxx
Dosyayı görüntüle @
7f8c4b84
...
...
@@ -19,6 +19,7 @@
#include <accessibility/helper/characterattributeshelper.hxx>
#include <tools/gen.hxx>
#include <comphelper/sequence.hxx>
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
beans
;
...
...
@@ -48,57 +49,51 @@ CharacterAttributesHelper::~CharacterAttributesHelper()
}
Sequence
<
PropertyValue
>
CharacterAttributesHelper
::
GetCharacterAttributes
()
std
::
vector
<
PropertyValue
>
CharacterAttributesHelper
::
GetCharacterAttributes
()
{
Sequence
<
PropertyValue
>
aValues
(
m_aAttributeMap
.
size
()
);
PropertyValue
*
pValues
=
aValues
.
getArray
();
std
::
vector
<
PropertyValue
>
aValues
(
m_aAttributeMap
.
size
()
);
for
(
AttributeMap
::
iterator
aIt
=
m_aAttributeMap
.
begin
();
aIt
!=
m_aAttributeMap
.
end
();
++
aIt
,
++
pValues
)
int
i
=
0
;
for
(
AttributeMap
::
iterator
aIt
=
m_aAttributeMap
.
begin
();
aIt
!=
m_aAttributeMap
.
end
();
++
aIt
,
++
i
)
{
pValues
->
Name
=
aIt
->
first
;
pValues
->
Handle
=
(
sal_Int32
)
-
1
;
pValues
->
Value
=
aIt
->
second
;
pValues
->
State
=
PropertyState_DIRECT_VALUE
;
aValues
[
i
].
Name
=
aIt
->
first
;
aValues
[
i
].
Handle
=
(
sal_Int32
)
-
1
;
aValues
[
i
].
Value
=
aIt
->
second
;
aValues
[
i
].
State
=
PropertyState_DIRECT_VALUE
;
}
return
aValues
;
}
Sequence
<
PropertyValue
>
CharacterAttributesHelper
::
GetCharacterAttributes
(
const
Sequence
<
OUString
>&
aRequestedAttributes
)
Sequence
<
PropertyValue
>
CharacterAttributesHelper
::
GetCharacterAttributes
(
const
css
::
uno
::
Sequence
<
OUString
>&
aRequestedAttributes
)
{
Sequence
<
PropertyValue
>
aValues
;
if
(
aRequestedAttributes
.
getLength
()
==
0
)
return
comphelper
::
containerToSequence
(
GetCharacterAttributes
());
std
::
vector
<
PropertyValue
>
aValues
;
sal_Int32
nLength
=
aRequestedAttributes
.
getLength
();
if
(
nLength
!=
0
)
AttributeMap
aAttributeMap
;
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
++
i
)
{
const
OUString
*
pNames
=
aRequestedAttributes
.
getConstArray
();
AttributeMap
aAttributeMap
;
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
++
i
)
{
AttributeMap
::
iterator
aFound
=
m_aAttributeMap
.
find
(
pNames
[
i
]
);
if
(
aFound
!=
m_aAttributeMap
.
end
()
)
aAttributeMap
.
insert
(
*
aFound
);
}
aValues
.
realloc
(
aAttributeMap
.
size
()
);
PropertyValue
*
pValues
=
aValues
.
getArray
();
for
(
AttributeMap
::
iterator
aIt
=
aAttributeMap
.
begin
();
aIt
!=
aAttributeMap
.
end
();
++
aIt
,
++
pValues
)
{
pValues
->
Name
=
aIt
->
first
;
pValues
->
Handle
=
(
sal_Int32
)
-
1
;
pValues
->
Value
=
aIt
->
second
;
pValues
->
State
=
PropertyState_DIRECT_VALUE
;
}
AttributeMap
::
iterator
aFound
=
m_aAttributeMap
.
find
(
aRequestedAttributes
[
i
]
);
if
(
aFound
!=
m_aAttributeMap
.
end
()
)
aAttributeMap
.
insert
(
*
aFound
);
}
else
aValues
.
reserve
(
aAttributeMap
.
size
()
);
int
i
=
0
;
for
(
AttributeMap
::
iterator
aIt
=
aAttributeMap
.
begin
();
aIt
!=
aAttributeMap
.
end
();
++
aIt
,
++
i
)
{
aValues
=
GetCharacterAttributes
();
aValues
[
i
].
Name
=
aIt
->
first
;
aValues
[
i
].
Handle
=
(
sal_Int32
)
-
1
;
aValues
[
i
].
Value
=
aIt
->
second
;
aValues
[
i
].
State
=
PropertyState_DIRECT_VALUE
;
}
return
aValues
;
return
comphelper
::
containerToSequence
(
aValues
);
}
...
...
canvas/source/vcl/textlayout.cxx
Dosyayı görüntüle @
7f8c4b84
...
...
@@ -122,7 +122,7 @@ namespace vclcanvas
::
std
::
unique_ptr
<
long
[]
>
aOffsets
(
new
long
[
maLogicalAdvancements
.
getLength
()]);
setupTextOffsets
(
aOffsets
.
get
(),
maLogicalAdvancements
,
aViewState
,
aRenderState
);
uno
::
Sequence
<
uno
::
Reference
<
rendering
::
XPolyPolygon2D
>
>
aOutlineSequence
;
std
::
vector
<
uno
::
Reference
<
rendering
::
XPolyPolygon2D
>
>
aOutlineSequence
;
::
basegfx
::
B2DPolyPolygonVector
aOutlines
;
if
(
pVDev
->
GetTextOutlines
(
aOutlines
,
...
...
@@ -134,7 +134,7 @@ namespace vclcanvas
0
,
aOffsets
.
get
()))
{
aOutlineSequence
.
re
alloc
(
aOutlines
.
size
());
aOutlineSequence
.
re
serve
(
aOutlines
.
size
());
sal_Int32
nIndex
(
0
);
for
(
::
basegfx
::
B2DPolyPolygonVector
::
const_iterator
iOutline
(
aOutlines
.
begin
()),
...
...
@@ -148,7 +148,7 @@ namespace vclcanvas
}
}
return
aOutlineSequence
;
return
comphelper
::
containerToSequence
(
aOutlineSequence
)
;
}
uno
::
Sequence
<
geometry
::
RealRectangle2D
>
SAL_CALL
TextLayout
::
queryInkMeasures
(
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
...
chart2/source/tools/InternalDataProvider.cxx
Dosyayı görüntüle @
7f8c4b84
...
...
@@ -72,21 +72,23 @@ static const char lcl_aCompleteRange[] = "all";
typedef
::
std
::
multimap
<
OUString
,
uno
::
WeakReference
<
chart2
::
data
::
XDataSequence
>
>
lcl_tSequenceMap
;
Sequence
<
OUString
>
lcl_AnyToStringSequence
(
const
Sequence
<
uno
::
Any
>&
aAnySeq
)
std
::
vector
<
OUString
>
lcl_AnyToStringSequence
(
const
std
::
vector
<
uno
::
Any
>&
aAnySeq
)
{
Sequence
<
OUString
>
aResult
;
aResult
.
realloc
(
aAnySeq
.
getLength
()
);
transform
(
aAnySeq
.
getConstArray
(),
aAnySeq
.
getConstArray
()
+
aAnySeq
.
getLength
(),
aResult
.
getArray
(),
CommonFunctors
::
AnyToString
()
);
std
::
vector
<
OUString
>
aResult
;
aResult
.
resize
(
aAnySeq
.
size
()
);
int
i
=
0
;
for
(
const
uno
::
Any
&
aAny
:
aAnySeq
)
aResult
[
i
++
]
=
CommonFunctors
::
AnyToString
()(
aAny
);
return
aResult
;
}
Sequence
<
uno
::
Any
>
lcl_StringToAnySequence
(
const
Sequence
<
OUString
>&
aStringSeq
)
std
::
vector
<
uno
::
Any
>
lcl_StringToAnyVector
(
const
css
::
uno
::
Sequence
<
OUString
>&
aStringSeq
)
{
Sequence
<
uno
::
Any
>
aResult
;
aResult
.
realloc
(
aStringSeq
.
getLength
()
);
transform
(
aStringSeq
.
getConstArray
(),
aStringSeq
.
getConstArray
()
+
aStringSeq
.
getLength
(),
aResult
.
getArray
(),
CommonFunctors
::
makeAny
<
OUString
>
()
);
std
::
vector
<
uno
::
Any
>
aResult
;
aResult
.
resize
(
aStringSeq
.
getLength
()
);
int
i
=
0
;
for
(
const
OUString
&
aStr
:
aStringSeq
)
aResult
[
i
++
]
=
CommonFunctors
::
makeAny
<
OUString
>
()(
aStr
);
return
aResult
;
}
...
...
@@ -151,9 +153,9 @@ struct lcl_internalizeSeries : public ::std::unary_function< Reference< chart2::
if
(
xLabel
.
is
()
)
{
if
(
m_bDataInColumns
)
m_rInternalData
.
setComplexColumnLabel
(
nNewIndex
,
ContainerHelper
::
SequenceToVector
(
lcl_StringToAnySequence
(
xLabel
->
getTextualData
()
)
)
);
m_rInternalData
.
setComplexColumnLabel
(
nNewIndex
,
lcl_StringToAnyVector
(
xLabel
->
getTextualData
(
)
)
);
else
m_rInternalData
.
setComplexRowLabel
(
nNewIndex
,
ContainerHelper
::
SequenceToVector
(
lcl_StringToAnySequence
(
xLabel
->
getTextualData
()
)
)
);
m_rInternalData
.
setComplexRowLabel
(
nNewIndex
,
lcl_StringToAnyVector
(
xLabel
->
getTextualData
(
)
)
);
if
(
m_bConnectToModel
)
{
Reference
<
chart2
::
data
::
XDataSequence
>
xNewLabel
(
...
...
@@ -1324,15 +1326,15 @@ vector< vector< Type > > lcl_convertSequenceSequenceToVectorVector( const Sequen
return
aRet
;
}
Sequence
<
Sequence
<
OUString
>
>
lcl_convertComplexAnyVectorToStringSequence
(
const
vector
<
vector
<
uno
::
Any
>
>&
rIn
)
std
::
vector
<
Sequence
<
OUString
>
>
lcl_convertComplexAnyVectorToStringSequence
(
const
vector
<
vector
<
uno
::
Any
>
>&
rIn
)
{
Sequence
<
Sequence
<
OUString
>
>
aRet
;
std
::
vector
<
Sequence
<
OUString
>
>
aRet
;
sal_Int32
nOuterCount
=
rIn
.
size
();
if
(
nOuterCount
)
{
aRet
.
re
alloc
(
nOuterCount
);
aRet
.
re
size
(
nOuterCount
);
for
(
sal_Int32
nN
=
0
;
nN
<
nOuterCount
;
nN
++
)
aRet
[
nN
]
=
lcl_AnyToStringSequence
(
comphelper
::
containerToSequence
(
rIn
[
nN
]
)
);
aRet
[
nN
]
=
comphelper
::
containerToSequence
(
lcl_AnyToStringSequence
(
rIn
[
nN
]
)
);
}
return
aRet
;
}
...
...
@@ -1342,7 +1344,7 @@ vector< vector< uno::Any > > lcl_convertComplexStringSequenceToAnyVector( const
vector
<
vector
<
uno
::
Any
>
>
aRet
;
sal_Int32
nOuterCount
=
rIn
.
getLength
();
for
(
sal_Int32
nN
=
0
;
nN
<
nOuterCount
;
nN
++
)
aRet
.
push_back
(
ContainerHelper
::
SequenceToVector
(
lcl_StringToAnySequence
(
rIn
[
nN
]
)
)
);
aRet
.
push_back
(
lcl_StringToAnyVector
(
rIn
[
nN
]
)
);
return
aRet
;
}
...
...
@@ -1440,7 +1442,7 @@ void SAL_CALL InternalDataProvider::setAnyColumnDescriptions( const Sequence< Se
// ____ XComplexDescriptionAccess ____
Sequence
<
Sequence
<
OUString
>
>
SAL_CALL
InternalDataProvider
::
getComplexRowDescriptions
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
lcl_convertComplexAnyVectorToStringSequence
(
m_aInternalData
.
getComplexRowLabels
()
);
return
comphelper
::
containerToSequence
(
lcl_convertComplexAnyVectorToStringSequence
(
m_aInternalData
.
getComplexRowLabels
()
)
);
}
void
SAL_CALL
InternalDataProvider
::
setComplexRowDescriptions
(
const
Sequence
<
Sequence
<
OUString
>
>&
aRowDescriptions
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
...
...
@@ -1448,7 +1450,7 @@ void SAL_CALL InternalDataProvider::setComplexRowDescriptions( const Sequence< S
}
Sequence
<
Sequence
<
OUString
>
>
SAL_CALL
InternalDataProvider
::
getComplexColumnDescriptions
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
lcl_convertComplexAnyVectorToStringSequence
(
m_aInternalData
.
getComplexColumnLabels
()
);
return
comphelper
::
containerToSequence
(
lcl_convertComplexAnyVectorToStringSequence
(
m_aInternalData
.
getComplexColumnLabels
()
)
);
}
void
SAL_CALL
InternalDataProvider
::
setComplexColumnDescriptions
(
const
Sequence
<
Sequence
<
OUString
>
>&
aColumnDescriptions
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
...
...
dbaccess/source/ui/app/AppDetailPageHelper.cxx
Dosyayı görüntüle @
7f8c4b84
...
...
@@ -429,8 +429,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _e
pEntry
=
pList
->
NextSelected
(
pEntry
);
}
_out_rSelectedObjects
.
realloc
(
aSelected
.
size
()
);
::
std
::
copy
(
aSelected
.
begin
(),
aSelected
.
end
(),
_out_rSelectedObjects
.
getArray
()
);
_out_rSelectedObjects
=
comphelper
::
containerToSequence
(
aSelected
);
}
void
OAppDetailPageHelper
::
selectElements
(
const
Sequence
<
OUString
>&
_aNames
)
...
...
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