summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-05-27 13:00:10 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-06-08 14:50:55 +0200
commit95ebd24a629b4c8cd62cc20c0701683512cc8fa0 (patch)
tree8bdeab41e8b4d0092f639e62fd3e20ae8243f199 /sd/source
parentc4f615b359be56e88e4fbf9aaaf30affb29d57e2 (diff)
editengine-columns: ODF support [API CHANGE]
This uses existing ODF markup, as used by Writer's text frame: style::columns child element of style:graphic-properties, its fo:column-count and fo:column-gap attributes. No ODF extension is required. Since currently only columns with same width and spacing are implemented, without additional settings, style:column child elements are exported, but ignored on import. This adds new property to css::drawing::TextProperties service: TextColumns (of type css::text::XTextColumns). Change-Id: I7e63293e5814b281ceec8a9632e696322d3629e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116035 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/stlsheet.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 93bc3f0c8ac0..5b79e7333176 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1186,6 +1186,19 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
return PropertyState_AMBIGUOUS_VALUE;
}
}
+ else if (pEntry->nWID == OWN_ATTR_TEXTCOLUMNS)
+ {
+ const SfxItemSet& rSet = GetItemSet();
+
+ const auto eState1 = rSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false);
+ const auto eState2 = rSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false);
+ if (eState1 == SfxItemState::SET || eState2 == SfxItemState::SET)
+ return PropertyState_DIRECT_VALUE;
+ else if (eState1 == SfxItemState::DEFAULT && eState2 == SfxItemState::DEFAULT)
+ return PropertyState_DEFAULT_VALUE;
+ else
+ return PropertyState_AMBIGUOUS_VALUE;
+ }
else
{
SfxItemSet &rStyleSet = GetItemSet();