summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-05-26 18:13:54 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-26 23:17:16 +0200
commitf85ded43446b17fbfdd868cc057ba39666d3d7cb (patch)
tree8ee201762ab53cdc724270ccc93e42f29e3ddf11 /sw
parent0714d2f3009bbb24501561c1a8e96a6feb9a42ca (diff)
tdf#108056 sw: add UI to disable SubtractFlysAnchoredAtFlys compat option
There is a reason this is off by default, make it a bit more easier for users to not depend this option when they don't actually need it. Change-Id: I21c5b942c6021fa21840779e1a9f53055fbf279f Reviewed-on: https://gerrit.libreoffice.org/38081 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/viewsh.hxx2
-rw-r--r--sw/source/core/view/viewsh.cxx6
-rw-r--r--sw/source/ui/config/optcomp.cxx16
-rw-r--r--sw/uiconfig/swriter/ui/optcompatpage.ui1
4 files changed, 22 insertions, 3 deletions
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">&lt;User settings&gt;</item>
</items>
</object>