summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorsushil_shinde <sushilshinde@libreoffice.org>2014-09-21 11:55:14 +0530
committerKohei Yoshida <libreoffice@kohei.us>2014-09-24 00:44:48 +0000
commit0a32edcdc2bda75a7536ce7f88c91cbc56e7afb1 (patch)
tree2ec2b6ce9dd5a08d4891021494f1effe252b3a10 /oox
parent2c7595a911c3b0102162c2ad9cef4a84538b66f8 (diff)
fdo#84028 : Preserved all caps property for text.
1. All capital letters were exported as small letters. 2. Problem was 'cap' property was not exported for 'rPr' in drawingml. Change-Id: I81bfb418f773aa88118b22550eea2b3ec2833ea9 Reviewed-on: https://gerrit.libreoffice.org/11563 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8436c9bb94ce..0ca30540dc0e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -62,6 +62,7 @@
#include <com/sun/star/text/XTextContent.hpp>
#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
#include <tools/stream.hxx>
#include <unotools/fontdefs.hxx>
#include <vcl/cvtgrf.hxx>
@@ -1188,6 +1189,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
const char* italic = NULL;
const char* underline = NULL;
const char* strikeout = NULL;
+ const char* cap = NULL;
sal_Int32 nSize = 1800;
sal_Int32 nCharEscapement = 0;
@@ -1313,6 +1315,19 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
nSize = (nSize / 0.58);
}
+ if( GETA( CharCaseMap ) )
+ {
+ switch ( *((sal_Int16*) mAny.getValue()) )
+ {
+ case CaseMap::UPPERCASE :
+ cap = "all";
+ break;
+ case CaseMap::SMALLCAPS :
+ cap = "small";
+ break;
+ }
+ }
+
mpFS->startElementNS( XML_a, XML_rPr,
XML_b, bold,
XML_i, italic,
@@ -1321,6 +1336,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
XML_strike, strikeout,
XML_u, underline,
XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ),
+ XML_cap, cap,
FSEND );
// mso doesn't like text color to be placed after typeface