[Libreoffice-commits] core.git: 2 commits - sw/inc sw/source xmloff/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Feb 15 08:37:07 UTC 2018


 sw/inc/docsh.hxx                     |    6 ++++--
 sw/inc/docufld.hxx                   |    2 +-
 sw/inc/editsh.hxx                    |   15 ++++-----------
 sw/inc/fesh.hxx                      |    2 --
 sw/inc/finalthreadmanager.hxx        |    3 +--
 sw/inc/fldbas.hxx                    |    1 -
 sw/inc/flddropdown.hxx               |    2 +-
 sw/source/core/edit/autofmt.cxx      |    1 +
 sw/source/core/edit/edtab.cxx        |    1 +
 sw/source/core/unocore/unotbl.cxx    |    1 +
 sw/source/uibase/dochdl/swdtflvr.cxx |    1 +
 xmloff/source/core/xmlimp.cxx        |    7 +++----
 12 files changed, 18 insertions(+), 24 deletions(-)

New commits:
commit 798a989937a4acf7830588637f8c3902b4d985d8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Feb 14 22:13:06 2018 +0100

    Fix some IWYU warnings
    
    Change-Id: I49b5e3a9e8b91baace9f3b3d4f0ac9d8531d5abe
    Reviewed-on: https://gerrit.libreoffice.org/49782
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index e2c754f1ca32..cbee1542e559 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -29,8 +29,6 @@
 #include "shellid.hxx"
 
 #include <svl/lstner.hxx>
-#include <svtools/embedhlp.hxx>
-#include <LibreOfficeKit/LibreOfficeKitTypes.h>
 
 #include <sfx2/StyleManager.hxx>
 
@@ -55,6 +53,10 @@ class IDocumentSettingAccess;
 class IDocumentChartDataProviderAccess;
 class SwDocShell;
 class SwDrawModel;
+namespace svt
+{
+class EmbeddedObjectRef;
+}
 
 // initialize DrawModel (in form of a SwDrawModel) and DocShell (in form of a SwDocShell)
 // as needed, one or both parameters may be zero
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 4d133ff26cb0..13af74471311 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -25,13 +25,13 @@
 #include <svl/macitem.hxx>
 
 #include "fldbas.hxx"
-#include "numrule.hxx"
 
 class SetGetExpFields;
 class SwTextField;
 class SwFrame;
 class OutlinerParaObject;
 class SwTextAPIObject;
+class SwCharFormat;
 
 enum SwAuthorFormat
 {
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 2fd055f6c87c..99c970233810 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -21,27 +21,16 @@
 
 #include "crsrsh.hxx"
 
-#include "IMark.hxx"
 #include "charfmt.hxx"
 #include "fldupde.hxx"
 #include "frmfmt.hxx"
-#include "itabenum.hxx"
-#include "swdbdata.hxx"
 #include "swdllapi.h"
 #include "swundo.hxx"
 #include "tblenum.hxx"
 #include "tox.hxx"
-#include <svtools/embedhlp.hxx>
 
-#include <editeng/swafopt.hxx>
-#include <svx/ClassificationField.hxx>
-
-#include <vcl/font.hxx>
-
-#include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <com/sun/star/linguistic2/ProofreadingResult.hpp>
 #include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
-#include <com/sun/star/text/HoriOrientation.hpp>
 
 #include <memory>
 #include <vector>
@@ -102,6 +91,9 @@ class SwAuthEntry;
 class SwRewriter;
 class SwView;
 struct SwConversionArgs;
+struct SvxSwAutoFormatFlags;
+struct SwInsertTableOptions;
+struct SwDBData;
 enum class SvtScriptType;
 enum class SfxClassificationPolicyType;
 enum class RedlineFlags;
@@ -114,6 +106,7 @@ namespace com { namespace sun { namespace star { namespace uno {
 namespace svx{
     struct SpellPortion;
     typedef std::vector<SpellPortion> SpellPortions;
+    class ClassificationResult;
 }
 
 namespace sfx2{
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 9923aad5bff6..67be27486aea 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -20,7 +20,6 @@
 #define INCLUDED_SW_INC_FESH_HXX
 
 #include <com/sun/star/text/RelOrientation.hpp>
-#include <com/sun/star/embed/XClassifiedObject.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
 
 #include <svx/svdobj.hxx>
@@ -31,7 +30,6 @@
 #include <svx/svdtypes.hxx>
 #include <sot/formats.hxx>
 #include <rtl/ustring.hxx>
-#include <svtools/embedhlp.hxx>
 #include <o3tl/typed_flags_set.hxx>
 
 #include <vector>
diff --git a/sw/inc/finalthreadmanager.hxx b/sw/inc/finalthreadmanager.hxx
index 982fd62cd12f..26c526178ff0 100644
--- a/sw/inc/finalthreadmanager.hxx
+++ b/sw/inc/finalthreadmanager.hxx
@@ -21,12 +21,11 @@
 #define INCLUDED_SW_SOURCE_CORE_INC_FINALTHREADMANAGER_HXX
 
 #include <sal/config.h>
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/util/XJobManager.hpp>
 #include <com/sun/star/frame/XTerminateListener2.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <osl/mutex.hxx>
 #include <list>
 
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index e3fed4461a70..44e06c2c34be 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -27,7 +27,6 @@
 #include <cppuhelper/weakref.hxx>
 #include <editeng/svxenum.hxx>
 #include <vector>
-#include "toxe.hxx"
 
 class SwDoc;
 class SvNumberFormatter;
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index 81074d8fabca..36aa09fe0b3d 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -19,7 +19,7 @@
 #ifndef INCLUDED_SW_INC_FLDDROPDOWN_HXX
 #define INCLUDED_SW_INC_FLDDROPDOWN_HXX
 
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Sequence.h>
 #include "swdllapi.h"
 #include "fldbas.hxx"
 
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index b1b276c97e4d..f201ac55f62f 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -65,6 +65,7 @@
 #include <strings.hrc>
 #include <comcore.hxx>
 #include <numrule.hxx>
+#include <itabenum.hxx>
 
 #include <memory>
 
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index a7f20c31e757..4f69a04b713b 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -48,6 +48,7 @@
 #include <swddetbl.hxx>
 #include <mdiexp.hxx>
 #include <unochart.hxx>
+#include <itabenum.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 210eb3881b19..2c4d45151cca 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -110,6 +110,7 @@
 #include <swtable.hxx>
 #include <docsh.hxx>
 #include <fesh.hxx>
+#include <itabenum.hxx>
 
 using namespace ::com::sun::star;
 using ::editeng::SvxBorderLine;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 8157dfd71f81..42c82b5e7550 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -124,6 +124,7 @@
 #include <swserv.hxx>
 #include <calbck.hxx>
 #include <fmtmeta.hxx>
+#include <itabenum.hxx>
 
 #include <vcl/GraphicNativeTransform.hxx>
 #include <vcl/GraphicNativeMetadata.hxx>
commit a460cf6822780cb41cd5f9a55b30652c1c4bf1c2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Feb 14 18:07:39 2018 +0100

    xmloff: avoid unhandled exception warning
    
    Happened e.g. when copy&pasting editeng content in Impress tables,
    document::XStorageBasedDocument is not implemented by SvxSimpleUnoModel,
    so it's not exceptional that the queryInterface() for mxModel fails.
    
    Change-Id: Iaed53941bb47ff8a0553896f18a553cf64e2224a
    Reviewed-on: https://gerrit.libreoffice.org/49747
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index c77193ba38cb..2d9e6b98afb3 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -988,10 +988,9 @@ void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XCompo
 
     try
     {
-        uno::Reference<document::XStorageBasedDocument> const xSBDoc(mxModel,
-                uno::UNO_QUERY_THROW);
-        uno::Reference<embed::XStorage> const xStor(
-                xSBDoc->getDocumentStorage());
+        uno::Reference<document::XStorageBasedDocument> const xSBDoc(mxModel, uno::UNO_QUERY);
+        uno::Reference<embed::XStorage> const xStor(xSBDoc.is() ? xSBDoc->getDocumentStorage()
+                                                                : nullptr);
         if (xStor.is())
         {
             mpImpl->mbIsOOoXML =


More information about the Libreoffice-commits mailing list