summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorAttila Szűcs <attila.szucs@collabora.com>2024-02-08 15:46:07 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-16 13:07:18 +0100
commitf846efa507252b0584d2753a251f2dd99c34541a (patch)
treea474277fabbca8c5687e1c5e1def2fb548d41760 /editeng
parent4897792975453024db8369c3d8c5f2e65c956d73 (diff)
tdf#67347 pptx import: stacked text, minimal impl.
Display Stacked text, and Import/Export Stacked property from/to pptx. It is a minimal implementation, it does not import/export to .odp, there is no user interface to set this property. Multiline Stacked text is rendered as 1 line text. XML_wordArtVertRtl is mapped to XML_wordArtVert. Editing of text containing space character seems to not work correctly. Change-Id: I535da45e3a2f2d1550bad2a40e9909e0d561d0ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163121 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx9
-rw-r--r--editeng/source/items/frmitems.cxx6
2 files changed, 15 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 51c922ce0b3f..54a7745eca7a 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -42,6 +42,7 @@
#include <editeng/wghtitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/langitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <editeng/scriptspaceitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <editeng/numitem.hxx>
@@ -694,6 +695,14 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
return false;
}
+ //If the paragraph SvxFrameDirection is Stacked, use ONECHARPERLINE
+ const SvxFrameDirectionItem* pFrameDirItem = &GetParaAttrib(nPara, EE_PARA_WRITINGDIR);
+ bool bStacked = pFrameDirItem->GetValue() == SvxFrameDirection::Stacked;
+ if (bStacked)
+ maStatus.TurnOnFlags(EEControlBits::ONECHARPERLINE);
+ else
+ maStatus.TurnOffFlags(EEControlBits::ONECHARPERLINE);
+
// Initialization...
// Always format for 100%:
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index e84ae2140e33..fa393ff4ccd8 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -4675,6 +4675,9 @@ bool SvxFrameDirectionItem::PutValue( const css::uno::Any& rVal,
case text::WritingMode2::PAGE:
SetValue( SvxFrameDirection::Environment );
break;
+ case text::WritingMode2::STACKED:
+ SetValue(SvxFrameDirection::Stacked);
+ break;
default:
bRet = false;
break;
@@ -4714,6 +4717,9 @@ bool SvxFrameDirectionItem::QueryValue( css::uno::Any& rVal,
case SvxFrameDirection::Environment:
nVal = text::WritingMode2::PAGE;
break;
+ case SvxFrameDirection::Stacked:
+ nVal = text::WritingMode2::STACKED;
+ break;
default:
OSL_FAIL("Unknown SvxFrameDirection value!");
bRet = false;