[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Dec 26 02:01:43 PST 2014


 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    8 ++++----
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit ad3fcbb57f543c5d188c434a08ca58d7512232d1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Dec 26 11:01:06 2014 +0100

    writerfilter: turn RTFBmpStyle into a C++11 scoped enumeration
    
    Change-Id: Idbb1b2f2573d5c807d647bc1ecfee3da82be5574

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 66afbb4..c8ba4f4 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -776,7 +776,7 @@ RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing
         pExtHeader = nullptr;
     OUString aGraphicUrl = m_pGraphicHelper->importGraphicObject(xInputStream, pExtHeader);
 
-    if (m_aStates.top().aPicture.nStyle != BMPSTYLE_NONE)
+    if (m_aStates.top().aPicture.eStyle != RTFBmpStyle::NONE)
     {
         // In case of PNG/JPEG, the real size is known, don't use the values
         // provided by picw and pich.
@@ -3294,10 +3294,10 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         // Noop, this is the default in Writer.
         break;
     case RTF_PNGBLIP:
-        m_aStates.top().aPicture.nStyle = BMPSTYLE_PNG;
+        m_aStates.top().aPicture.eStyle = RTFBmpStyle::PNG;
         break;
     case RTF_JPEGBLIP:
-        m_aStates.top().aPicture.nStyle = BMPSTYLE_JPEG;
+        m_aStates.top().aPicture.eStyle = RTFBmpStyle::JPEG;
         break;
     case RTF_POSYT:
         m_aStates.top().aFrame.setSprm(NS_ooxml::LN_CT_FramePr_yAlign, NS_ooxml::LN_Value_doc_ST_YAlign_top);
@@ -6208,7 +6208,7 @@ RTFPicture::RTFPicture()
       nCropL(0),
       nCropR(0),
       eWMetafile(0),
-      nStyle(BMPSTYLE_NONE)
+      eStyle(RTFBmpStyle::NONE)
 {
 }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 96a0e9b..86f694f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -69,11 +69,11 @@ enum RTFFormFieldTypes
     FORMFIELD_LIST
 };
 
-enum RTFBmpStyles
+enum class RTFBmpStyle
 {
-    BMPSTYLE_NONE,
-    BMPSTYLE_PNG,
-    BMPSTYLE_JPEG
+    NONE,
+    PNG,
+    JPEG
 };
 
 enum RTFFieldStatus
@@ -173,7 +173,7 @@ public:
     sal_uInt16 nScaleX, nScaleY;
     short nCropT, nCropB, nCropL, nCropR;
     sal_uInt16 eWMetafile;
-    RTFBmpStyles nStyle;
+    RTFBmpStyle eStyle;
 };
 
 class RTFParserState;


More information about the Libreoffice-commits mailing list