summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-02-17 06:35:29 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-25 20:10:48 +0200
commit2a664263d043f0327a92d5d5f7507bd10143fd31 (patch)
tree5503172b1265628545547d70a1a218a747766e31 /sd/source
parenta4c6b3fa56ef6b8310f94eac90384243355046f6 (diff)
tdf#115639: Align right/center with trailing spaces the same as MS PowerPoint
* Add HoriAlignIgnoreTrailingWhitespace compatibility option. ** For MSO file formats it is set to true ** For ODP format it's set to false by default ** The flag is saved to ODP format as user data if the document comes from an MSO format. Reviewed-on: https://gerrit.libreoffice.org/49889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 1da3a3cb74a415a76fa547ef0c8f61780e260e7f) Change-Id: Ie22233d33a25e605de46120bfc2195038dffd63c
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx16
-rw-r--r--sd/source/ui/view/Outliner.cxx1
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index b5d3edb68e59..a6fa0870ae43 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -406,6 +406,14 @@ 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();
@@ -495,6 +503,14 @@ 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 2609e6e65bce..e6402b2dc6ce 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -226,6 +226,7 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode )
SetHyphenator( xHyphenator );
SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
+ SetHoriAlignIgnoreTrailingWhitespace( pDoc->IsHoriAlignIgnoreTrailingWhitespace() );
}
/// Nothing spectacular in the destructor.