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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 12 08:14:47 UTC 2018


 cui/source/inc/numpages.hxx      |    6 +++++-
 cui/source/tabpages/numpages.cxx |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit a6ea0e89c092332e003567019294acc9e890eac2
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Sep 12 08:42:12 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Sep 12 10:14:23 2018 +0200

    Avoid duplicate class name causing ODR violation
    
    ...as reported by ASan during e.g. UITest_writer_tests:
    
    > ==3420==ERROR: AddressSanitizer: odr-violation (0x7f523b312200):
    >   [1] size=152 'vtable for NumberingPreview' /data/sbergman/lo-san/core/cui/source/tabpages/numpages.cxx
    >   [2] size=152 'vtable for NumberingPreview' /data/sbergman/lo-san/core/sw/source/ui/misc/outline.cxx
    
    Change-Id: I8ed56e3af3c6ba21ce6d757854e92a0f2c043ede
    Reviewed-on: https://gerrit.libreoffice.org/60368
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 7d5ebc526e84..e3f24ca4aa34 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -65,6 +65,8 @@ class SvxNumberingPreview : public vcl::Window
 
 };
 
+namespace cui {
+
 class NumberingPreview : public weld::CustomWidgetController
 {
     const SvxNumRule*   pActNum;
@@ -86,6 +88,8 @@ public:
 
 };
 
+}
+
 struct SvxNumSettings_Impl
 {
     SvxNumType nNumberType;
@@ -391,7 +395,7 @@ class SvxNumPositionTabPage : public SfxTabPage
     bool                bInInintControl     : 1;  // workaround for Modify-error, is said to be corrected from 391 on
     bool                bLabelAlignmentPosAndSpaceModeActive;
 
-    NumberingPreview m_aPreviewWIN;
+    cui::NumberingPreview m_aPreviewWIN;
     std::unique_ptr<weld::TreeView> m_xLevelLB;
     // former set of controls shown for numbering rules containing list level
     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 7ab6d400b8ab..8863e5fa968c 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2528,7 +2528,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
     rRenderContext.DrawOutDev(Point(), aSize, Point(), aSize, *pVDev);
 }
 
-NumberingPreview::NumberingPreview()
+cui::NumberingPreview::NumberingPreview()
     : pActNum(nullptr)
     , bPosition(false)
     , nActLevel(SAL_MAX_UINT16)
@@ -2536,7 +2536,7 @@ NumberingPreview::NumberingPreview()
 }
 
 // paint preview of numeration
-void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& /*rRect*/)
+void cui::NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& /*rRect*/)
 {
     Size aSize(rRenderContext.PixelToLogic(GetOutputSizePixel()));
 


More information about the Libreoffice-commits mailing list