dev/null |binary editeng/qa/unit/core-test.cxx | 144 ----------------------------------- editeng/source/editeng/editeng.cxx | 10 -- editeng/source/editeng/impedit.hxx | 7 - editeng/source/editeng/impedit2.cxx | 10 -- editeng/source/editeng/impedit3.cxx | 12 -- editeng/source/outliner/outliner.cxx | 10 -- include/editeng/editeng.hxx | 4 include/editeng/outliner.hxx | 4 include/svx/svdmodel.hxx | 4 sd/qa/unit/import-tests.cxx | 33 -------- sd/source/ui/docshell/docshel4.cxx | 16 --- sd/source/ui/view/Outliner.cxx | 1 svx/source/svdraw/svdetc.cxx | 1 svx/source/svdraw/svdmodel.cxx | 22 ----- 15 files changed, 6 insertions(+), 272 deletions(-)
New commits: commit fb4dd9667551a0ee162584e1cf1c10fd3451ea0b Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Fri Dec 21 22:32:54 2018 +0100 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Dec 27 17:17:40 2018 +0100 Revert tdf#115639 fixes This reverts commit 62cf24fbd48064e3ba309109a92a2c408ae654b6. This reverts commit ea4a9ca0a6ccf747a34997dc1d50efb82f9106ee. This reverts commit 2a664263d043f0327a92d5d5f7507bd10143fd31. Change-Id: If57c9f2aed054335d214ce87f17ab3f62dbebe65 Reviewed-on: https://gerrit.libreoffice.org/65645 Reviewed-by: Aron Budea <aron.bu...@collabora.com> Tested-by: Aron Budea <aron.bu...@collabora.com> diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index 6e27de1fd649..b16781ff9441 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -33,7 +33,6 @@ #include <svl/srchitem.hxx> #include <editeng/fontitem.hxx> #include <editeng/fhgtitem.hxx> -#include <editeng/adjustitem.hxx> #include <com/sun/star/text/textfield/Type.hpp> @@ -96,9 +95,6 @@ public: void testLargeParaCopyPaste(); - /// Test HoriAlignIgnoreTrailingWhitespace compatibility flag - void testHoriAlignIgnoreTrailingWhitespace(); - DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void ); CPPUNIT_TEST_SUITE(Test); @@ -118,7 +114,6 @@ public: CPPUNIT_TEST(testParaStartCopyPaste); CPPUNIT_TEST(testSectionAttributes); CPPUNIT_TEST(testLargeParaCopyPaste); - CPPUNIT_TEST(testHoriAlignIgnoreTrailingWhitespace); CPPUNIT_TEST_SUITE_END(); private: @@ -1838,145 +1833,6 @@ void Test::testLargeParaCopyPaste() CPPUNIT_ASSERT_EQUAL( aTenthPara, rDoc.GetParaAsString(sal_Int32(11)) ); } -void Test::testHoriAlignIgnoreTrailingWhitespace() -{ - // Create EditEngine's instance - EditEngine aEditEngine(mpItemPool); - - // Get EditDoc for current EditEngine's instance - EditDoc &rDoc = aEditEngine.GetEditDoc(); - - // Initially no text should be there - CPPUNIT_ASSERT_EQUAL(sal_uLong(0), rDoc.GetTextLen()); - CPPUNIT_ASSERT_EQUAL(OUString(), rDoc.GetParaAsString(sal_Int32(0))); - - // Set initial text - OUString aText = "Some text "; - sal_Int32 aTextLen = aText.getLength(); - aEditEngine.SetText(aText); - - // Assert changes - text insertion - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(aTextLen), rDoc.GetTextLen()); - CPPUNIT_ASSERT_EQUAL(aText, rDoc.GetParaAsString(static_cast<sal_Int32>(0))); - - // First test case: center alignment with compatibility option enabled - { - aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(true); - std::unique_ptr<SfxItemSet> pSet(new SfxItemSet(aEditEngine.GetEmptyItemSet())); - pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST )); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pSet->Count()); - - // Select all paragraphs and apply changes - ESelection aSelection(0, 0, 0, aTextLen); - aEditEngine.QuickSetAttribs(*pSet, aSelection); - - // Use a one line paragraph - aEditEngine.SetPaperSize(Size(10000, 6000)); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aEditEngine.GetLineCount(0)); - - // Check horizontal position - ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0]; - EditLine* pLine = &pParaPortion->GetLines()[0]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(4527), pLine->GetStartPosX(), 100); - } - - // Second test case: center alignment with compatibility option disabled - { - aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(false); - std::unique_ptr<SfxItemSet> pSet(new SfxItemSet(aEditEngine.GetEmptyItemSet())); - pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST )); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pSet->Count()); - - // Select all paragraphs and apply changes - ESelection aSelection(0, 0, 0, aTextLen); - aEditEngine.QuickSetAttribs(*pSet, aSelection); - - // Use a one line paragraph - aEditEngine.SetPaperSize(Size(10000, 6000)); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aEditEngine.GetLineCount(0)); - - // Check horizontal position - ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0]; - EditLine* pLine = &pParaPortion->GetLines()[0]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(4407), pLine->GetStartPosX(), 100); - } - - // Third test case: right alignment with compatibility option enabled - { - aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(true); - std::unique_ptr<SfxItemSet> pSet(new SfxItemSet(aEditEngine.GetEmptyItemSet())); - pSet->Put(SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST )); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pSet->Count()); - - // Select all paragraphs and apply changes - ESelection aSelection(0, 0, 0, aTextLen); - aEditEngine.QuickSetAttribs(*pSet, aSelection); - - // Use a one line paragraph - aEditEngine.SetPaperSize(Size(10000, 6000)); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aEditEngine.GetLineCount(0)); - - // Check horizontal position - ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0]; - EditLine* pLine = &pParaPortion->GetLines()[0]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(9054), pLine->GetStartPosX(), 100); - } - - // Fourth test case: right alignment with compatibility option disabled - { - aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(false); - std::unique_ptr<SfxItemSet> pSet(new SfxItemSet(aEditEngine.GetEmptyItemSet())); - pSet->Put(SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST )); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pSet->Count()); - - // Select all paragraphs and apply changes - ESelection aSelection(0, 0, 0, aTextLen); - aEditEngine.QuickSetAttribs(*pSet, aSelection); - - // Use a one line paragraph - aEditEngine.SetPaperSize(Size(10000, 6000)); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aEditEngine.GetLineCount(0)); - - // Check horizontal position - ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0]; - EditLine* pLine = &pParaPortion->GetLines()[0]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(8815), pLine->GetStartPosX(), 100); - } - - // Test multiple paragraph case - { - // Set initial text - aText = "Some text \nMore Text "; - aTextLen = aText.getLength(); - aEditEngine.SetText(aText); - - // Assert changes - text insertion - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(aTextLen - 1), rDoc.GetTextLen()); - CPPUNIT_ASSERT_EQUAL(OUString("Some text "), rDoc.GetParaAsString(static_cast<sal_Int32>(0))); - CPPUNIT_ASSERT_EQUAL(OUString("More Text "), rDoc.GetParaAsString(static_cast<sal_Int32>(1))); - - aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(true); - std::unique_ptr<SfxItemSet> pSet(new SfxItemSet(aEditEngine.GetEmptyItemSet())); - pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST )); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pSet->Count()); - - // Select all paragraphs and apply changes - ESelection aSelection(0, 0, 0, aTextLen); - aEditEngine.QuickSetAttribs(*pSet, aSelection); - - // Get one line paragraphs - aEditEngine.SetPaperSize(Size(10000, 6000)); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aEditEngine.GetLineCount(0)); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aEditEngine.GetLineCount(1)); - - // Check horizontal position - ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(4527), pParaPortion->GetLines()[0].GetStartPosX(), 100); - pParaPortion = aEditEngine.GetParaPortions()[1]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(8815), pParaPortion->GetLines()[0].GetStartPosX(), 100); - } -} - CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index d840584f2739..a3679f5809b1 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2804,16 +2804,6 @@ bool EditEngine::IsPageOverflow() { return pImpEditEngine->IsPageOverflow(); } -void EditEngine::SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled) -{ - pImpEditEngine->SetHoriAlignIgnoreTrailingWhitespace(bEnabled); -} - -bool EditEngine::IsHoriAlignIgnoreTrailingWhitespace() const -{ - return pImpEditEngine->IsHoriAlignIgnoreTrailingWhitespace(); -} - EFieldInfo::EFieldInfo() { } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index e80ab97cf918..d9ec9a17136a 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -535,7 +535,6 @@ private: bool bFirstWordCapitalization:1; // specifies if auto-correction should capitalize the first word or not bool mbLastTryMerge:1; bool mbReplaceLeadingSingleQuotationMark:1; - bool mbHoriAlignIgnoreTrailingWhitespace:1; bool mbNbspRunNext; // can't be a bitfield as it is passed as bool& @@ -833,7 +832,7 @@ public: sal_uInt32 GetTextHeight() const; sal_uInt32 GetTextHeightNTP() const; sal_uInt32 CalcTextWidth( bool bIgnoreExtraSpace ); - sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, bool bIgnoreExtraSpace, bool bIgnoreTrailingWhiteSpaces = false ); + sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, bool bIgnoreExtraSpace ); sal_Int32 GetLineCount( sal_Int32 nParagraph ) const; sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const; void GetLineBoundaries( /*out*/sal_Int32& rStart, /*out*/sal_Int32& rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const; @@ -1064,10 +1063,6 @@ public: bool IsNbspRunNext() const { return mbNbspRunNext; } void Dispose(); - - // tdf#115639 compatibility flag - void SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled) { mbHoriAlignIgnoreTrailingWhitespace = bEnabled; } - bool IsHoriAlignIgnoreTrailingWhitespace() const { return mbHoriAlignIgnoreTrailingWhitespace; } }; inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM ) diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index c39295b11a2d..653d552823ac 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -108,7 +108,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : bFirstWordCapitalization(true), mbLastTryMerge(false), mbReplaceLeadingSingleQuotationMark(true), - mbHoriAlignIgnoreTrailingWhitespace(false), mbNbspRunNext(false) { pEditEngine = pEE; @@ -3165,7 +3164,7 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( bool bIgnoreExtraSpace ) return (sal_uInt32)nMaxWidth; } -sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, bool bIgnoreExtraSpace, bool bIgnoreTrailingWhiteSpaces ) +sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, bool bIgnoreExtraSpace ) { sal_Int32 nPara = GetEditDoc().GetPos( pPortion->GetNode() ); @@ -3194,7 +3193,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, break; case PortionKind::TEXT: { - if ( (( eJustification != SvxAdjust::Block ) || ( !bIgnoreExtraSpace )) && !bIgnoreTrailingWhiteSpaces ) + if ( ( eJustification != SvxAdjust::Block ) || ( !bIgnoreExtraSpace ) ) { nWidth += rTextPortion.GetSize().Width(); } @@ -3204,10 +3203,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, SeekCursor( pPortion->GetNode(), nPos+1, aTmpFont ); aTmpFont.SetPhysFont( GetRefDevice() ); ImplInitDigitMode(GetRefDevice(), aTmpFont.GetLanguage()); - if (bIgnoreTrailingWhiteSpaces) - nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString().trim(), nPos, rTextPortion.GetLen() ).Width(); - else - nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString(), nPos, rTextPortion.GetLen() ).Width(); + nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString(), nPos, rTextPortion.GetLen() ).Width(); } } break; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index c7557a47375e..352386410d5f 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1509,11 +1509,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) { case SvxAdjust::Center: { - long n; - if(IsHoriAlignIgnoreTrailingWhitespace()) - n = ( nMaxLineWidth - CalcLineWidth( pParaPortion, pLine, false, true ) ) / 2; - else - n = ( nMaxLineWidth - aTextSize.Width() ) / 2; + long n = ( nMaxLineWidth - aTextSize.Width() ) / 2; n += nStartX; // Indentation is kept. pLine->SetStartPosX( n ); } @@ -1522,11 +1518,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) { // For automatically wrapped lines, which has a blank at the end // the blank must not be displayed! - long n; - if(IsHoriAlignIgnoreTrailingWhitespace()) - n = nMaxLineWidth - CalcLineWidth( pParaPortion, pLine, false, true ); - else - n = nMaxLineWidth - aTextSize.Width(); + long n = nMaxLineWidth - aTextSize.Width(); n += nStartX; // Indentation is kept. pLine->SetStartPosX( n ); } diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 7e65100b03f7..27ffe02353db 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -366,16 +366,6 @@ sal_Int32 Outliner::GetBulletsNumberingStatus() const : 2; } -void Outliner::SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled) -{ - pEditEngine->SetHoriAlignIgnoreTrailingWhitespace( bEnabled ); -} - -bool Outliner::IsHoriAlignIgnoreTrailingWhitespace() const -{ - return pEditEngine->IsHoriAlignIgnoreTrailingWhitespace(); -} - OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32 nCount ) const { if ( static_cast<sal_uLong>(nStartPara) + nCount > diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index da55da70e931..7fa9ebb910a6 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -620,10 +620,6 @@ public: sal_Int32 GetOverflowingLineNum() const; void ClearOverflowingParaNum(); bool IsPageOverflow(); - - // tdf#115639 compatibility flag - void SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled); - bool IsHoriAlignIgnoreTrailingWhitespace() const; }; #endif // INCLUDED_EDITENG_EDITENG_HXX diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index c303e1a84522..24ec0ec0f8a4 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -999,10 +999,6 @@ public: // convenient method to determine the bullets/numbering status for all paragraphs sal_Int32 GetBulletsNumberingStatus() const; - - // tdf#115639 compatibility flag - void SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled); - bool IsHoriAlignIgnoreTrailingWhitespace() const; }; #endif diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 5ea384c5ed6b..4a38209b561d 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -538,10 +538,6 @@ public: void SetAnchoredTextOverflowLegacy(bool bEnabled); bool IsAnchoredTextOverflowLegacy() const; - // tdf#115639 compatibility flag - void SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled); - bool IsHoriAlignIgnoreTrailingWhitespace() const; - void ReformatAllTextObjects(); SdrOutliner* createOutliner( OutlinerMode nOutlinerMode ); diff --git a/sd/qa/unit/data/odp/tdf115639.odp b/sd/qa/unit/data/odp/tdf115639.odp deleted file mode 100755 index b732e4e7652b..000000000000 Binary files a/sd/qa/unit/data/odp/tdf115639.odp and /dev/null differ diff --git a/sd/qa/unit/data/ppt/tdf115639.ppt b/sd/qa/unit/data/ppt/tdf115639.ppt deleted file mode 100755 index dade453bfeee..000000000000 Binary files a/sd/qa/unit/data/ppt/tdf115639.ppt and /dev/null differ diff --git a/sd/qa/unit/data/pptx/tdf115639.pptx b/sd/qa/unit/data/pptx/tdf115639.pptx deleted file mode 100755 index 7e00b60cb397..000000000000 Binary files a/sd/qa/unit/data/pptx/tdf115639.pptx and /dev/null differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index f65322707958..c8fcc4584be3 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -170,7 +170,6 @@ public: void testTdf51340(); void testTdf115394(); void testTdf115394PPT(); - void testTdf115639(); void testTdf116899(); void testTdf116266(); void testTdf114821(); @@ -252,7 +251,6 @@ public: CPPUNIT_TEST(testTdf51340); CPPUNIT_TEST(testTdf115394); CPPUNIT_TEST(testTdf115394PPT); - CPPUNIT_TEST(testTdf115639); CPPUNIT_TEST(testTdf116899); CPPUNIT_TEST(testTdf116266); CPPUNIT_TEST(testTdf114821); @@ -2391,37 +2389,6 @@ void SdImportTest::testTdf115394PPT() xDocShRef->DoClose(); } - -void SdImportTest::testTdf115639() -{ - // Check whether the new compatibility option is loaded correctly - // For PPTX we have the flag enabled by default - { - sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115639.pptx"), PPTX); - SdDrawDocument *pDoc = xDocShRef->GetDoc(); - CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr ); - CPPUNIT_ASSERT( pDoc->IsHoriAlignIgnoreTrailingWhitespace() ); - } - - // For PPT we have the flag enabled by default - { - sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf115639.ppt"), PPT); - SdDrawDocument *pDoc = xDocShRef->GetDoc(); - CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr ); - CPPUNIT_ASSERT( pDoc->IsHoriAlignIgnoreTrailingWhitespace() ); - xDocShRef->DoClose(); - } - - // For ODP we have the flag disabled by default - { - sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf115639.odp"), ODP); - SdDrawDocument *pDoc = xDocShRef->GetDoc(); - CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr ); - CPPUNIT_ASSERT( !pDoc->IsHoriAlignIgnoreTrailingWhitespace() ); - xDocShRef->DoClose(); - } -} - void SdImportTest::testTdf116899() { // This is a PPT created in Impress and roundtripped in PP, the key times become [1, -1] in PP, diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index e9c9193ac3a1..aab8e5b9f747 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -407,14 +407,6 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, mpDoc->SetSummationOfParagraphs(); } - // Set this flag for MSO formats - if (aFilterName.startsWith("MS PowerPoint 97") || - aFilterName.startsWith("Impress MS PowerPoint 2007 XML") || - aFilterName.startsWith("Impress Office Open XML")) - { - mpDoc->SetHoriAlignIgnoreTrailingWhitespace(true); - } - const bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition); SfxItemSet* pSet = rMedium.GetItemSet(); @@ -510,14 +502,6 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) bRet = SdGRFFilter( rMedium, *this ).Import(); } - // Set this flag for MSO formats - if (aFilterName.startsWith("MS PowerPoint 97") || - aFilterName.startsWith("Impress MS PowerPoint 2007 XML") || - aFilterName.startsWith("Impress Office Open XML")) - { - mpDoc->SetHoriAlignIgnoreTrailingWhitespace(true); - } - FinishedLoading(); // tell SFX to change viewshell when in preview mode diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index e6402b2dc6ce..2609e6e65bce 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -226,7 +226,6 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode ) SetHyphenator( xHyphenator ); SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); - SetHoriAlignIgnoreTrailingWhitespace( pDoc->IsHoriAlignIgnoreTrailingWhitespace() ); } /// Nothing spectacular in the destructor. diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 4f6d9a44a891..807e31fc6da9 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -344,7 +344,6 @@ SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rModel) pOutl->SetAsianCompressionMode(rModel.GetCharCompressType()); pOutl->SetKernAsianPunctuation(rModel.IsKernAsianPunctuation()); pOutl->SetAddExtLeading(rModel.IsAddExtLeading()); - pOutl->SetHoriAlignIgnoreTrailingWhitespace(rModel.IsHoriAlignIgnoreTrailingWhitespace()); return pOutl; } diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index e7cce55439a6..95532a7b6b34 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -108,7 +108,6 @@ struct SdrModelImpl SdrUndoFactory* mpUndoFactory; bool mbAnchoredTextOverflowLegacy; // tdf#99729 compatibility flag - bool mbHoriAlignIgnoreTrailingWhitespace; // tdf#115639 compatibility flag }; @@ -119,7 +118,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe mpImpl->mpUndoManager=nullptr; mpImpl->mpUndoFactory=nullptr; mpImpl->mbAnchoredTextOverflowLegacy = false; - mpImpl->mbHoriAlignIgnoreTrailingWhitespace = false; mbInDestruction = false; aObjUnit=SdrEngineDefaults::GetMapFraction(); eObjUnit=SdrEngineDefaults::GetMapUnit(); @@ -1892,17 +1890,6 @@ bool SdrModel::IsAnchoredTextOverflowLegacy() const return mpImpl->mbAnchoredTextOverflowLegacy; } -void SdrModel::SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled) -{ - mpImpl->mbHoriAlignIgnoreTrailingWhitespace = bEnabled; - pDrawOutliner->SetHoriAlignIgnoreTrailingWhitespace(bEnabled); -} - -bool SdrModel::IsHoriAlignIgnoreTrailingWhitespace() const -{ - return mpImpl->mbHoriAlignIgnoreTrailingWhitespace; -} - void SdrModel::ReformatAllTextObjects() { ImpReformatAllTextObjects(); @@ -1952,13 +1939,6 @@ void SdrModel::ReadUserDataSequenceValue(const css::beans::PropertyValue* pValue mpImpl->mbAnchoredTextOverflowLegacy = bBool; } } - if (pValue->Name == "HoriAlignIgnoreTrailingWhitespace") - { - if (pValue->Value >>= bBool) - { - SetHoriAlignIgnoreTrailingWhitespace(bBool); - } - } } template <typename T> @@ -1971,8 +1951,6 @@ void SdrModel::WriteUserDataSequence(css::uno::Sequence < css::beans::PropertyVa { std::vector< std::pair< OUString, Any > > aUserData; addPair(aUserData, "AnchoredTextOverflowLegacy", IsAnchoredTextOverflowLegacy()); - if (IsHoriAlignIgnoreTrailingWhitespace()) - addPair(aUserData, "HoriAlignIgnoreTrailingWhitespace", IsHoriAlignIgnoreTrailingWhitespace()); const sal_Int32 nOldLength = rValues.getLength(); rValues.realloc(nOldLength + aUserData.size()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits