Bugzilla – Attachment 143157 Details for
Bug 118361
DOC/DOCX: Footnote separator Line position is wrong when locale doesn't match RTL/LTR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tdf118361_poc.patch: docx import proof of concept
tdf118361_poc.patch (text/plain), 3.73 KB, created by
Justin L
on 2018-06-27 11:07:58 UTC
(
hide
)
Description:
tdf118361_poc.patch: docx import proof of concept
Filename:
MIME Type:
Creator:
Justin L
Created:
2018-06-27 11:07:58 UTC
Size:
3.73 KB
patch
obsolete
>diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx >index 592063a..f515d51 100644 >--- a/writerfilter/source/dmapper/PropertyIds.cxx >+++ b/writerfilter/source/dmapper/PropertyIds.cxx >@@ -172,6 +172,7 @@ OUString getPropertyName( PropertyIds eId ) > case PROP_FOOTER_IS_SHARED : sName = "FooterIsShared"; break; > case PROP_FOOTER_IS_ON : sName = "FooterIsOn"; break; > case PROP_FOOTNOTE_COUNTING : sName = "FootnoteCounting"; break; >+ case PROP_FOOTNOTE_LINE_ADJUST : sName = "FootnoteLineAdjust"; break; > case PROP_WIDTH : sName = "Width"; break; > case PROP_HEIGHT : sName = "Height"; break; > case PROP_TEXT_COLUMNS : sName = "TextColumns"; break; >diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx >index a3465fe..6d1d77b 100644 >--- a/writerfilter/source/dmapper/PropertyIds.hxx >+++ b/writerfilter/source/dmapper/PropertyIds.hxx >@@ -128,6 +128,7 @@ enum PropertyIds > ,PROP_FOOTER_TEXT > ,PROP_FOOTER_TEXT_LEFT > ,PROP_FOOTNOTE_COUNTING >+ ,PROP_FOOTNOTE_LINE_ADJUST > ,PROP_FORMAT > ,PROP_FULL_NAME > ,PROP_GAMMA >diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx >index 7289a74..839d2f5 100644 >--- a/writerfilter/source/dmapper/PropertyMap.cxx >+++ b/writerfilter/source/dmapper/PropertyMap.cxx >@@ -36,12 +36,15 @@ > #include <com/sun/star/style/BreakType.hpp> > #include <com/sun/star/style/PageStyleLayout.hpp> > #include <com/sun/star/style/XStyle.hpp> >+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> > #include <com/sun/star/table/ShadowFormat.hpp> > #include <com/sun/star/text/RelOrientation.hpp> > #include <com/sun/star/text/HoriOrientation.hpp> >+#include <com/sun/star/text/HorizontalAdjust.hpp> > #include <com/sun/star/text/SizeType.hpp> > #include <com/sun/star/text/VertOrientation.hpp> > #include <com/sun/star/text/WritingMode.hpp> >+#include <com/sun/star/text/WritingMode2.hpp> > #include <com/sun/star/text/XTextColumns.hpp> > #include <com/sun/star/text/XText.hpp> > #include <com/sun/star/text/TextGridMode.hpp> >@@ -1034,6 +1037,27 @@ void SectionPropertyMap::HandleMarginsHeaderFooter( bool bFirstPage, DomainMappe > // Set footnote line width to zero, document has no footnote separator. > Insert(PROP_FOOTNOTE_LINE_RELATIVE_WIDTH, uno::makeAny(sal_Int32(0))); > } >+ if ( rDM_Impl.m_bHasFtnSep ) >+ { >+ //If default paragraph style is RTL, footnote separator should be right aligned - inferred from MSWord observations. >+ try >+ { >+ uno::Reference<style::XStyleFamiliesSupplier> xStylesSupplier(rDM_Impl.GetTextDocument(), uno::UNO_QUERY); >+ uno::Reference<container::XNameAccess> xStyleFamilies = xStylesSupplier->getStyleFamilies(); >+ uno::Reference<container::XNameAccess> xParagraphStyles; >+ xStyleFamilies->getByName("ParagraphStyles") >>= xParagraphStyles; >+ uno::Reference<beans::XPropertySet> xStandard; >+ xParagraphStyles->getByName("Standard") >>= xStandard; >+ if ( xStandard ) >+ { >+ sal_Int16 aWritingMode; >+ xStandard->getPropertyValue( getPropertyName(PROP_WRITING_MODE) ) >>= aWritingMode; >+ if( aWritingMode == text::WritingMode2::RL_TB ) >+ Insert( PROP_FOOTNOTE_LINE_ADJUST, uno::makeAny( sal_Int16(text::HorizontalAdjust_RIGHT) ) ); >+ } >+ } >+ catch ( const uno::Exception& ) {} >+ } > > /*** if headers/footers are available then the top/bottom margins of the > header/footer are copied to the top/bottom margin of the page
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 118361
:
143082
|
143083
|
143084
|
143098
|
143152
| 143157 |
143163