cui/Library_cui.mk                        |    1 -
 cui/inc/dlgname.hxx                       |    8 +++-----
 cui/inc/strings.hrc                       |    3 ---
 cui/source/factory/dlgfact.cxx            |    2 +-
 cui/source/factory/dlgfact.hxx            |    2 +-
 cui/source/factory/init.cxx               |    2 +-
 cui/source/tabpages/autocdlg.cxx          |    2 +-
 cui/source/tabpages/chardlg.cxx           |    2 +-
 cui/source/tabpages/numpages.cxx          |    2 +-
 include/cui/cuidllapi.h                   |   23 -----------------------
 include/svx/cuicharmap.hxx                |   15 ++++++---------
 include/svx/strings.hrc                   |    4 ++++
 sd/Library_sdui.mk                        |    1 -
 sd/inc/pch/precompiled_sdui.hxx           |    1 -
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |    2 +-
 solenv/clang-format/excludelist           |    2 +-
 svx/Library_svx.mk                        |    1 +
 svx/source/dialog/cuicharmap.cxx          |   20 ++++++++++----------
 sw/Library_swui.mk                        |    1 -
 sw/source/ui/misc/contentcontroldlg.cxx   |    2 +-
 20 files changed, 33 insertions(+), 63 deletions(-)

New commits:
commit 52ba1fea038a93c77e62d3a173a070b6a249518c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Jan 31 09:46:57 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Jan 31 20:52:19 2024 +0100

    move CharMap out of cui
    
    remove CUI_DLLPUBLIC from stuff which is not exported
    then drop the cui/include dir which is then empty and
    the places we link to cui where we now don't need to
    
    and restore cui back to a lib containing stuff that
    doesn't need to be explictly linked to in keeping
    with original #i106421# idea
    
    Change-Id: I21894e6f8529dd3306df345fb52dbf5009015f3c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162798
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index e122d2b734c4..105defe54e80 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -118,7 +118,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
     $(call gb_Helper_optional,EXTENSIONS, \
         cui/source/dialogs/AdditionsDialog) \
     cui/source/dialogs/colorpicker \
-    cui/source/dialogs/cuicharmap \
     cui/source/dialogs/cuifmsearch \
     cui/source/dialogs/cuigaldlg \
     cui/source/dialogs/cuigrfflt \
diff --git a/cui/inc/dlgname.hxx b/cui/inc/dlgname.hxx
index 9835661c4e7d..deb55df1c962 100644
--- a/cui/inc/dlgname.hxx
+++ b/cui/inc/dlgname.hxx
@@ -18,14 +18,12 @@
  */
 #pragma once
 
-#include <cui/cuidllapi.h>
-
 #include <vcl/formatter.hxx>
 #include <vcl/weld.hxx>
 #include <sal/log.hxx>
 
 /// Dialog for editing a name
-class CUI_DLLPUBLIC SvxNameDialog final : public weld::GenericDialogController
+class SvxNameDialog final : public weld::GenericDialogController
 {
 private:
     std::unique_ptr<weld::Entry> m_xEdtName;
@@ -66,7 +64,7 @@ public:
 };
 
 /// Dialog for editing a number
-class CUI_DLLPUBLIC SvxNumberDialog final : public 
weld::GenericDialogController
+class SvxNumberDialog final : public weld::GenericDialogController
 {
 private:
     std::unique_ptr<weld::SpinButton> m_xEdtNumber;
@@ -79,7 +77,7 @@ public:
     sal_Int64 GetNumber() const { return m_xEdtNumber->get_value(); }
 };
 
-class CUI_DLLPUBLIC SvxDecimalNumberDialog final : public 
weld::GenericDialogController
+class SvxDecimalNumberDialog final : public weld::GenericDialogController
 {
 private:
     std::unique_ptr<weld::FormattedSpinButton> m_xEdtNumber;
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index f5252694459c..953f67b25342 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -80,9 +80,6 @@
 // tdf#119293 Labels depending on row/col
 #define RID_CUISTR_INSERTROW_BEFORE                 
NC_("RID_SVXSTR_INSERTROW_BEFORE", "Above selection")
 #define RID_CUISTR_INSERTROW_AFTER                  
NC_("RID_SVXSTR_INSERTROW_AFTER", "Below selection")
-#define RID_CUISTR_REMOVE_FAVORITES                 
NC_("RID_SVXSTR_REMOVE_FAVORITES", "Remove from Favorites")
-#define RID_CUISTR_MISSING_CHAR                     
NC_("RID_SVXSTR_MISSING_CHAR", "Missing character")
-#define RID_CUISTR_ADD_FAVORITES                    
NC_("RID_SVXSTR_ADD_FAVORITES", "Add to Favorites")
 // PPI is pixel per inch, %1 is a number
 #define RID_CUISTR_PPI                              NC_("RID_SVXSTR_PPI", "(%1 
PPI)")
 #define RID_CUISTR_COL                              NC_("RID_SVXSTR_COL", 
"Insert Columns")
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index e0ad91cd52b1..6cb6f3147657 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -32,7 +32,7 @@
 #include <numfmt.hxx>
 #include <splitcelldlg.hxx>
 #include <cuiimapwnd.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include <srchxtra.hxx>
 #include <textanim.hxx>
 #include <autocdlg.hxx>
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 3c8601140164..fc83403cb24d 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -26,7 +26,7 @@
 #include <com/sun/star/frame/XFrame.hpp>
 
 #include <cfgutil.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include <dlgname.hxx>
 #include <cuifmsearch.hxx>
 #include <cuigaldlg.hxx>
diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx
index 3ca13bb161bc..6b363f9bf543 100644
--- a/cui/source/factory/init.cxx
+++ b/cui/source/factory/init.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 
 // hook to call special character dialog for edits
 // caution: needs C-Linkage since dynamically loaded via symbol name
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 282e8b5405a1..626ccba3ffea 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -47,7 +47,7 @@
 #include <autocdlg.hxx>
 #include <editeng/acorrcfg.hxx>
 #include <editeng/svxacorr.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include <strings.hrc>
 #include <dialmgr.hxx>
 #include <svx/svxids.hrc>
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 86b183fe4160..1b34af9def2d 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -45,7 +45,7 @@
 #include <editeng/colritem.hxx>
 #include <dialmgr.hxx>
 #include <sfx2/htmlmode.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include "chardlg.h"
 #include <editeng/emphasismarkitem.hxx>
 #include <editeng/charreliefitem.hxx>
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 7fbe8b393608..27ec66a616de 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -36,7 +36,7 @@
 #include <sfx2/objsh.hxx>
 #include <vcl/graph.hxx>
 #include <vcl/settings.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include <editeng/flstitem.hxx>
 #include <svx/numvset.hxx>
 #include <sfx2/htmlmode.hxx>
diff --git a/include/cui/cuidllapi.h b/include/cui/cuidllapi.h
deleted file mode 100644
index 12277c602dd4..000000000000
--- a/include/cui/cuidllapi.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_CUI_CUIDLLAPI_H
-#define INCLUDED_CUI_CUIDLLAPI_H
-
-#include <sal/types.h>
-
-#if defined(CUI_DLLIMPLEMENTATION)
-#define CUI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define CUI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
-#endif // INCLUDED_CUI_CUIDLLAPI_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/cui/cuicharmap.hxx b/include/svx/cuicharmap.hxx
similarity index 94%
rename from include/cui/cuicharmap.hxx
rename to include/svx/cuicharmap.hxx
index b2d4ac23c425..57f28615598a 100644
--- a/include/cui/cuicharmap.hxx
+++ b/include/svx/cuicharmap.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_CUI_CUICHARMAP_HXX
-#define INCLUDED_CUI_CUICHARMAP_HXX
+#pragma once
 
 #include <vcl/customweld.hxx>
 #include <vcl/weld.hxx>
@@ -28,7 +27,7 @@
 #include <svx/searchcharmap.hxx>
 #include <svx/ucsubset.hxx>
 #include <sfx2/charwin.hxx>
-#include <cui/cuidllapi.h>
+#include <svx/svxdllapi.h>
 #include <com/sun/star/frame/XFrame.hpp>
 
 #include <memory>
@@ -44,7 +43,7 @@ struct SvxShowCharSetItem;
 }
 
 /// Provides the show characters or texts in a drawing area with special sizes 
and fonts.
-class CUI_DLLPUBLIC SvxShowText final : public weld::CustomWidgetController
+class SVX_DLLPUBLIC SvxShowText final : public weld::CustomWidgetController
 {
 private:
     ScopedVclPtr<VirtualDevice> m_xVirDev;
@@ -71,7 +70,7 @@ public:
 
 /** The main purpose of this dialog is to enable the use of characters
     that are not easily accessible from the keyboard. */
-class CUI_DLLPUBLIC SvxCharacterMap final : public SfxDialogController
+class SVX_DLLPUBLIC SvxCharacterMap final : public SfxDialogController
 {
 private:
     void init();
@@ -160,6 +159,4 @@ public:
     void toggleSearchView(bool state);
 };
 
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 2630cc98a5e9..c43bf8203981 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1841,6 +1841,10 @@
 #define RID_SVXSTR_HOR_PRESET_ONLYHOR               
NC_("RID_SVXSTR_HOR_PRESET_ONLYHOR", "Top and Bottom Borders, and All Inner 
Lines")
 #define RID_SVXSTR_VER_PRESET_ONLYVER               
NC_("RID_SVXSTR_VER_PRESET_ONLYVER", "Left and Right Borders, and All Inner 
Lines")
 
+#define RID_SVXSTR_REMOVE_FAVORITES                 
NC_("RID_SVXSTR_REMOVE_FAVORITES", "Remove from Favorites")
+#define RID_SVXSTR_MISSING_CHAR                     
NC_("RID_SVXSTR_MISSING_CHAR", "Missing character")
+#define RID_SVXSTR_ADD_FAVORITES                    
NC_("RID_SVXSTR_ADD_FAVORITES", "Add to Favorites")
+
 /*--------------------------------------------------------------------
     Description: GraphicSizeCheck strings
  --------------------------------------------------------------------*/
diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk
index 1510242b073a..30a502bcbdf6 100644
--- a/sd/Library_sdui.mk
+++ b/sd/Library_sdui.mk
@@ -62,7 +62,6 @@ $(eval $(call gb_Library_use_libraries,sdui,\
     tl \
     utl \
     vcl \
-    cui \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,sdui,\
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 00b2c8389df4..f7743dd6d27a 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -348,7 +348,6 @@
 #include <cppuhelper/queryinterface.hxx>
 #include <cppuhelper/weak.hxx>
 #include <cppuhelper/weakref.hxx>
-#include <cui/cuidllapi.h>
 #include <docmodel/color/ComplexColor.hxx>
 #include <docmodel/color/Transformation.hxx>
 #include <docmodel/dllapi.h>
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 95f7d68a576e..f46e96c98232 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -43,7 +43,7 @@
 #include <svx/SvxNumOptionsTabPageHelper.hxx>
 #include <View.hxx>
 #include <drawdoc.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include <BulletAndPositionDlg.hxx>
 #include <sdresid.hxx>
 #include <DrawViewShell.hxx>
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 46e7ceec5890..f15ac0ba31f3 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -2346,7 +2346,6 @@ cui/source/dialogs/SpellAttrib.hxx
 cui/source/dialogs/SpellDialog.cxx
 cui/source/dialogs/about.cxx
 cui/source/dialogs/colorpicker.cxx
-cui/source/dialogs/cuicharmap.cxx
 cui/source/dialogs/cuifmsearch.cxx
 cui/source/dialogs/cuigaldlg.cxx
 cui/source/dialogs/cuigrfflt.cxx
@@ -11313,6 +11312,7 @@ svx/source/dialog/contwnd.cxx
 svx/source/dialog/contwnd.hxx
 svx/source/dialog/crashreportui.cxx
 svx/source/dialog/ctredlin.cxx
+svx/source/dialog/cuicharmap.cxx
 svx/source/dialog/databaseregistrationui.cxx
 svx/source/dialog/dialcontrol.cxx
 svx/source/dialog/dlgctl3d.cxx
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 2240211e2c23..59d4eaed0bff 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -126,6 +126,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/dialog/GenericCheckDialog \
     svx/source/dialog/_bmpmask \
     svx/source/dialog/charmap \
+    svx/source/dialog/cuicharmap \
     svx/source/dialog/searchcharmap \
     svx/source/dialog/connctrl \
     svx/source/dialog/_contdlg \
diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/svx/source/dialog/cuicharmap.cxx
similarity index 98%
rename from cui/source/dialogs/cuicharmap.cxx
rename to svx/source/dialog/cuicharmap.cxx
index 03d1e8c90b53..0d73c0d1b6dd 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/svx/source/dialog/cuicharmap.cxx
@@ -40,13 +40,13 @@
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/dispatchcommand.hxx>
 
-#include <dialmgr.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/cuicharmap.hxx>
+#include <svx/strings.hrc>
 #include <sfx2/app.hxx>
 #include <svx/svxids.hrc>
 #include <editeng/editids.hrc>
 #include <editeng/fontitem.hxx>
-#include <strings.hrc>
 #include <unicode/uchar.h>
 #include <unicode/utypes.h>
 
@@ -238,9 +238,9 @@ void SvxCharacterMap::init()
 
     // tdf#117038 set the buttons width to its max possible width so it doesn't
     // make layout change when the label changes
-    m_xFavouritesBtn->set_label(CuiResId(RID_CUISTR_REMOVE_FAVORITES));
+    m_xFavouritesBtn->set_label(SvxResId(RID_SVXSTR_REMOVE_FAVORITES));
     auto nMaxWidth = m_xFavouritesBtn->get_preferred_size().Width();
-    m_xFavouritesBtn->set_label(CuiResId(RID_CUISTR_ADD_FAVORITES));
+    m_xFavouritesBtn->set_label(SvxResId(RID_SVXSTR_ADD_FAVORITES));
     nMaxWidth = std::max(nMaxWidth, 
m_xFavouritesBtn->get_preferred_size().Width());
     m_xFavouritesBtn->set_size_request(nMaxWidth, -1);
 
@@ -282,14 +282,14 @@ void 
SvxCharacterMap::setFavButtonState(std::u16string_view sTitle, std::u16stri
 
     if (m_aCharmapContents.isFavChar(sTitle, rFont))
     {
-        m_xFavouritesBtn->set_label(CuiResId(RID_CUISTR_REMOVE_FAVORITES));
+        m_xFavouritesBtn->set_label(SvxResId(RID_SVXSTR_REMOVE_FAVORITES));
     }
     else
     {
         if (m_aCharmapContents.FavCharListIsFull())
             m_xFavouritesBtn->set_sensitive(false);
 
-        m_xFavouritesBtn->set_label(CuiResId(RID_CUISTR_ADD_FAVORITES));
+        m_xFavouritesBtn->set_label(SvxResId(RID_SVXSTR_ADD_FAVORITES));
     }
 }
 
@@ -583,7 +583,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, 
weld::Button&, void)
 
 IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, weld::Button&, void)
 {
-    if 
(m_xFavouritesBtn->get_label().match(CuiResId(RID_CUISTR_ADD_FAVORITES)))
+    if 
(m_xFavouritesBtn->get_label().match(SvxResId(RID_SVXSTR_ADD_FAVORITES)))
     {
         m_aCharmapContents.updateFavCharacterList(m_aShowChar.GetText(), 
m_aShowChar.GetFont().GetFamilyName());
         setFavButtonState(m_aShowChar.GetText(), 
m_aShowChar.GetFont().GetFamilyName());
@@ -591,7 +591,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, 
weld::Button&, void)
     else
     {
         m_aCharmapContents.deleteFavCharacterFromList(m_aShowChar.GetText(), 
m_aShowChar.GetFont().GetFamilyName());
-        m_xFavouritesBtn->set_label(CuiResId(RID_CUISTR_ADD_FAVORITES));
+        m_xFavouritesBtn->set_label(SvxResId(RID_SVXSTR_ADD_FAVORITES));
         m_xFavouritesBtn->set_sensitive(false);
     }
 
@@ -704,7 +704,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
         // Select the corresponding character
         SetChar(cChar);
     else {
-        m_xCharName->set_label(CuiResId(RID_CUISTR_MISSING_CHAR));
+        m_xCharName->set_label(SvxResId(RID_SVXSTR_MISSING_CHAR));
         m_aShowChar.SetText(" ");
         switch(radix)
         {
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 1f97aa0edd1c..3a56419f7327 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -57,7 +57,6 @@ $(eval $(call gb_Library_use_libraries,swui,\
     comphelper \
     cppu \
     cppuhelper \
-    cui \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
     editeng \
diff --git a/sw/source/ui/misc/contentcontroldlg.cxx 
b/sw/source/ui/misc/contentcontroldlg.cxx
index f318fa6a699e..101a2f8aa7d2 100644
--- a/sw/source/ui/misc/contentcontroldlg.cxx
+++ b/sw/source/ui/misc/contentcontroldlg.cxx
@@ -20,7 +20,7 @@
 #include <contentcontroldlg.hxx>
 
 #include <vcl/weld.hxx>
-#include <cui/cuicharmap.hxx>
+#include <svx/cuicharmap.hxx>
 #include <svl/numformat.hxx>
 #include <svl/zformat.hxx>
 

Reply via email to