[Libreoffice-commits] .: 10 commits - solenv/gbuild solenv/inc svtools/inc svtools/source

Tor Lillqvist tml at kemper.freedesktop.org
Wed Oct 5 07:40:33 PDT 2011


 solenv/gbuild/CppunitTest.mk                       |    4 ++--
 solenv/gbuild/platform/windows.mk                  |    2 ++
 solenv/inc/wntmsc.mk                               |    9 +++++----
 svtools/inc/svtools/fileview.hxx                   |    2 +-
 svtools/source/brwbox/datwin.cxx                   |    2 +-
 svtools/source/contnr/fileview.cxx                 |    2 +-
 svtools/source/control/ctrlbox.cxx                 |    6 ++++--
 svtools/source/control/fmtfield.cxx                |    2 +-
 svtools/source/control/headbar.cxx                 |    3 ++-
 svtools/source/toolpanel/paneltabbar.cxx           |    2 +-
 svtools/source/toolpanel/toolpanelcollection.hxx   |    2 +-
 svtools/source/toolpanel/toolpaneldeck.cxx         |    2 +-
 svtools/source/uno/wizard/wizardpagecontroller.hxx |    2 +-
 13 files changed, 23 insertions(+), 17 deletions(-)

New commits:
commit 0a5a76f44dd4db01cced4255e5b58bbcdb2a6b51
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:37:50 2011 +0300

    WaE: unsafe mix of type 'bool' and type 'sal_Bool' in operation

diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 3002702..188ef36 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -740,7 +740,7 @@ void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
     bool bThousand, IsRed;
     sal_uInt16 nPrecision, nAnzLeading;
     ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
-    if (bThousand == _bUseSeparator)
+    if (bThousand == (bool)_bUseSeparator)
         return;
 
     // we need the language for the following
commit 8f51cde01f3183305e5c48a8edc3e62543381e16
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:35:31 2011 +0300

    WaE: 'argument' : truncation of constant value
    
    FILEVIEW_SHOW_NONE 0x80 so it doesn't fit into a sal_Int8. So make the
    nFlags argument to the second SvtFileView constructor sal_uInt8
    instead.

diff --git a/svtools/inc/svtools/fileview.hxx b/svtools/inc/svtools/fileview.hxx
index 37d8e2f..d56826f 100644
--- a/svtools/inc/svtools/fileview.hxx
+++ b/svtools/inc/svtools/fileview.hxx
@@ -93,7 +93,7 @@ protected:
 
 public:
     SvtFileView( Window* pParent, const ResId& rResId, sal_Bool bOnlyFolder, sal_Bool bMultiSelection );
-    SvtFileView( Window* pParent, const ResId& rResId, sal_Int8 nFlags );
+    SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags );
     ~SvtFileView();
 
     const String&           GetViewURL() const;
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 404c667..21f306b 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1238,7 +1238,7 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId,
     pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) );
 }
 
-SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_Int8 nFlags ) :
+SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags ) :
 
     Control( pParent, rResId )
 {
commit a8e65dcd93202cfaa52272a811dc5374dbc88593
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:34:01 2011 +0300

    WaE: type name first seen using 'class' now seen using 'struct'

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 7e606bb..3857862 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -76,8 +76,9 @@ using namespace ::com::sun::star;
 // - ImplColorListData -
 // --------------------
 
-struct ImplColorListData
+class ImplColorListData
 {
+public:
     Color       aColor;
     sal_Bool        bColor;
 
@@ -975,8 +976,9 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt )
 // FontNameBox
 // ===================================================================
 
-struct ImplFontNameListData
+class ImplFontNameListData
 {
+public:
     FontInfo    maInfo;
     sal_uInt16      mnType;
 
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 1c48b33..77e0679 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -40,8 +40,9 @@
 
 // =======================================================================
 
-struct ImplHeadItem
+class ImplHeadItem
 {
+public:
     sal_uInt16              mnId;
     HeaderBarItemBits   mnBits;
     long                mnSize;
commit c395e3f96a3a61e1b9d9d00af2a9fd230168ccfa
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:33:01 2011 +0300

    WaE: class has virtual functions, but destructor is not virtual

diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx
index ccf3df3..901e65d 100644
--- a/svtools/source/toolpanel/toolpaneldeck.cxx
+++ b/svtools/source/toolpanel/toolpaneldeck.cxx
@@ -92,7 +92,7 @@ namespace svt
             m_aPanelAnchor.SetAccessibleRole( AccessibleRole::PANEL );
         }
 
-        ~ToolPanelDeck_Impl()
+        virtual ~ToolPanelDeck_Impl()
         {
             m_bInDtor = true;
         }
commit 67cf8e78f3dd964e8eff63a7a20c3a6b8fb9fac9
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:29:48 2011 +0300

    We should check OS_FOR_BUILD here
    
    Not that it matters as we obviously don't run any cppunit tests when
    cross-compiling anyway... But in theory, this is needed if we would
    cross-compile *from* Windows. Crazy idea, over my dead body, sure.

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 52ce596..fabe4d5 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -58,7 +58,7 @@ gb_CppunitTest_CPPTESTCOMMAND := $(gb_CppunitTest_CPPTESTPRECOMMAND) STAR_RESOUR
 gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filename,$(1))
 
 # TODO: move this to platform under suitable name
-gb_CppunitTarget__make_url = file://$(if $(filter WNT,$(OS)),/)$(1)
+gb_CppunitTarget__make_url = file://$(if $(filter WNT,$(OS_FOR_BUILD)),/)$(1)
 
 gb_CppunitTest__get_uno_type_target = $(OUTDIR)/bin/$(1).rdb
 define gb_CppunitTest__make_args
commit 2531a461df4ba325128b63c60d4bd2bc80660e92
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:29:15 2011 +0300

    Use gb_CppunitTarget__make_url for Windows file: URL correctness

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index e75ce4d..52ce596 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -72,7 +72,7 @@ $(if $(strip $(UNO_SERVICES)),\
 			$(call gb_CppunitTarget__make_url,$(call gb_RdbTarget_get_target,$(rdb))))") \
 $(if $(URE),\
 	$(foreach dir,URE_INTERNAL_LIB_DIR OOO_BASE_DIR BRAND_BASE_DIR,\
-		-env:$(dir)=file://$(gb_CppunitTest_LIBDIR)))
+		-env:$(dir)=$(call gb_CppunitTarget__make_url,$(gb_CppunitTest_LIBDIR))))
 endef
 
 .PHONY : $(call gb_CppunitTest_get_clean_target,%)
commit 15c73850fadba834763cc99d1a535653884fafb9
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 17:04:19 2011 +0300

    WaE: class has virtual functions, but destructor is not virtual

diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index ae4c7b4..83fcaed 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -345,7 +345,7 @@ namespace svt
     public:
         PanelTabBar_Impl( PanelTabBar& i_rTabBar, IToolPanelDeck& i_rPanelDeck, const TabAlignment i_eAlignment, const TabItemContent i_eItemContent );
 
-        ~PanelTabBar_Impl()
+        virtual ~PanelTabBar_Impl()
         {
             m_rPanelDeck.RemoveListener( *this );
         }
diff --git a/svtools/source/toolpanel/toolpanelcollection.hxx b/svtools/source/toolpanel/toolpanelcollection.hxx
index 02100f3..4c5ed77 100644
--- a/svtools/source/toolpanel/toolpanelcollection.hxx
+++ b/svtools/source/toolpanel/toolpanelcollection.hxx
@@ -46,7 +46,7 @@ namespace svt
     {
     public:
         ToolPanelCollection();
-        ~ToolPanelCollection();
+        virtual ~ToolPanelCollection();
 
         // IToolPanelDeck
         virtual size_t      GetPanelCount() const;
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.hxx b/svtools/source/uno/wizard/wizardpagecontroller.hxx
index 7b8273c..0982663 100644
--- a/svtools/source/uno/wizard/wizardpagecontroller.hxx
+++ b/svtools/source/uno/wizard/wizardpagecontroller.hxx
@@ -52,7 +52,7 @@ namespace svt { namespace uno
             const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController,
             const sal_Int16 i_nPageId
         );
-        ~WizardPageController();
+        virtual ~WizardPageController();
 
         // IWizardPageController overridables
         virtual void        initializePage();
commit 48a271c28ad0ceaffd616d8dc9625ed65a89dd3b
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 16:58:03 2011 +0300

    WaE: a GUID can only be associated with a class, interface or namespace
    
    Interestingly, this warning is caused by the Windows SDK header
    ocidl.h., which gets included by at least
    svtools/source/misc/transfer.cxx.

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 5d9feb7..d9ffbf7 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -128,6 +128,7 @@ gb_CFLAGS := \
 	-wd4800 \
 	-wd4820 \
 	-wd4826 \
+	-wd4917 \
 	-Zc:forScope,wchar_t- \
 	-Zm500 \
 
@@ -178,6 +179,7 @@ gb_CXXFLAGS := \
 	-wd4800 \
 	-wd4820 \
 	-wd4826 \
+	-wd4917 \
 	-wd4996 \
 	-Zc:forScope,wchar_t- \
 	-Zm500 \
commit e5f71ca7c27259360a401d94ed6a53038608b941
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 15:44:31 2011 +0300

    WaE: '==' : unsafe mix of type 'sal_Bool' and type 'bool' in operation

diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index f944908..3ee8c7d 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -690,7 +690,7 @@ BrowserExecuteDropEvent::BrowserExecuteDropEvent( BrowserDataWin *pWindow, const
 void BrowserDataWin::SetUpdateMode( sal_Bool bMode )
 {
     DBG_ASSERT( !bUpdateMode || aInvalidRegion.empty(), "invalid region not empty" );
-    if ( bMode == bUpdateMode )
+    if ( (bool) bMode == bUpdateMode )
         return;
 
     bUpdateMode = bMode;
commit ed1de7f939d6aed75b115359515fadafa810c76c
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Oct 5 15:38:09 2011 +0300

    Unclear whether the use of -Z7 -Yd in CFLAGSENABLESYMBOLS is intentional
    
    The -Yd option is deprecated anyway and generates an ugly warning
    "option 'Yd' has been deprecated and will be removed in a future
    release" for each file compiled in an --enable-symbol or
    --enable-debug build now.
    
    So just use the same as in gbuild for now, only -Zi for both
    CFLAGSENABLESYMBOLS and CFLAGSDEBUG. Let the .pdb file be in its
    default location.

diff --git a/solenv/inc/wntmsc.mk b/solenv/inc/wntmsc.mk
index 4d7a305..57a7f90 100644
--- a/solenv/inc/wntmsc.mk
+++ b/solenv/inc/wntmsc.mk
@@ -99,9 +99,10 @@ CDEFS+= -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CR
 CFLAGS+= -Gy
 .ENDIF # "$(product)" != ""
 
-# flags to enable build with symbols; required for crashdump feature
-#CFLAGSENABLESYMBOLS=-Zi -Fd$(MISC)/_ooo_st_$(TARGET).PDB
-CFLAGSENABLESYMBOLS=-Z7 -Yd
+# Flags to enable build with symbols; old comment said "required for crashdump feature"
+# but unclear if that is true or not any more; just use the same as CFLAGSDEBUG for now.
+# That is what we do in gbuild anyway...
+CFLAGSENABLESYMBOLS=-Zi
 
 .IF "$(bndchk)" != ""
 .IF "$(debug)" == ""
@@ -148,7 +149,7 @@ CDEFSOBJMT+=-D_DLL
 .ENDIF # "$(DYNAMIC_CRT)"!=""
 
 CFLAGSPROF=-Gh -Fd$(MISC)/$(@:b).pdb
-CFLAGSDEBUG=-Zi -Fd$(MISC)/$(@:b).pdb
+CFLAGSDEBUG=-Zi
 CFLAGSDBGUTIL=
 .IF "$(VC_STANDARD)"==""
 CFLAGSOPT=-Oxs -Oy-


More information about the Libreoffice-commits mailing list