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
9da4fe80
Kaydet (Commit)
9da4fe80
authored
Tem 17, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX import: handle <w:noColumnBalance> compat setting
Change-Id: Ieffd1fe52d6167d84ada5ebb11686f20d6dce8fa
üst
5748a5ab
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
5 deletions
+25
-5
unbalanced-columns-compat.docx
sw/qa/extras/ooxmlimport/data/unbalanced-columns-compat.docx
+0
-0
ooxmlimport.cxx
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+8
-0
PropertyMap.cxx
writerfilter/source/dmapper/PropertyMap.cxx
+5
-4
PropertyMap.hxx
writerfilter/source/dmapper/PropertyMap.hxx
+1
-1
SettingsTable.cxx
writerfilter/source/dmapper/SettingsTable.cxx
+10
-0
SettingsTable.hxx
writerfilter/source/dmapper/SettingsTable.hxx
+1
-0
No files found.
sw/qa/extras/ooxmlimport/data/unbalanced-columns-compat.docx
0 → 100755
Dosyayı görüntüle @
9da4fe80
File added
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Dosyayı görüntüle @
9da4fe80
...
@@ -2282,6 +2282,14 @@ DECLARE_OOXMLIMPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
...
@@ -2282,6 +2282,14 @@ DECLARE_OOXMLIMPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
CPPUNIT_ASSERT_EQUAL
(
true
,
getProperty
<
bool
>
(
xTextSections
->
getByIndex
(
2
),
"DontBalanceTextColumns"
));
CPPUNIT_ASSERT_EQUAL
(
true
,
getProperty
<
bool
>
(
xTextSections
->
getByIndex
(
2
),
"DontBalanceTextColumns"
));
}
}
DECLARE_OOXMLIMPORT_TEST
(
testUnbalancedColumnsCompat
,
"unbalanced-columns-compat.docx"
)
{
uno
::
Reference
<
text
::
XTextSectionsSupplier
>
xTextSectionsSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xTextSections
(
xTextSectionsSupplier
->
getTextSections
(),
uno
::
UNO_QUERY
);
// This was false, we ignored the relevant compat setting to make this non-last section unbalanced.
CPPUNIT_ASSERT_EQUAL
(
true
,
getProperty
<
bool
>
(
xTextSections
->
getByIndex
(
0
),
"DontBalanceTextColumns"
));
}
#endif
#endif
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/dmapper/PropertyMap.cxx
Dosyayı görüntüle @
9da4fe80
...
@@ -607,7 +607,7 @@ void SectionPropertyMap::SetBorderDistance( uno::Reference< beans::XPropertySet
...
@@ -607,7 +607,7 @@ void SectionPropertyMap::SetBorderDistance( uno::Reference< beans::XPropertySet
uno
::
Reference
<
text
::
XTextColumns
>
SectionPropertyMap
::
ApplyColumnProperties
(
uno
::
Reference
<
text
::
XTextColumns
>
SectionPropertyMap
::
ApplyColumnProperties
(
uno
::
Reference
<
beans
::
XPropertySet
>
xColumnContainer
,
bool
bLast
)
uno
::
Reference
<
beans
::
XPropertySet
>
xColumnContainer
,
DomainMapper_Impl
&
rDM_Impl
)
{
{
uno
::
Reference
<
text
::
XTextColumns
>
xColumns
;
uno
::
Reference
<
text
::
XTextColumns
>
xColumns
;
try
try
...
@@ -659,7 +659,8 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties(
...
@@ -659,7 +659,8 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties(
rPropNameSupplier
.
GetName
(
PROP_SEPARATOR_LINE_IS_ON
),
rPropNameSupplier
.
GetName
(
PROP_SEPARATOR_LINE_IS_ON
),
uno
::
makeAny
(
m_bSeparatorLineIsOn
));
uno
::
makeAny
(
m_bSeparatorLineIsOn
));
xColumnContainer
->
setPropertyValue
(
sTextColumns
,
uno
::
makeAny
(
xColumns
)
);
xColumnContainer
->
setPropertyValue
(
sTextColumns
,
uno
::
makeAny
(
xColumns
)
);
if
(
bLast
)
// Set the columns to be unbalanced if that compatability option is set or this is the last section.
if
(
rDM_Impl
.
GetSettingsTable
()
->
GetNoColumnBalance
()
||
rDM_Impl
.
GetIsLastSectionGroup
())
xColumnContainer
->
setPropertyValue
(
"DontBalanceTextColumns"
,
uno
::
makeAny
(
true
));
xColumnContainer
->
setPropertyValue
(
"DontBalanceTextColumns"
,
uno
::
makeAny
(
true
));
}
}
catch
(
const
uno
::
Exception
&
)
catch
(
const
uno
::
Exception
&
)
...
@@ -956,7 +957,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
...
@@ -956,7 +957,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
uno
::
Reference
<
beans
::
XPropertySet
>
xSection
=
uno
::
Reference
<
beans
::
XPropertySet
>
xSection
=
rDM_Impl
.
appendTextSectionAfter
(
m_xStartingRange
);
rDM_Impl
.
appendTextSectionAfter
(
m_xStartingRange
);
if
(
m_nColumnCount
>
0
&&
xSection
.
is
())
if
(
m_nColumnCount
>
0
&&
xSection
.
is
())
ApplyColumnProperties
(
xSection
,
rDM_Impl
.
GetIsLastSectionGroup
()
);
ApplyColumnProperties
(
xSection
,
rDM_Impl
);
uno
::
Reference
<
beans
::
XPropertySet
>
xRangeProperties
(
lcl_GetRangeProperties
(
m_bIsFirstSection
,
rDM_Impl
,
m_xStartingRange
));
uno
::
Reference
<
beans
::
XPropertySet
>
xRangeProperties
(
lcl_GetRangeProperties
(
m_bIsFirstSection
,
rDM_Impl
,
m_xStartingRange
));
if
(
xRangeProperties
.
is
())
if
(
xRangeProperties
.
is
())
{
{
...
@@ -1012,7 +1013,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
...
@@ -1012,7 +1013,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
}
}
uno
::
Reference
<
text
::
XTextColumns
>
xColumns
;
uno
::
Reference
<
text
::
XTextColumns
>
xColumns
;
if
(
m_nColumnCount
>
0
)
if
(
m_nColumnCount
>
0
)
xColumns
=
ApplyColumnProperties
(
xFollowPageStyle
,
rDM_Impl
.
GetIsLastSectionGroup
()
);
xColumns
=
ApplyColumnProperties
(
xFollowPageStyle
,
rDM_Impl
);
//prepare text grid properties
//prepare text grid properties
sal_Int32
nHeight
=
1
;
sal_Int32
nHeight
=
1
;
...
...
writerfilter/source/dmapper/PropertyMap.hxx
Dosyayı görüntüle @
9da4fe80
...
@@ -203,7 +203,7 @@ class SectionPropertyMap : public PropertyMap
...
@@ -203,7 +203,7 @@ class SectionPropertyMap : public PropertyMap
void
_ApplyProperties
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
xStyle
);
void
_ApplyProperties
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
xStyle
);
::
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
text
::
XTextColumns
>
ApplyColumnProperties
(
::
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
text
::
XTextColumns
>
ApplyColumnProperties
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
xFollowPageStyle
,
bool
bLast
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
xFollowPageStyle
,
DomainMapper_Impl
&
rDM_Impl
);
void
CopyLastHeaderFooter
(
bool
bFirstPage
,
DomainMapper_Impl
&
rDM_Impl
);
void
CopyLastHeaderFooter
(
bool
bFirstPage
,
DomainMapper_Impl
&
rDM_Impl
);
void
PrepareHeaderFooterProperties
(
bool
bFirstPage
);
void
PrepareHeaderFooterProperties
(
bool
bFirstPage
);
bool
HasHeader
(
bool
bFirstPage
)
const
;
bool
HasHeader
(
bool
bFirstPage
)
const
;
...
...
writerfilter/source/dmapper/SettingsTable.cxx
Dosyayı görüntüle @
9da4fe80
...
@@ -74,6 +74,7 @@ struct SettingsTable_Impl
...
@@ -74,6 +74,7 @@ struct SettingsTable_Impl
bool
embedTrueTypeFonts
;
bool
embedTrueTypeFonts
;
bool
embedSystemFonts
;
bool
embedSystemFonts
;
bool
m_bDoNotUseHTMLParagraphAutoSpacing
;
bool
m_bDoNotUseHTMLParagraphAutoSpacing
;
bool
m_bNoColumnBalance
;
bool
m_bSplitPgBreakAndParaMark
;
bool
m_bSplitPgBreakAndParaMark
;
bool
m_bMirrorMargin
;
bool
m_bMirrorMargin
;
uno
::
Sequence
<
beans
::
PropertyValue
>
m_pThemeFontLangProps
;
uno
::
Sequence
<
beans
::
PropertyValue
>
m_pThemeFontLangProps
;
...
@@ -104,6 +105,7 @@ struct SettingsTable_Impl
...
@@ -104,6 +105,7 @@ struct SettingsTable_Impl
,
embedTrueTypeFonts
(
false
)
,
embedTrueTypeFonts
(
false
)
,
embedSystemFonts
(
false
)
,
embedSystemFonts
(
false
)
,
m_bDoNotUseHTMLParagraphAutoSpacing
(
false
)
,
m_bDoNotUseHTMLParagraphAutoSpacing
(
false
)
,
m_bNoColumnBalance
(
false
)
,
m_bSplitPgBreakAndParaMark
(
false
)
,
m_bSplitPgBreakAndParaMark
(
false
)
,
m_bMirrorMargin
(
false
)
,
m_bMirrorMargin
(
false
)
,
m_pThemeFontLangProps
(
3
)
,
m_pThemeFontLangProps
(
3
)
...
@@ -276,6 +278,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
...
@@ -276,6 +278,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
}
}
}
}
break
;
break
;
case
NS_ooxml
:
:
LN_CT_Compat_noColumnBalance
:
m_pImpl
->
m_bNoColumnBalance
=
nIntValue
;
break
;
default
:
default
:
{
{
#ifdef DEBUG_DOMAINMAPPER
#ifdef DEBUG_DOMAINMAPPER
...
@@ -338,6 +343,11 @@ bool SettingsTable::GetDoNotUseHTMLParagraphAutoSpacing() const
...
@@ -338,6 +343,11 @@ bool SettingsTable::GetDoNotUseHTMLParagraphAutoSpacing() const
return
m_pImpl
->
m_bDoNotUseHTMLParagraphAutoSpacing
;
return
m_pImpl
->
m_bDoNotUseHTMLParagraphAutoSpacing
;
}
}
bool
SettingsTable
::
GetNoColumnBalance
()
const
{
return
m_pImpl
->
m_bNoColumnBalance
;
}
bool
SettingsTable
::
GetSplitPgBreakAndParaMark
()
const
bool
SettingsTable
::
GetSplitPgBreakAndParaMark
()
const
{
{
return
m_pImpl
->
m_bSplitPgBreakAndParaMark
;
return
m_pImpl
->
m_bSplitPgBreakAndParaMark
;
...
...
writerfilter/source/dmapper/SettingsTable.hxx
Dosyayı görüntüle @
9da4fe80
...
@@ -71,6 +71,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable
...
@@ -71,6 +71,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable
bool
GetDoNotUseHTMLParagraphAutoSpacing
()
const
;
bool
GetDoNotUseHTMLParagraphAutoSpacing
()
const
;
bool
GetSplitPgBreakAndParaMark
()
const
;
bool
GetSplitPgBreakAndParaMark
()
const
;
bool
GetMirrorMarginSettings
()
const
;
bool
GetMirrorMarginSettings
()
const
;
bool
GetNoColumnBalance
()
const
;
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
GetThemeFontLangProperties
()
const
;
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
GetThemeFontLangProperties
()
const
;
...
...
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