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
942f1ed9
Kaydet (Commit)
942f1ed9
authored
Agu 06, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX import: handle <w:cnfStyle> cell property
Change-Id: I849daf0ddee370775fda73e04739e69acbc64246
üst
5e2081fb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
1 deletion
+64
-1
docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
+3
-0
DomainMapper.cxx
writerfilter/source/dmapper/DomainMapper.cxx
+12
-0
PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.cxx
+1
-0
PropertyIds.hxx
writerfilter/source/dmapper/PropertyIds.hxx
+1
-0
PropertyMap.cxx
writerfilter/source/dmapper/PropertyMap.cxx
+46
-1
PropertyMap.hxx
writerfilter/source/dmapper/PropertyMap.hxx
+1
-0
No files found.
sw/source/filter/ww8/docxattributeoutput.cxx
Dosyayı görüntüle @
942f1ed9
...
@@ -3290,6 +3290,9 @@ void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_
...
@@ -3290,6 +3290,9 @@ void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_
for( aGrabBagElement = aGrabBag.begin(); aGrabBagElement != aGrabBag.end(); ++aGrabBagElement )
for( aGrabBagElement = aGrabBag.begin(); aGrabBagElement != aGrabBag.end(); ++aGrabBagElement )
{
{
if (!aGrabBagElement->second.has<OUString>())
continue;
OString sValue = OUStringToOString( aGrabBagElement->second.get<OUString>(), RTL_TEXTENCODING_UTF8 );
OString sValue = OUStringToOString( aGrabBagElement->second.get<OUString>(), RTL_TEXTENCODING_UTF8 );
if( aGrabBagElement->first == "themeFill")
if( aGrabBagElement->first == "themeFill")
AddToAttrList( aAttrList, FSNS( XML_w, XML_themeFill ), sValue.getStr() );
AddToAttrList( aAttrList, FSNS( XML_w, XML_themeFill ), sValue.getStr() );
...
...
writerfilter/source/dmapper/DomainMapper.cxx
Dosyayı görüntüle @
942f1ed9
...
@@ -2504,6 +2504,18 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
...
@@ -2504,6 +2504,18 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
}
}
}
}
break
;
break
;
case
NS_ooxml
:
:
LN_CT_TcPrBase_cnfStyle
:
{
m_pImpl
->
enableInteropGrabBag
(
"cnfStyle"
);
resourcemodel
::
resolveSprmProps
(
*
this
,
rSprm
);
TablePropertyMapPtr
pPropMap
(
new
TablePropertyMap
());
pPropMap
->
Insert
(
PROP_CELL_CNF_STYLE
,
uno
::
makeAny
(
uno
::
makeAny
(
m_pImpl
->
m_aInteropGrabBag
.
getAsConstList
())),
true
,
CELL_GRAB_BAG
);
m_pImpl
->
getTableManager
().
cellProps
(
pPropMap
);
m_pImpl
->
disableInteropGrabBag
();
}
break
;
case
NS_ooxml
:
:
LN_CT_PPrBase_cnfStyle
:
case
NS_ooxml
:
:
LN_CT_PPrBase_cnfStyle
:
{
{
m_pImpl
->
enableInteropGrabBag
(
"cnfStyle"
);
m_pImpl
->
enableInteropGrabBag
(
"cnfStyle"
);
...
...
writerfilter/source/dmapper/PropertyIds.cxx
Dosyayı görüntüle @
942f1ed9
...
@@ -397,6 +397,7 @@ OUString PropertyNameSupplier::GetName( PropertyIds eId ) const
...
@@ -397,6 +397,7 @@ OUString PropertyNameSupplier::GetName( PropertyIds eId ) const
case
PROP_PARA_SDT_END_BEFORE
:
sName
=
"ParaSdtEndBefore"
;
break
;
case
PROP_PARA_SDT_END_BEFORE
:
sName
=
"ParaSdtEndBefore"
;
break
;
case
META_PROP_TABLE_LOOK
:
sName
=
"TableStyleLook"
;
break
;
case
META_PROP_TABLE_LOOK
:
sName
=
"TableStyleLook"
;
break
;
case
PROP_PARA_CNF_STYLE
:
sName
=
"ParaCnfStyle"
;
break
;
case
PROP_PARA_CNF_STYLE
:
sName
=
"ParaCnfStyle"
;
break
;
case
PROP_CELL_CNF_STYLE
:
sName
=
"CellCnfStyle"
;
break
;
}
}
::
std
::
pair
<
PropertyNameMap_t
::
iterator
,
bool
>
aInsertIt
=
::
std
::
pair
<
PropertyNameMap_t
::
iterator
,
bool
>
aInsertIt
=
m_pImpl
->
aNameMap
.
insert
(
PropertyNameMap_t
::
value_type
(
eId
,
sName
));
m_pImpl
->
aNameMap
.
insert
(
PropertyNameMap_t
::
value_type
(
eId
,
sName
));
...
...
writerfilter/source/dmapper/PropertyIds.hxx
Dosyayı görüntüle @
942f1ed9
...
@@ -369,6 +369,7 @@ enum PropertyIds
...
@@ -369,6 +369,7 @@ enum PropertyIds
,
PROP_PARA_SDT_END_BEFORE
,
PROP_PARA_SDT_END_BEFORE
,
META_PROP_TABLE_LOOK
,
META_PROP_TABLE_LOOK
,
PROP_PARA_CNF_STYLE
,
PROP_PARA_CNF_STYLE
,
PROP_CELL_CNF_STYLE
};
};
struct
PropertyNameSupplier_Impl
;
struct
PropertyNameSupplier_Impl
;
class
PropertyNameSupplier
class
PropertyNameSupplier
...
...
writerfilter/source/dmapper/PropertyMap.cxx
Dosyayı görüntüle @
942f1ed9
...
@@ -66,30 +66,50 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
...
@@ -66,30 +66,50 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
{
{
size_t
nCharGrabBag
=
0
;
size_t
nCharGrabBag
=
0
;
size_t
nParaGrabBag
=
0
;
size_t
nParaGrabBag
=
0
;
size_t
nCellGrabBag
=
0
;
size_t
nCellGrabBagSaved
=
0
;
// How many entries do we save from the returned sequence.
for
(
MapIterator
i
=
m_vMap
.
begin
();
i
!=
m_vMap
.
end
();
++
i
)
for
(
MapIterator
i
=
m_vMap
.
begin
();
i
!=
m_vMap
.
end
();
++
i
)
{
{
if
(
i
->
second
.
getGrabBagType
()
==
CHAR_GRAB_BAG
)
if
(
i
->
second
.
getGrabBagType
()
==
CHAR_GRAB_BAG
)
nCharGrabBag
++
;
nCharGrabBag
++
;
else
if
(
i
->
second
.
getGrabBagType
()
==
PARA_GRAB_BAG
)
else
if
(
i
->
second
.
getGrabBagType
()
==
PARA_GRAB_BAG
)
nParaGrabBag
++
;
nParaGrabBag
++
;
else
if
(
i
->
second
.
getGrabBagType
()
==
CELL_GRAB_BAG
)
{
nCellGrabBag
++
;
nCellGrabBagSaved
++
;
}
else
if
(
i
->
first
==
PROP_CELL_INTEROP_GRAB_BAG
)
{
uno
::
Sequence
<
beans
::
PropertyValue
>
aSeq
;
i
->
second
.
getValue
()
>>=
aSeq
;
nCellGrabBag
+=
aSeq
.
getLength
();
nCellGrabBagSaved
++
;
}
}
}
// In case there are properties to be grab-bagged and we can have a char grab-bag, allocate one slot for it.
// In case there are properties to be grab-bagged and we can have a char grab-bag, allocate one slot for it.
size_t
nCharGrabBagSize
=
0
;
size_t
nCharGrabBagSize
=
0
;
if
(
bCharGrabBag
)
if
(
bCharGrabBag
)
nCharGrabBagSize
=
nCharGrabBag
?
1
:
0
;
nCharGrabBagSize
=
nCharGrabBag
?
1
:
0
;
size_t
nParaGrabBagSize
=
nParaGrabBag
?
1
:
0
;
size_t
nCellGrabBagSize
=
nCellGrabBag
?
1
:
0
;
// If there are any grab bag properties, we need one slot for them.
// If there are any grab bag properties, we need one slot for them.
m_aValues
.
realloc
(
m_vMap
.
size
()
-
nCharGrabBag
+
nCharGrabBagSize
m_aValues
.
realloc
(
m_vMap
.
size
()
-
nCharGrabBag
+
nCharGrabBagSize
-
nParaGrabBag
+
(
nParaGrabBag
?
1
:
0
));
-
nParaGrabBag
+
nParaGrabBagSize
-
nCellGrabBagSaved
+
nCellGrabBagSize
);
::
com
::
sun
::
star
::
beans
::
PropertyValue
*
pValues
=
m_aValues
.
getArray
();
::
com
::
sun
::
star
::
beans
::
PropertyValue
*
pValues
=
m_aValues
.
getArray
();
uno
::
Sequence
<
beans
::
PropertyValue
>
aCharGrabBagValues
(
nCharGrabBag
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aCharGrabBagValues
(
nCharGrabBag
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aParaGrabBagValues
(
nParaGrabBag
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aParaGrabBagValues
(
nParaGrabBag
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aCellGrabBagValues
(
nCellGrabBag
);
beans
::
PropertyValue
*
pCharGrabBagValues
=
aCharGrabBagValues
.
getArray
();
beans
::
PropertyValue
*
pCharGrabBagValues
=
aCharGrabBagValues
.
getArray
();
beans
::
PropertyValue
*
pParaGrabBagValues
=
aParaGrabBagValues
.
getArray
();
beans
::
PropertyValue
*
pParaGrabBagValues
=
aParaGrabBagValues
.
getArray
();
beans
::
PropertyValue
*
pCellGrabBagValues
=
aCellGrabBagValues
.
getArray
();
//style names have to be the first elements within the property sequence
//style names have to be the first elements within the property sequence
//otherwise they will overwrite 'hard' attributes
//otherwise they will overwrite 'hard' attributes
sal_Int32
nValue
=
0
;
sal_Int32
nValue
=
0
;
sal_Int32
nCellGrabBagValue
=
0
;
sal_Int32
nParaGrabBagValue
=
0
;
sal_Int32
nParaGrabBagValue
=
0
;
sal_Int32
nCharGrabBagValue
=
0
;
sal_Int32
nCharGrabBagValue
=
0
;
PropertyNameSupplier
&
rPropNameSupplier
=
PropertyNameSupplier
::
GetPropertyNameSupplier
();
PropertyNameSupplier
&
rPropNameSupplier
=
PropertyNameSupplier
::
GetPropertyNameSupplier
();
...
@@ -135,6 +155,24 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
...
@@ -135,6 +155,24 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
pParaGrabBagValues
[
nParaGrabBagValue
].
Value
=
aMapIter
->
second
.
getValue
();
pParaGrabBagValues
[
nParaGrabBagValue
].
Value
=
aMapIter
->
second
.
getValue
();
++
nParaGrabBagValue
;
++
nParaGrabBagValue
;
}
}
else
if
(
aMapIter
->
second
.
getGrabBagType
()
==
CELL_GRAB_BAG
)
{
pCellGrabBagValues
[
nCellGrabBagValue
].
Name
=
rPropNameSupplier
.
GetName
(
aMapIter
->
first
);
pCellGrabBagValues
[
nCellGrabBagValue
].
Value
=
aMapIter
->
second
.
getValue
();
++
nCellGrabBagValue
;
}
else
{
if
(
aMapIter
->
first
==
PROP_CELL_INTEROP_GRAB_BAG
)
{
uno
::
Sequence
<
beans
::
PropertyValue
>
aSeq
;
aMapIter
->
second
.
getValue
()
>>=
aSeq
;
for
(
sal_Int32
i
=
0
;
i
<
aSeq
.
getLength
();
++
i
)
{
pCellGrabBagValues
[
nCellGrabBagValue
]
=
aSeq
[
i
];
++
nCellGrabBagValue
;
}
}
else
else
{
{
pValues
[
nValue
].
Name
=
rPropNameSupplier
.
GetName
(
aMapIter
->
first
);
pValues
[
nValue
].
Name
=
rPropNameSupplier
.
GetName
(
aMapIter
->
first
);
...
@@ -143,6 +181,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
...
@@ -143,6 +181,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
}
}
}
}
}
}
}
if
(
nCharGrabBag
&&
bCharGrabBag
)
if
(
nCharGrabBag
&&
bCharGrabBag
)
{
{
pValues
[
nValue
].
Name
=
"CharInteropGrabBag"
;
pValues
[
nValue
].
Name
=
"CharInteropGrabBag"
;
...
@@ -155,6 +194,12 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
...
@@ -155,6 +194,12 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
pValues
[
nValue
].
Value
=
uno
::
makeAny
(
aParaGrabBagValues
);
pValues
[
nValue
].
Value
=
uno
::
makeAny
(
aParaGrabBagValues
);
++
nValue
;
++
nValue
;
}
}
if
(
nCellGrabBag
)
{
pValues
[
nValue
].
Name
=
"CellInteropGrabBag"
;
pValues
[
nValue
].
Value
=
uno
::
makeAny
(
aCellGrabBagValues
);
++
nValue
;
}
}
}
return
m_aValues
;
return
m_aValues
;
}
}
...
...
writerfilter/source/dmapper/PropertyMap.hxx
Dosyayı görüntüle @
942f1ed9
...
@@ -68,6 +68,7 @@ enum BorderPosition
...
@@ -68,6 +68,7 @@ enum BorderPosition
enum
GrabBagType
enum
GrabBagType
{
{
NO_GRAB_BAG
,
NO_GRAB_BAG
,
CELL_GRAB_BAG
,
PARA_GRAB_BAG
,
PARA_GRAB_BAG
,
CHAR_GRAB_BAG
CHAR_GRAB_BAG
};
};
...
...
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