summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-02-17 06:35:29 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-02-17 07:50:00 +0100
commit1da3a3cb74a415a76fa547ef0c8f61780e260e7f (patch)
tree0367d452050d136d6612ba708038fb9d4584987b /sd/source/ui/docshell
parent71545d500e4b88e960a73d499328504ce99397a8 (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. Change-Id: Ie22233d33a25e605de46120bfc2195038dffd63c Reviewed-on: https://gerrit.libreoffice.org/49889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 2d462a44ddb1..2685d68d3c41 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