diff options
-rw-r--r-- | cui/source/dialogs/cuicharmap.cxx | 9 | ||||
-rw-r--r-- | include/svx/charmap.hxx | 5 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 3 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/searchcharmap.cxx | 1 |
5 files changed, 13 insertions, 13 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 6e9299545e34..71c1360f4f7d 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -667,8 +667,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBoxText&, void) bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); if (bNeedSubset) { - FontCharMapRef xFontCharMap( new FontCharMap() ); - m_xShowSet->GetFontCharMap( xFontCharMap ); + FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap(); pSubsetMap.reset(new SubsetMap( xFontCharMap )); // update subset listbox for new font's unicode subsets @@ -840,8 +839,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, weld::Entry&, void) toggleSearchView(true); - FontCharMapRef xFontCharMap(new FontCharMap()); - m_xSearchSet->GetFontCharMap(xFontCharMap); + FontCharMapRef xFontCharMap = m_xSearchSet->GetFontCharMap(); sal_UCS4 sChar = xFontCharMap->GetFirstChar(); while(sChar != xFontCharMap->GetLastChar()) @@ -1060,8 +1058,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix) // Convert the code back to a character using the appropriate radix sal_UCS4 cChar = aCodeString.toUInt32(static_cast<sal_Int16> (radix)); // Use FontCharMap::HasChar(sal_UCS4 cChar) to see if the desired character is in the font - FontCharMapRef xFontCharMap(new FontCharMap()); - m_xShowSet->GetFontCharMap(xFontCharMap); + FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap(); if (xFontCharMap->HasChar(cChar)) // Select the corresponding character SetChar(cChar); diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index 6e18581c4786..5101b230059f 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -32,6 +32,7 @@ #include <tools/link.hxx> #include <vcl/ctrl.hxx> #include <vcl/event.hxx> +#include <vcl/fontcharmap.hxx> #include <vcl/outdev.hxx> #include <vcl/metric.hxx> #include <vcl/vclptr.hxx> @@ -80,8 +81,8 @@ public: void SetFavClickHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aFavClickHdl = rHdl; } static sal_uInt32& getSelectedChar(); void SetFont( const vcl::Font& rFont ); - vcl::Font const & GetFont() const { return mxVirDev->GetFont(); } - bool GetFontCharMap(FontCharMapRef& rxFontCharMap) const { return mxVirDev->GetFontCharMap(rxFontCharMap); } + vcl::Font const & GetFont() const { return maFont; } + FontCharMapRef GetFontCharMap(); bool isFavChar(const OUString& sTitle, const OUString& rFont); void getFavCharacterList(); //gets both Fav char and Fav char font list void updateFavCharacterList(const OUString& rChar, const OUString& rFont); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index ac7269345c0c..1dabf0abd0b3 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1987,8 +1987,7 @@ void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyl m_aSymbolDisplay.SetFont(aFontMetric); // update subset listbox for new font's unicode subsets - FontCharMapRef xFontCharMap; - m_xCharsetDisplay->GetFontCharMap( xFontCharMap ); + FontCharMapRef xFontCharMap = m_xCharsetDisplay->GetFontCharMap(); m_xSubsetMap.reset(new SubsetMap( xFontCharMap )); m_xFontsSubsetLB->clear(); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index fcaa955541df..1f1f469dfc82 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -20,7 +20,6 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/builderfactory.hxx> -#include <vcl/fontcharmap.hxx> #include <svtools/colorcfg.hxx> #include <rtl/textenc.h> @@ -844,12 +843,17 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos ) return aFind->second.get(); } - sal_Int32 SvxShowCharSet::getMaxCharCount() const { return mxFontCharMap->GetCharCount(); } +FontCharMapRef SvxShowCharSet::GetFontCharMap() +{ + RecalculateFont(*mxVirDev); + return mxFontCharMap; +} + // TODO: should be moved into Font Attributes stuff // we let it mature here though because it is currently the only use diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index d131002f3dee..74a90959dfc3 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -20,7 +20,6 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/builderfactory.hxx> -#include <vcl/fontcharmap.hxx> #include <svtools/colorcfg.hxx> #include <rtl/textenc.h> |