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

Stephan Bergmann sbergman at redhat.com
Fri Jun 10 16:30:56 UTC 2016


 sw/inc/swfltopt.hxx                |    4 ++--
 sw/source/filter/basflt/fltini.cxx |    7 ++++---
 sw/source/filter/ww8/ww8par.cxx    |    2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 81fdb0919f3bf0adef670942ba79a2121aebd6df
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 10 18:28:21 2016 +0200

    All WinWord/* props in Writer.xcs are oor:type="xs:long"
    
    ...i.e., sal_Int64, so cannot be read by casting the Any's value to sal_uInt32.
    (SwFilterOptions::GetValues is apparently only used from
    SwWW8ImplReader::LoadDoc.)
    
    Change-Id: Ib2efa34093318fc3f55bbc2a93c2379990b1b791

diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx
index 54ce722..1091d28 100644
--- a/sw/inc/swfltopt.hxx
+++ b/sw/inc/swfltopt.hxx
@@ -28,10 +28,10 @@ private:
 
 public:
     SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
-                      sal_uInt32* pValues );
+                      sal_uInt64* pValues );
 
     void GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
-                     sal_uInt32* pValues );
+                     sal_uInt64* pValues );
     virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
 };
 
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index a40c11f..071751b 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -21,6 +21,7 @@
 #include <hintids.hxx>
 #include <i18nlangtag/lang.h>
 #include <i18nlangtag/languagetag.hxx>
+#include <o3tl/any.hxx>
 #include <vcl/msgbox.hxx>
 #include <svtools/parhtml.hxx>
 #include <sot/storage.hxx>
@@ -236,14 +237,14 @@ bool StgWriter::IsStgWriter() const { return true; }
 #define FILTER_OPTION_ROOT      OUString("Office.Writer/FilterFlags")
 
 SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
-                                                                sal_uInt32* pValues )
+                                                                sal_uInt64* pValues )
     : ConfigItem( FILTER_OPTION_ROOT )
 {
     GetValues( nCnt, ppNames, pValues );
 }
 
 void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
-                                                                        sal_uInt32* pValues )
+                                                                        sal_uInt64* pValues )
 {
     Sequence<OUString> aNames( nCnt );
     OUString* pNames = aNames.getArray();
@@ -258,7 +259,7 @@ void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
         const Any* pAnyValues = aValues.getConstArray();
         for( n = 0; n < nCnt; ++n )
             pValues[ n ] = pAnyValues[ n ].hasValue()
-                                            ? *static_cast<sal_uInt32 const *>(pAnyValues[ n ].getValue())
+                                            ? *o3tl::doAccess<sal_uInt64>(pAnyValues[ n ])
                                             : 0;
     }
     else
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c072c83..ac5379f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6060,7 +6060,7 @@ sal_uLong SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss)
             "WinWord/WWFB0", "WinWord/WWFB1", "WinWord/WWFB2",
             "WinWord/RegardHindiDigits"
         };
-        sal_uInt32 aVal[ 13 ];
+        sal_uInt64 aVal[ 13 ];
 
         SwFilterOptions aOpt( 13, aNames, aVal );
 


More information about the Libreoffice-commits mailing list