summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaliy Anderson <vanderson@smartru.com>2017-01-13 08:37:39 -0800
committerMike Kaganski <mike.kaganski@collabora.com>2017-01-18 08:47:22 +0000
commitfb4943338317c8f24b143d7d1f0b8f2069af1577 (patch)
tree5b5bb0df8f8fa88f15832b9e149191e477bfba59
parentc8bdf901efd034f24bacf5e2d617a00bb1692238 (diff)
tdf#104349, tdf#104668 MS Word compatibility trailing blanks option part 2
Create the option in Tools->Options->LibreOffice Writer->Compatibility Change-Id: I7c766138db9210d3e7a97eea48b9265ee9762199 Reviewed-on: https://gerrit.libreoffice.org/33148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--include/unotools/compatibility.hxx8
-rw-r--r--sw/source/core/doc/DocumentSettingManager.cxx5
-rw-r--r--sw/source/ui/config/optcomp.cxx34
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx13
-rw-r--r--sw/uiconfig/swriter/ui/optcompatpage.ui1
-rw-r--r--unotools/source/config/compatibility.cxx43
6 files changed, 85 insertions, 19 deletions
diff --git a/include/unotools/compatibility.hxx b/include/unotools/compatibility.hxx
index 229190c42415..551627b251a1 100644
--- a/include/unotools/compatibility.hxx
+++ b/include/unotools/compatibility.hxx
@@ -40,7 +40,8 @@ enum CompatibilityOptions
COPT_USE_OUR_TEXTWRAPPING,
COPT_CONSIDER_WRAPPINGSTYLE,
COPT_EXPAND_WORDSPACE,
- COPT_PROTECT_FORM
+ COPT_PROTECT_FORM,
+ COPT_MS_WORD_COMP_TRAILING_BLANKS
};
/*-************************************************************************************************************
@@ -61,6 +62,7 @@ enum CompatibilityOptions
#define COMPATIBILITY_PROPERTYNAME_CONSIDERWRAPPINGSTYLE "ConsiderWrappingStyle"
#define COMPATIBILITY_PROPERTYNAME_EXPANDWORDSPACE "ExpandWordSpace"
#define COMPATIBILITY_PROPERTYNAME_PROTECTFORM "ProtectForm"
+#define COMPATIBILITY_PROPERTYNAME_MSWORDTRAILINGBLANKS "MsWordCompTrailingBlanks"
#define COMPATIBILITY_DEFAULT_NAME "_default"
@@ -132,7 +134,8 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityOptions: public utl::detail::Options
bool bUseOurTextWrapping,
bool bConsiderWrappingStyle,
bool bExpandWordSpace,
- bool bProtectForm );
+ bool bProtectForm,
+ bool bMsWordCompTrailingBlanks );
bool IsUsePrtDevice() const;
bool IsAddSpacing() const;
@@ -145,6 +148,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityOptions: public utl::detail::Options
bool IsUseOurTextWrapping() const;
bool IsConsiderWrappingStyle() const;
bool IsExpandWordSpace() const;
+ bool IsMsWordCompTrailingBlanks() const;
private:
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index f0066826b810..64644c53241c 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -109,8 +109,8 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
mbUseFormerObjectPos = aOptions.IsUseObjectPositioning();
mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping();
mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle();
-
- mbDoNotJustifyLinesWithManualBreak = !aOptions.IsExpandWordSpace();
+ mbDoNotJustifyLinesWithManualBreak = !aOptions.IsExpandWordSpace();
+ mbMsWordCompTrailingBlanks = aOptions.IsMsWordCompTrailingBlanks();
}
else
{
@@ -125,6 +125,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
mbUseFormerTextWrapping = false;
mbConsiderWrapOnObjPos = false;
mbDoNotJustifyLinesWithManualBreak = true;
+ mbMsWordCompTrailingBlanks = false;
}
// COMPATIBILITY FLAGS END
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 2e72a027984b..69e54a3bbcf7 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -57,6 +57,7 @@ struct CompatibilityItem
bool m_bConsiderWrappingStyle;
bool m_bExpandWordSpace;
bool m_bProtectForm;
+ bool m_bMsWordCompTrailingBlanks;
bool m_bIsDefault;
CompatibilityItem( const OUString& _rName, const OUString& _rModule,
@@ -64,7 +65,7 @@ struct CompatibilityItem
bool _bUseOurTabStops, bool _bNoExtLeading, bool _bUseLineSpacing,
bool _bAddTableSpacing, bool _bUseObjPos, bool _bUseOurTextWrapping,
bool _bConsiderWrappingStyle, bool _bExpandWordSpace, bool _bProtectForm,
- bool _bIsDefault ) :
+ bool _bMsWordCompTrailingBlanks, bool _bIsDefault ) :
m_sName ( _rName ),
m_sModule ( _rModule ),
@@ -80,6 +81,7 @@ struct CompatibilityItem
m_bConsiderWrappingStyle( _bConsiderWrappingStyle ),
m_bExpandWordSpace ( _bExpandWordSpace ),
m_bProtectForm ( _bProtectForm),
+ m_bMsWordCompTrailingBlanks( _bMsWordCompTrailingBlanks),
m_bIsDefault ( _bIsDefault ) {}
};
@@ -102,7 +104,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxIt
get(m_pOptionsLB, "options");
get(m_pDefaultPB, "default");
- for (sal_Int32 nId = COPT_USE_PRINTERDEVICE; nId <= COPT_PROTECT_FORM; ++nId)
+ for (sal_Int32 nId = COPT_USE_PRINTERDEVICE; nId <= COPT_MS_WORD_COMP_TRAILING_BLANKS; ++nId)
{
const OUString sEntry = m_pFormattingLB->GetEntry(nId);
SvTreeListEntry* pEntry = m_pOptionsLB->SvTreeListBox::InsertEntry( sEntry );
@@ -153,7 +155,8 @@ sal_uLong convertBools2Ulong_Impl
bool _bUseOurTextWrapping,
bool _bConsiderWrappingStyle,
bool _bExpandWordSpace,
- bool _bProtectForm
+ bool _bProtectForm,
+ bool _bMsWordCompTrailingBlanks
)
{
sal_uLong nRet = 0;
@@ -194,6 +197,9 @@ sal_uLong convertBools2Ulong_Impl
nSetBit = nSetBit << 1;
if ( _bProtectForm )
nRet |= nSetBit;
+ nSetBit = nSetBit << 1;
+ if ( _bMsWordCompTrailingBlanks )
+ nRet |= nSetBit;
return nRet;
}
@@ -235,6 +241,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
bool bConsiderWrappingStyle = false;
bool bExpandWordSpace = false;
bool bProtectForm = false;
+ bool bMsWordCompTrailingBlanks = false;
const sal_Int32 nCount = aList.getLength();
for ( sal_Int32 i = 0; i < nCount; ++i )
{
@@ -271,6 +278,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
aValue.Value >>= bExpandWordSpace;
else if ( aValue.Name == COMPATIBILITY_PROPERTYNAME_PROTECTFORM )
aValue.Value >>= bProtectForm;
+ else if ( aValue.Name == COMPATIBILITY_PROPERTYNAME_MSWORDTRAILINGBLANKS )
+ aValue.Value >>= bMsWordCompTrailingBlanks;
}
const bool bIsUserEntry = sName == "_user";
@@ -280,8 +289,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
sName, sModule, bUsePrtMetrics, bAddSpacing,
bAddSpacingAtPages, bUseOurTabStops, bNoExtLeading,
bUseLineSpacing, bAddTableSpacing, bUseObjPos,
- bUseOurTextWrapping, bConsiderWrappingStyle, bExpandWordSpace, bProtectForm,
- bIsDefaultEntry );
+ bUseOurTextWrapping, bConsiderWrappingStyle, bExpandWordSpace,
+ bProtectForm, bMsWordCompTrailingBlanks, bIsDefaultEntry );
m_pImpl->m_aList.push_back( aItem );
if ( aItem.m_bIsDefault )
@@ -306,7 +315,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
bUsePrtMetrics, bAddSpacing, bAddSpacingAtPages,
bUseOurTabStops, bNoExtLeading, bUseLineSpacing,
bAddTableSpacing, bUseObjPos, bUseOurTextWrapping,
- bConsiderWrappingStyle, bExpandWordSpace, bProtectForm );
+ bConsiderWrappingStyle, bExpandWordSpace, bProtectForm,
+ bMsWordCompTrailingBlanks );
m_pFormattingLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)nOptions) );
}
@@ -350,6 +360,7 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl, Button*, void)
case COPT_CONSIDER_WRAPPINGSTYLE: pItem->m_bConsiderWrappingStyle = bChecked; break;
case COPT_EXPAND_WORDSPACE: pItem->m_bExpandWordSpace = bChecked; break;
case COPT_PROTECT_FORM: pItem->m_bProtectForm = bChecked; break;
+ case COPT_MS_WORD_COMP_TRAILING_BLANKS: pItem->m_bMsWordCompTrailingBlanks = bChecked; break;
default:
{
OSL_FAIL("SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" );
@@ -394,7 +405,8 @@ sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
rIDocumentSettingAccess.get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING),
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::PROTECT_FORM),
+ rIDocumentSettingAccess.get(DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS));
}
return nRet;
}
@@ -410,7 +422,8 @@ void SwCompatibilityOptPage::WriteOptions()
pItem->m_bNoExtLeading, pItem->m_bUseLineSpacing,
pItem->m_bAddTableSpacing, pItem->m_bUseObjPos,
pItem->m_bUseOurTextWrapping, pItem->m_bConsiderWrappingStyle,
- pItem->m_bExpandWordSpace, pItem->m_bProtectForm );
+ pItem->m_bExpandWordSpace, pItem->m_bProtectForm,
+ pItem->m_bMsWordCompTrailingBlanks );
}
VclPtr<SfxTabPage> SwCompatibilityOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
@@ -488,6 +501,11 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* )
m_pWrtShell->SetProtectForm( bChecked );
bModified = true;
}
+ else if ( COPT_MS_WORD_COMP_TRAILING_BLANKS == nOption )
+ {
+ m_pWrtShell->SetMsWordCompTrailingBlanks( bChecked );
+ bModified = true;
+ }
}
nSavedOptions = nSavedOptions >> 1;
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 22a82a3743cf..f11fae73cf95 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -112,6 +112,7 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_UNIX_FORCE_ZERO_EXT_LEADING,
HANDLE_USE_OLD_PRINTER_METRICS,
HANDLE_PROTECT_FORM,
+ HANDLE_MS_WORD_COMP_TRAILING_BLANKS,
HANDLE_TABS_RELATIVE_TO_INDENT,
HANDLE_RSID,
HANDLE_RSID_ROOT,
@@ -191,6 +192,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
{ OUString("Rsid"), HANDLE_RSID, cppu::UnoType<sal_Int32>::get(), 0},
{ OUString("RsidRoot"), HANDLE_RSID_ROOT, cppu::UnoType<sal_Int32>::get(), 0},
{ OUString("ProtectForm"), HANDLE_PROTECT_FORM, cppu::UnoType<bool>::get(), 0},
+ { OUString("MsWordCompTrailingBlanks"), HANDLE_MS_WORD_COMP_TRAILING_BLANKS, cppu::UnoType<bool>::get(), 0 },
{ OUString("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, cppu::UnoType<bool>::get(), 0},
{ OUString("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), 0},
{ OUString("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, cppu::UnoType<bool>::get(), 0},
@@ -720,6 +722,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_FORM, bTmp);
}
break;
+ case HANDLE_MS_WORD_COMP_TRAILING_BLANKS:
+ {
+ bool bTmp = *o3tl::doAccess<bool>(rValue);
+ mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS, bTmp);
+ }
+ break;
case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
{
bool bTmp = *o3tl::doAccess<bool>(rValue);
@@ -1175,6 +1183,11 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM);
}
break;
+ case HANDLE_MS_WORD_COMP_TRAILING_BLANKS:
+ {
+ rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS);
+ }
+ break;
case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
{
rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST);
diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui
index 4ba4e48f1b72..3c2eb9330dae 100644
--- a/sw/uiconfig/swriter/ui/optcompatpage.ui
+++ b/sw/uiconfig/swriter/ui/optcompatpage.ui
@@ -65,6 +65,7 @@
<item translatable="yes">Consider wrapping style when positioning objects</item>
<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">&lt;User settings&gt;</item>
</items>
</object>
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index cd86de8b32e8..795f2b7617df 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -57,8 +57,9 @@ using namespace ::com::sun::star::beans;
#define PROPERTYNAME_CONSIDERWRAPSTYLE COMPATIBILITY_PROPERTYNAME_CONSIDERWRAPPINGSTYLE
#define PROPERTYNAME_EXPANDWORDSPACE COMPATIBILITY_PROPERTYNAME_EXPANDWORDSPACE
#define PROPERTYNAME_PROTECTFORM COMPATIBILITY_PROPERTYNAME_PROTECTFORM
+#define PROPERTYNAME_MSWORDTRAILINGBLANKS COMPATIBILITY_PROPERTYNAME_MSWORDTRAILINGBLANKS
-#define PROPERTYCOUNT 14
+#define PROPERTYCOUNT 15
#define OFFSET_NAME 0
#define OFFSET_MODULE 1
@@ -74,6 +75,7 @@ using namespace ::com::sun::star::beans;
#define OFFSET_CONSIDERWRAPPINGSTYLE 11
#define OFFSET_EXPANDWORDSPACE 12
#define OFFSET_PROTECTFORM 13
+#define OFFSET_MSWORDTRAILINGBLANKS 14
// private declarations!
@@ -89,7 +91,9 @@ struct SvtCompatibilityEntry
bNoExtLeading( false ), bUseLineSpacing( false ),
bAddTableSpacing( false ), bUseObjPos( false ),
bUseOurTextWrapping( false ), bConsiderWrappingStyle( false ),
- bExpandWordSpace( true ), bProtectForm( false ) {}
+ bExpandWordSpace( true ), bProtectForm( false ),
+ bMsWordCompTrailingBlanks ( false ) {}
+
SvtCompatibilityEntry(
const OUString& _rName, const OUString& _rNewModule ) :
sName( _rName ), sModule( _rNewModule ),
@@ -98,7 +102,8 @@ struct SvtCompatibilityEntry
bNoExtLeading( false ), bUseLineSpacing( false ),
bAddTableSpacing( false ), bUseObjPos( false ),
bUseOurTextWrapping( false ), bConsiderWrappingStyle( false ),
- bExpandWordSpace( true ), bProtectForm( false ) {}
+ bExpandWordSpace( true ), bProtectForm( false ),
+ bMsWordCompTrailingBlanks( false ) {}
inline void SetUsePrtMetrics( bool _bSet ) { bUsePrtMetrics = _bSet; }
inline void SetAddSpacing( bool _bSet ) { bAddSpacing = _bSet; }
@@ -112,6 +117,7 @@ struct SvtCompatibilityEntry
inline void SetConsiderWrappingStyle( bool _bSet ) { bConsiderWrappingStyle = _bSet; }
inline void SetExpandWordSpace( bool _bSet ) { bExpandWordSpace = _bSet; }
inline void SetProtectForm( bool _bSet ) { bProtectForm = _bSet; }
+ inline void SetMsWordCompTrailingBlanks( bool _bSet ) { bMsWordCompTrailingBlanks = _bSet; }
public:
OUString sName;
@@ -128,6 +134,7 @@ struct SvtCompatibilityEntry
bool bConsiderWrappingStyle;
bool bExpandWordSpace;
bool bProtectForm;
+ bool bMsWordCompTrailingBlanks;
};
/*-****************************************************************************************************************
@@ -171,6 +178,7 @@ class SvtCompatibility
lProperties[ OFFSET_USEOURTEXTWRAPPING ].Name = PROPERTYNAME_USEOURTEXTWRAP;
lProperties[ OFFSET_CONSIDERWRAPPINGSTYLE ].Name = PROPERTYNAME_CONSIDERWRAPSTYLE;
lProperties[ OFFSET_EXPANDWORDSPACE ].Name = PROPERTYNAME_EXPANDWORDSPACE;
+ lProperties[ OFFSET_MSWORDTRAILINGBLANKS ].Name = PROPERTYNAME_MSWORDTRAILINGBLANKS;
for ( vector< SvtCompatibilityEntry >::const_iterator pItem = pList->begin();
pItem != pList->end(); ++pItem )
@@ -188,6 +196,7 @@ class SvtCompatibility
lProperties[ OFFSET_USEOURTEXTWRAPPING ].Value <<= pItem->bUseOurTextWrapping;
lProperties[ OFFSET_CONSIDERWRAPPINGSTYLE ].Value <<= pItem->bConsiderWrappingStyle;
lProperties[ OFFSET_EXPANDWORDSPACE ].Value <<= pItem->bExpandWordSpace;
+ lProperties[ OFFSET_MSWORDTRAILINGBLANKS ].Value <<= pItem->bMsWordCompTrailingBlanks;
lResult[ nStep ] = lProperties;
++nStep;
}
@@ -261,7 +270,8 @@ class SvtCompatibilityOptions_Impl : public ConfigItem
bool _bUseOurTextWrapping,
bool _bConsiderWrappingStyle,
bool _bExpandWordSpace,
- bool _bProtectForm );
+ bool _bProtectForm,
+ bool _bMsWordCompTrailingBlanks );
inline bool IsUsePrtDevice() const { return m_aDefOptions.bUsePrtMetrics; }
inline bool IsAddSpacing() const { return m_aDefOptions.bAddSpacing; }
@@ -274,6 +284,7 @@ class SvtCompatibilityOptions_Impl : public ConfigItem
inline bool IsUseOurTextWrapping() const { return m_aDefOptions.bUseOurTextWrapping; }
inline bool IsConsiderWrappingStyle() const { return m_aDefOptions.bConsiderWrappingStyle; }
inline bool IsExpandWordSpace() const { return m_aDefOptions.bExpandWordSpace; }
+ inline bool IsMsWordCompTrailingBlanks() const { return m_aDefOptions.bMsWordCompTrailingBlanks; }
// private methods
@@ -351,6 +362,7 @@ SvtCompatibilityOptions_Impl::SvtCompatibilityOptions_Impl()
lValues[ nPosition++ ] >>= aItem.bUseOurTextWrapping;
lValues[ nPosition++ ] >>= aItem.bConsiderWrappingStyle;
lValues[ nPosition++ ] >>= aItem.bExpandWordSpace;
+ lValues[ nPosition++ ] >>= aItem.bMsWordCompTrailingBlanks;
m_aOptions.AppendEntry( aItem );
if ( !bDefaultFound && aItem.sName == COMPATIBILITY_DEFAULT_NAME )
@@ -397,6 +409,8 @@ void SvtCompatibilityOptions_Impl::SetDefault( const OUString & sName, bool bVal
m_aDefOptions.SetConsiderWrappingStyle( bValue );
else if ( sName == COMPATIBILITY_PROPERTYNAME_EXPANDWORDSPACE )
m_aDefOptions.SetExpandWordSpace( bValue );
+ else if ( sName == COMPATIBILITY_PROPERTYNAME_MSWORDTRAILINGBLANKS )
+ m_aDefOptions.SetExpandWordSpace( bValue );
}
// public method
@@ -437,6 +451,7 @@ void SvtCompatibilityOptions_Impl::ImplCommit()
lPropertyValues[ OFFSET_CONSIDERWRAPPINGSTYLE - 1 ].Name = sNode + PROPERTYNAME_CONSIDERWRAPSTYLE;
lPropertyValues[ OFFSET_EXPANDWORDSPACE - 1 ].Name = sNode + PROPERTYNAME_EXPANDWORDSPACE;
lPropertyValues[ OFFSET_PROTECTFORM - 1 ].Name = sNode + PROPERTYNAME_PROTECTFORM;
+ lPropertyValues[ OFFSET_MSWORDTRAILINGBLANKS - 1 ].Name = sNode + PROPERTYNAME_MSWORDTRAILINGBLANKS;
lPropertyValues[ OFFSET_MODULE - 1 ].Value <<= aItem.sModule;
lPropertyValues[ OFFSET_USEPRTMETRICS - 1 ].Value <<= aItem.bUsePrtMetrics;
@@ -451,6 +466,7 @@ void SvtCompatibilityOptions_Impl::ImplCommit()
lPropertyValues[ OFFSET_CONSIDERWRAPPINGSTYLE - 1 ].Value <<= aItem.bConsiderWrappingStyle;
lPropertyValues[ OFFSET_EXPANDWORDSPACE - 1 ].Value <<= aItem.bExpandWordSpace;
lPropertyValues[ OFFSET_PROTECTFORM - 1 ].Value <<= aItem.bProtectForm;
+ lPropertyValues[ OFFSET_MSWORDTRAILINGBLANKS - 1 ].Value <<= aItem.bMsWordCompTrailingBlanks;
SetSetProperties( SETNODE_ALLFILEFORMATS, lPropertyValues );
}
@@ -488,7 +504,8 @@ void SvtCompatibilityOptions_Impl::AppendItem( const OUString& _sName,
bool _bUseOurTextWrapping,
bool _bConsiderWrappingStyle,
bool _bExpandWordSpace,
- bool _bProtectForm )
+ bool _bProtectForm,
+ bool _bMsWordCompTrailingBlanks )
{
SvtCompatibilityEntry aItem( _sName, _sModule );
aItem.SetUsePrtMetrics( _bUsePrtMetrics );
@@ -503,6 +520,7 @@ void SvtCompatibilityOptions_Impl::AppendItem( const OUString& _sName,
aItem.SetConsiderWrappingStyle( _bConsiderWrappingStyle );
aItem.SetExpandWordSpace( _bExpandWordSpace );
aItem.SetProtectForm( _bProtectForm );
+ aItem.SetMsWordCompTrailingBlanks( _bMsWordCompTrailingBlanks );
m_aOptions.AppendEntry( aItem );
// default item reset?
@@ -577,6 +595,9 @@ void SvtCompatibilityOptions_Impl::impl_ExpandPropertyNames(
lDestination[nDestStep] = sFixPath;
lDestination[nDestStep] += PROPERTYNAME_EXPANDWORDSPACE;
++nDestStep;
+ lDestination[nDestStep] = sFixPath;
+ lDestination[nDestStep] += PROPERTYNAME_MSWORDTRAILINGBLANKS;
+ ++nDestStep;
}
}
@@ -631,14 +652,16 @@ void SvtCompatibilityOptions::AppendItem( const OUString& sName,
bool bUseOurTextWrapping,
bool bConsiderWrappingStyle,
bool bExpandWordSpace,
- bool bProtectForm )
+ bool bProtectForm,
+ bool bMsWordCompTrailingBlanks )
{
MutexGuard aGuard( GetOwnStaticMutex() );
m_pImpl->AppendItem(
sName, sModule, bUsePrtMetrics, bAddSpacing,
bAddSpacingAtPages, bUseOurTabStops, bNoExtLeading,
bUseLineSpacing, bAddTableSpacing, bUseObjPos,
- bUseOurTextWrapping, bConsiderWrappingStyle, bExpandWordSpace, bProtectForm );
+ bUseOurTextWrapping, bConsiderWrappingStyle, bExpandWordSpace,
+ bProtectForm, bMsWordCompTrailingBlanks );
}
bool SvtCompatibilityOptions::IsUsePrtDevice() const
@@ -707,6 +730,12 @@ bool SvtCompatibilityOptions::IsExpandWordSpace() const
return m_pImpl->IsExpandWordSpace();
}
+bool SvtCompatibilityOptions::IsMsWordCompTrailingBlanks() const
+{
+ MutexGuard aGuard( GetOwnStaticMutex() );
+ return m_pImpl->IsMsWordCompTrailingBlanks();
+}
+
Sequence< Sequence< PropertyValue > > SvtCompatibilityOptions::GetList() const
{
MutexGuard aGuard( GetOwnStaticMutex() );