[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/frameworks] filters/libmsooxml: Port filters/libmsooxml to Qt5/KF5.
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2015-03-23 2:22:20
Message-ID: E1YZs0S-0006Ci-Vf () scm ! kde ! org
[Download RAW message or body]

Git commit ac1ca3135ae441d2b11474aa3cbf219cab53522c by Inge Wallin.
Committed on 23/03/2015 at 02:20.
Pushed by ingwa into branch 'frameworks'.

Port filters/libmsooxml to Qt5/KF5.

This is the actual port, but it's not enabled yet in
CalligraProducts.cmake. The reason for that is that libs/main is not yet
ported, and we need to link against that. As far as I understand, once that is
done, the only thing needed will be to move the LIBMSOOXML product from
UNPORTED to PORTED.

M  +1    -1    filters/libmsooxml/CMakeLists.txt
M  +2    -1    filters/libmsooxml/MsooXmlCommonReader.cpp
M  +1    -0    filters/libmsooxml/MsooXmlDiagramReader_p.h
M  +8    -3    filters/libmsooxml/MsooXmlUtils.cpp
M  +3    -0    filters/libmsooxml/PredefinedShapeHelper.cpp

http://commits.kde.org/calligra/ac1ca3135ae441d2b11474aa3cbf219cab53522c

diff --git a/filters/libmsooxml/CMakeLists.txt b/filters/libmsooxml/CMakeLists.txt
index 5c57396..4c0807b 100644
--- a/filters/libmsooxml/CMakeLists.txt
+++ b/filters/libmsooxml/CMakeLists.txt
@@ -41,7 +41,7 @@ set(msooxml_LIB_SRCS
 
 add_library(komsooxml SHARED ${msooxml_LIB_SRCS})
 
-target_link_libraries(komsooxml mso koodf2 koodf komain)
+target_link_libraries(komsooxml mso koodf2 koodf komain KF5::Archive)
 if(Qca-qt5_FOUND)
    target_link_libraries(komsooxml qca-qt5)
 endif()
diff --git a/filters/libmsooxml/MsooXmlCommonReader.cpp \
b/filters/libmsooxml/MsooXmlCommonReader.cpp index 0df07a9..4e99c32 100644
--- a/filters/libmsooxml/MsooXmlCommonReader.cpp
+++ b/filters/libmsooxml/MsooXmlCommonReader.cpp
@@ -123,6 +123,8 @@ void MsooXmlCommonReader::popCurrentDrawStyle()
     m_drawStyleStack.removeLast();
 }
 
+Q_GLOBAL_STATIC(MediaTypeMap, g_mediaTypes)
+
 void MsooXmlCommonReader::addManifestEntryForFile(const QString& path)
 {
     if (path.isEmpty())
@@ -134,7 +136,6 @@ void MsooXmlCommonReader::addManifestEntryForFile(const QString& \
path)  }
     const int lastDot = path.lastIndexOf(QLatin1Char('.'));
     const QByteArray ext(path.mid(lastDot + 1).toLatin1().toLower());
-    K_GLOBAL_STATIC(MediaTypeMap, g_mediaTypes)
     manifest->addManifestEntry(path, g_mediaTypes->value(ext));
 }
 
diff --git a/filters/libmsooxml/MsooXmlDiagramReader_p.h \
b/filters/libmsooxml/MsooXmlDiagramReader_p.h index 9f516b0..967c6b9 100644
--- a/filters/libmsooxml/MsooXmlDiagramReader_p.h
+++ b/filters/libmsooxml/MsooXmlDiagramReader_p.h
@@ -34,6 +34,7 @@
 #include <QPair>
 #include <QRect>
 #include <QExplicitlySharedDataPointer>
+#include <QVariant>
 
 extern QVariant val;
 namespace MSOOXML {
diff --git a/filters/libmsooxml/MsooXmlUtils.cpp \
b/filters/libmsooxml/MsooXmlUtils.cpp index 25bb0d6..c8ea8a2 100644
--- a/filters/libmsooxml/MsooXmlUtils.cpp
+++ b/filters/libmsooxml/MsooXmlUtils.cpp
@@ -53,6 +53,7 @@
 #include <KoXmlWriter.h>
 #include <KoUnit.h>
 
+#include <QGlobalStatic>
 #include <QDomDocument>
 #include <QColor>
 #include <QBrush>
@@ -568,9 +569,10 @@ public:
     }
 };
 
+Q_GLOBAL_STATIC(ST_HighlightColorMapping, s_ST_HighlightColor_to_QColor)
+
 QBrush Utils::ST_HighlightColor_to_QColor(const QString& colorName)
 {
-    K_GLOBAL_STATIC(ST_HighlightColorMapping, s_ST_HighlightColor_to_QColor)
     const QColor c(s_ST_HighlightColor_to_QColor->value(colorName));
     if (c.isValid())
         return QBrush(c);
@@ -703,9 +705,10 @@ public:
     }
 };
 
+Q_GLOBAL_STATIC(ST_PlaceholderType_to_ODFMapping, s_ST_PlaceholderType_to_ODF)
+
 QString Utils::ST_PlaceholderType_to_ODF(const QString& ecmaType)
 {
-    K_GLOBAL_STATIC(ST_PlaceholderType_to_ODFMapping, s_ST_PlaceholderType_to_ODF)
     QHash<QByteArray, QByteArray>::ConstIterator \
it(s_ST_PlaceholderType_to_ODF->constFind(ecmaType.toLatin1()));  if (it == \
s_ST_PlaceholderType_to_ODF->constEnd())  return QLatin1String("text");
@@ -842,9 +845,11 @@ void Utils::rotateString(const qreal rotation, const qreal \
width, const qreal he  yDiff = height/2 - sin(-angle)*width/2 - cos(-angle)*height/2;
 }
 
+
+Q_GLOBAL_STATIC(UnderlineStylesHash, s_underLineStyles)
+
 void Utils::setupUnderLineStyle(const QString& msooxmlName, KoCharacterStyle* \
textStyleProperties)  {
-    K_GLOBAL_STATIC(UnderlineStylesHash, s_underLineStyles)
     s_underLineStyles->setup(msooxmlName, textStyleProperties);
 }
 
diff --git a/filters/libmsooxml/PredefinedShapeHelper.cpp \
b/filters/libmsooxml/PredefinedShapeHelper.cpp index 2a99eb0..c6dec76 100644
--- a/filters/libmsooxml/PredefinedShapeHelper.cpp
+++ b/filters/libmsooxml/PredefinedShapeHelper.cpp
@@ -21,6 +21,9 @@
  *
  */
 
+#include <QString>   // used in generated/generatedShapes.h, which is included
+		     // inside a function in this file.
+
 #include "PredefinedShapeHelper.h"
 
 PredefinedShapeHelper::PredefinedShapeHelper()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic