[Bug 94306] Replace boost::noncopyable with plain C++11 deleted copy ctors
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Sep 26 21:43:21 PDT 2015
https://bugs.documentfoundation.org/show_bug.cgi?id=94306
--- Comment #9 from Siddharth Khabia <siddharthkhabia at gmail.com> ---
Like umang this is my first bug too. i have a working build .
in a file in sw :
inc/breakit.hxx :
should this :
class SW_DLLPUBLIC SwBreakIt : private ::boost::noncopyable
{
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
m_xContext;
mutable com::sun::star::uno::Reference<
com::sun::star::i18n::XBreakIterator > xBreak;
LanguageTag * m_pLanguageTag; ///< language tag of the current locale
com::sun::star::i18n::ForbiddenCharacters * m_pForbidden;
LanguageType aForbiddenLang; ///< language of the current forbiddenChar
struct
void _GetLocale( const LanguageType aLang );
void _GetLocale( const LanguageTag& rLanguageTag );
void _GetForbidden( const LanguageType aLang );
void createBreakIterator() const;
// private (see @ _Create, _Delete).
explicit SwBreakIt(
const com::sun::star::uno::Reference<
com::sun::star::uno::XComponentContext > & rxContext);
~SwBreakIt();
public:
// private (see @ source/core/bastyp/init.cxx).
static void _Create(
const com::sun::star::uno::Reference<
com::sun::star::uno::XComponentContext > & rxContext);
static void _Delete();
public:
static SwBreakIt * Get();
com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator >
GetBreakIter()
{
createBreakIterator();
return xBreak;
}
const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang )
{
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang )
_GetLocale( aLang );
return m_pLanguageTag->getLocale();
}
const com::sun::star::lang::Locale& GetLocale( const LanguageTag&
rLanguageTag )
{
// Use LanguageType comparison instead of LanguageTag::operator!=()
// because here the LanguageTag is already a known LanguageType value
// assigned, so LanguageTag does not need to convert to BCP47 for
// comparison.
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() !=
rLanguageTag.getLanguageType() )
_GetLocale( rLanguageTag );
return m_pLanguageTag->getLocale();
}
const LanguageTag& GetLanguageTag( const LanguageType aLang )
{
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang )
_GetLocale( aLang );
return *m_pLanguageTag;
}
const LanguageTag& GetLanguageTag( const LanguageTag& rLanguageTag )
{
// Use LanguageType comparison instead of LanguageTag::operator!=()
// because here the LanguageTag is already a known LanguageType value
// assigned, so LanguageTag does not need to convert to BCP47 for
// comparison.
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() !=
rLanguageTag.getLanguageType() )
_GetLocale( rLanguageTag );
return *m_pLanguageTag;
}
const com::sun::star::i18n::ForbiddenCharacters& GetForbidden( const
LanguageType aLang )
{
if( !m_pForbidden || aForbiddenLang != aLang )
_GetForbidden( aLang );
return *m_pForbidden;
}
sal_uInt16 GetRealScriptOfText( const OUString& rText, sal_Int32 nPos )
const;
SvtScriptType GetAllScriptsOfText( const OUString& rText ) const;
sal_Int32 getGraphemeCount(const OUString& rStr,
sal_Int32 nStart, sal_Int32 nEnd) const;
sal_Int32 getGraphemeCount(const OUString& rStr) const
{
return getGraphemeCount(rStr, 0, rStr.getLength());
}
};
be change d to this :
class SW_DLLPUBLIC SwBreakIt : private
{
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
m_xContext;
mutable com::sun::star::uno::Reference<
com::sun::star::i18n::XBreakIterator > xBreak;
LanguageTag * m_pLanguageTag; ///< language tag of the current locale
com::sun::star::i18n::ForbiddenCharacters * m_pForbidden;
LanguageType aForbiddenLang; ///< language of the current forbiddenChar
struct
void _GetLocale( const LanguageType aLang );
void _GetLocale( const LanguageTag& rLanguageTag );
void _GetForbidden( const LanguageType aLang );
void createBreakIterator() const;
// private (see @ _Create, _Delete).
explicit SwBreakIt(
const com::sun::star::uno::Reference<
com::sun::star::uno::XComponentContext > & rxContext);
~SwBreakIt();
public:
// private (see @ source/core/bastyp/init.cxx).
static void _Create(
const com::sun::star::uno::Reference<
com::sun::star::uno::XComponentContext > & rxContext);
static void _Delete();
public:
static SwBreakIt * Get();
com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator >
GetBreakIter()
{
createBreakIterator();
return xBreak;
}
const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang )
{
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang )
_GetLocale( aLang );
return m_pLanguageTag->getLocale();
}
const com::sun::star::lang::Locale& GetLocale( const LanguageTag&
rLanguageTag )
{
// Use LanguageType comparison instead of LanguageTag::operator!=()
// because here the LanguageTag is already a known LanguageType value
// assigned, so LanguageTag does not need to convert to BCP47 for
// comparison.
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() !=
rLanguageTag.getLanguageType() )
_GetLocale( rLanguageTag );
return m_pLanguageTag->getLocale();
}
const LanguageTag& GetLanguageTag( const LanguageType aLang )
{
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang )
_GetLocale( aLang );
return *m_pLanguageTag;
}
const LanguageTag& GetLanguageTag( const LanguageTag& rLanguageTag )
{
// Use LanguageType comparison instead of LanguageTag::operator!=()
// because here the LanguageTag is already a known LanguageType value
// assigned, so LanguageTag does not need to convert to BCP47 for
// comparison.
if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() !=
rLanguageTag.getLanguageType() )
_GetLocale( rLanguageTag );
return *m_pLanguageTag;
}
const com::sun::star::i18n::ForbiddenCharacters& GetForbidden( const
LanguageType aLang )
{
if( !m_pForbidden || aForbiddenLang != aLang )
_GetForbidden( aLang );
return *m_pForbidden;
}
sal_uInt16 GetRealScriptOfText( const OUString& rText, sal_Int32 nPos )
const;
SvtScriptType GetAllScriptsOfText( const OUString& rText ) const;
sal_Int32 getGraphemeCount(const OUString& rStr,
sal_Int32 nStart, sal_Int32 nEnd) const;
sal_Int32 getGraphemeCount(const OUString& rStr) const
{
return getGraphemeCount(rStr, 0, rStr.getLength());
}
};
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150927/42dae43c/attachment.html>
More information about the LibreOffice
mailing list