[Libreoffice-commits] core.git: 2 commits - editeng/source filter/source include/editeng offapi/com
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 12 13:35:57 UTC 2019
editeng/source/items/frmitems.cxx | 11 +++++++++++
filter/source/graphicfilter/eps/eps.cxx | 10 +++++-----
include/editeng/frmdir.hxx | 5 ++++-
include/editeng/frmdiritem.hxx | 1 +
offapi/com/sun/star/text/WritingMode2.idl | 7 +++++++
5 files changed, 28 insertions(+), 6 deletions(-)
New commits:
commit db346dde6179e7414289681d91b153a6ed259d05
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Feb 12 12:04:19 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Feb 12 14:35:44 2019 +0100
sw btlr wrting mode: implement document model
btLr is not a writing mode that would be used by any natural language,
the reason it makes sense to support this is that the Word UI makes it
easy to rotate text 90 degrees counter-clockwise for Latin (lrtb) text,
which then triggers this feature. This is common in the first column of
tables to create text that looks like a row header.
An import-time workaround to handle <w:textDirection w:val="btLr"/> was
added in commit c2d1ab73165d5fa19037e6244b1d634c6c455efc (tentative fix
for fdo#30474#, 2010-11-26), but rotating text at a text portion level
has various unwanted side effects, just counting my own fixes, I had 7
workarounds on top of that workaround to hide problems where the root
cause is this missing writing direction in sw core.
This commit just extends the sw core doc model, everything else is to be
done in follow-up commits.
Change-Id: I89e02cd4b40de78699dbf14885fc128e870de3b8
Reviewed-on: https://gerrit.libreoffice.org/67717
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 622e557a0517..2d6c98d59531 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3917,4 +3917,15 @@ bool SvxFrameDirectionItem::QueryValue( css::uno::Any& rVal,
return bRet;
}
+void SvxFrameDirectionItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("SvxFrameDirectionItem"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_nWhich"),
+ BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(
+ pWriter, BAD_CAST("m_nValue"),
+ BAD_CAST(OString::number(static_cast<sal_Int16>(GetValue())).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/frmdir.hxx b/include/editeng/frmdir.hxx
index b0ada2cce30a..f8801cc77020 100644
--- a/include/editeng/frmdir.hxx
+++ b/include/editeng/frmdir.hxx
@@ -48,7 +48,10 @@ enum class SvxFrameDirection
Vertical_LR_TB = css::text::WritingMode2::TB_LR,
/** Use the value from the environment, can only be used in frames. */
- Environment = css::text::WritingMode2::CONTEXT
+ Environment = css::text::WritingMode2::CONTEXT,
+
+ /** Vertical, from bottom to top, from left to right. */
+ Vertical_LR_BT = css::text::WritingMode2::BT_LR,
};
const char* getFrmDirResId(size_t nIndex);
diff --git a/include/editeng/frmdiritem.hxx b/include/editeng/frmdiritem.hxx
index 929cbc5b0b3e..1ec32483077d 100644
--- a/include/editeng/frmdiritem.hxx
+++ b/include/editeng/frmdiritem.hxx
@@ -58,6 +58,7 @@ public:
}
SvxFrameDirectionItem(SvxFrameDirectionItem const &) = default;
// SfxPoolItem copy function dichotomy
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
};
#endif // INCLUDED_EDITENG_FRMDIRITEM_HXX
diff --git a/offapi/com/sun/star/text/WritingMode2.idl b/offapi/com/sun/star/text/WritingMode2.idl
index 4f1800b06a0d..1edc467e7a0f 100644
--- a/offapi/com/sun/star/text/WritingMode2.idl
+++ b/offapi/com/sun/star/text/WritingMode2.idl
@@ -76,6 +76,13 @@ published constants WritingMode2
/** obtain actual writing mode from the context of the object.
*/
const short CONTEXT = 4;
+
+ /** text within a line is written bottom-to-top. Lines and blocks are
+ placed left-to-right.
+
+ @since LibreOffice 6.3
+ */
+ const short BT_LR = 5;
};
commit 006734562be1fec6b8fa4ff291c51b6043265653
Author: Salih Sariyar <994.salih at gmail.com>
AuthorDate: Mon Feb 11 15:39:02 2019 +0300
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Feb 12 14:35:34 2019 +0100
tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I1d54d8cec7f1157ea1c3c024a38a1a70210f98b0
Reviewed-on: https://gerrit.libreoffice.org/67687
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Jenkins
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index b5e953fd7da8..9429f64aad61 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -99,7 +99,7 @@ class PSWriter
{
private:
bool mbStatus;
- sal_uLong mnLevelWarning; // number of embedded eps files which was not exported
+ bool mbLevelWarning; // if there any embedded eps file which was not exported
sal_uInt32 mnLatestPush; // offset to streamposition, where last push was done
long mnLevel; // dialog options
@@ -236,7 +236,7 @@ public:
PSWriter::PSWriter()
: mbStatus(false)
- , mnLevelWarning(0)
+ , mbLevelWarning(false)
, mnLatestPush(0)
, mnLevel(0)
, mbGrayScale(false)
@@ -286,7 +286,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
mbStatus = true;
mnPreview = 0;
- mnLevelWarning = 0;
+ mbLevelWarning = false;
mnLatestPush = 0xEFFFFFFE;
if ( pFilterConfigItem )
@@ -437,7 +437,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
else
mbStatus = false;
- if ( mbStatus && mnLevelWarning && pFilterConfigItem )
+ if ( mbStatus && mbLevelWarning && pFilterConfigItem )
{
std::locale loc = Translate::Create("flt");
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
@@ -1125,7 +1125,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if ( k != '1' )
{
bLevelConflict = true;
- mnLevelWarning++;
+ mbLevelWarning = true;
}
break;
}
More information about the Libreoffice-commits
mailing list