diff options
-rw-r--r-- | include/unotools/compatibility.hxx | 1 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs | 6 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 16 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/optcompatpage.ui | 1 | ||||
-rw-r--r-- | unotools/source/config/compatibility.cxx | 4 |
7 files changed, 32 insertions, 4 deletions
diff --git a/include/unotools/compatibility.hxx b/include/unotools/compatibility.hxx index defbabdf8563..5a4e2f7922ef 100644 --- a/include/unotools/compatibility.hxx +++ b/include/unotools/compatibility.hxx @@ -59,6 +59,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry ExpandWordSpace, ProtectForm, MsWordTrailingBlanks, + SubtractFlysAnchoredAtFlys, /* Should be at the end. Do not remove it. */ INVALID diff --git a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs index 90394f22dafe..f71c66205871 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs @@ -116,6 +116,12 @@ </info> <value>false</value> </prop> + <prop oor:name="SubtractFlysAnchoredAtFlys" oor:type="xs:boolean" oor:nillable="false"> + <info> + <desc>Use LibreOffice 4.3 anchoring paint order</desc> + </info> + <value>false</value> + </prop> </group> </templates> <component> diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 17fe5f6f2c9f..1678e26eea3e 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -418,6 +418,8 @@ public: void SetMsWordCompTrailingBlanks( bool _bMsWordCompTrailingBlanks ); + void SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys); + // DOCUMENT COMPATIBILITY FLAGS END // Calls Idle-formatter of Layout. diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 8ce4de7d028c..7cbcd8b4a689 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -917,6 +917,12 @@ void SwViewShell::SetMsWordCompTrailingBlanks( bool _bMsWordCompTrailingBlanks ) } } +void SwViewShell::SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys) +{ + IDocumentSettingAccess& rIDSA = getIDocumentSettingAccess(); + rIDSA.set(DocumentSettingId::SUBTRACT_FLYS, bSubtractFlysAnchoredAtFlys); +} + void SwViewShell::Reformat() { SwWait aWait( *GetDoc()->GetDocShell(), true ); diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 3dc5d377ace0..4feaf12b3684 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -114,7 +114,8 @@ sal_uLong convertBools2Ulong_Impl bool _bConsiderWrappingStyle, bool _bExpandWordSpace, bool _bProtectForm, - bool _bMsWordCompTrailingBlanks + bool _bMsWordCompTrailingBlanks, + bool bSubtractFlysAnchoredAtFlys ) { sal_uLong nRet = 0; @@ -158,6 +159,9 @@ sal_uLong convertBools2Ulong_Impl nSetBit = nSetBit << 1; if ( _bMsWordCompTrailingBlanks ) nRet |= nSetBit; + nSetBit = nSetBit << 1; + if (bSubtractFlysAnchoredAtFlys) + nRet |= nSetBit; return nRet; } @@ -241,7 +245,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) aEntry.getValue<bool>( SvtCompatibilityEntry::Index::ConsiderWrappingStyle ), aEntry.getValue<bool>( SvtCompatibilityEntry::Index::ExpandWordSpace ), aEntry.getValue<bool>( SvtCompatibilityEntry::Index::ProtectForm ), - aEntry.getValue<bool>( SvtCompatibilityEntry::Index::MsWordTrailingBlanks ) ); + aEntry.getValue<bool>( SvtCompatibilityEntry::Index::MsWordTrailingBlanks ), + aEntry.getValue<bool>( SvtCompatibilityEntry::Index::SubtractFlysAnchoredAtFlys ) ); m_pFormattingLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)nOptions) ); } @@ -313,7 +318,8 @@ sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const rIDocumentSettingAccess.get( DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION ), !rIDocumentSettingAccess.get( DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK ), rIDocumentSettingAccess.get( DocumentSettingId::PROTECT_FORM ), - rIDocumentSettingAccess.get( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ) ); + rIDocumentSettingAccess.get( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ), + rIDocumentSettingAccess.get( DocumentSettingId::SUBTRACT_FLYS ) ); } return nRet; } @@ -401,6 +407,10 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* ) m_pWrtShell->SetMsWordCompTrailingBlanks( bChecked ); break; + case SvtCompatibilityEntry::Index::SubtractFlysAnchoredAtFlys: + m_pWrtShell->SetSubtractFlysAnchoredAtFlys(bChecked); + break; + default: break; } diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui index 3c2eb9330dae..c391925553bf 100644 --- a/sw/uiconfig/swriter/ui/optcompatpage.ui +++ b/sw/uiconfig/swriter/ui/optcompatpage.ui @@ -66,6 +66,7 @@ <item translatable="yes">Expand word space on lines with manual line breaks in justified paragraphs</item> <item translatable="yes">Protect form</item> <item translatable="yes">MS Word-compatible trailing blanks</item> + <item translatable="yes">Use LibreOffice 4.3 anchoring paint order (in current document)</item> <item translatable="yes"><User settings></item> </items> </object> diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index 91b3e53e5929..bea5cb841a3b 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -61,6 +61,7 @@ SvtCompatibilityEntry::SvtCompatibilityEntry() setValue<bool>( Index::ExpandWordSpace, true ); setValue<bool>( Index::ProtectForm, false ); setValue<bool>( Index::MsWordTrailingBlanks, false ); + setValue<bool>( Index::SubtractFlysAnchoredAtFlys, false ); setDefaultEntry( false ); } @@ -90,7 +91,8 @@ OUString SvtCompatibilityEntry::getName( const Index rIdx ) "ConsiderWrappingStyle", "ExpandWordSpace", "ProtectForm", - "MsWordCompTrailingBlanks" + "MsWordCompTrailingBlanks", + "SubtractFlysAnchoredAtFlys" }; /* Size of sPropertyName array not equal size of the SvtCompatibilityEntry::Index enum class */ |