[Libreoffice-commits] .: 4 commits - comphelper/inc comphelper/source i18npool/qa i18npool/source tools/inc tools/source vcl/inc vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jul 19 01:35:01 PDT 2011
comphelper/inc/comphelper/storagehelper.hxx | 8
comphelper/source/misc/storagehelper.cxx | 17 -
i18npool/qa/cppunit/test_breakiterator.cxx | 51 ++++-
i18npool/source/breakiterator/breakiteratorImpl.cxx | 200 ++++++++++++++------
tools/inc/tools/inetmime.hxx | 9
tools/source/inet/inetmime.cxx | 12 -
vcl/inc/vcl/toolbox.hxx | 2
vcl/source/window/toolbox.cxx | 46 ----
8 files changed, 191 insertions(+), 154 deletions(-)
New commits:
commit e76c8d80009c8e29abf0447b7edc157eb42c9e56
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 19 09:21:10 2011 +0100
Resolves: fdo#38095 half&full width forms need to remain asian
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index fc81cc9..7740cf9 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -57,11 +57,13 @@ public:
void testLineBreaking();
void testGraphemeIteration();
void testWeak();
+ void testAsian();
CPPUNIT_TEST_SUITE(TestBreakIterator);
CPPUNIT_TEST(testLineBreaking);
CPPUNIT_TEST(testGraphemeIteration);
CPPUNIT_TEST(testWeak);
+ CPPUNIT_TEST(testAsian);
CPPUNIT_TEST_SUITE_END();
private:
@@ -104,7 +106,7 @@ void TestBreakIterator::testGraphemeIteration()
aLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IN"));
{
- sal_Unicode BA_HALANT_LA[] = { 0x09AC, 0x09CD, 0x09AF };
+ const sal_Unicode BA_HALANT_LA[] = { 0x09AC, 0x09CD, 0x09AF };
::rtl::OUString aTest1(BA_HALANT_LA, SAL_N_ELEMENTS(BA_HALANT_LA));
sal_Int32 nDone=0;
@@ -118,7 +120,7 @@ void TestBreakIterator::testGraphemeIteration()
}
{
- sal_Unicode HA_HALANT_NA_VOWELSIGNI[] = { 0x09B9, 0x09CD, 0x09A3, 0x09BF };
+ const sal_Unicode HA_HALANT_NA_VOWELSIGNI[] = { 0x09B9, 0x09CD, 0x09A3, 0x09BF };
::rtl::OUString aTest1(HA_HALANT_NA_VOWELSIGNI, SAL_N_ELEMENTS(HA_HALANT_NA_VOWELSIGNI));
sal_Int32 nDone=0;
@@ -132,7 +134,7 @@ void TestBreakIterator::testGraphemeIteration()
}
{
- sal_Unicode TA_HALANT_MA_HALANT_YA [] = { 0x09A4, 0x09CD, 0x09AE, 0x09CD, 0x09AF };
+ const sal_Unicode TA_HALANT_MA_HALANT_YA [] = { 0x09A4, 0x09CD, 0x09AE, 0x09CD, 0x09AF };
::rtl::OUString aTest1(TA_HALANT_MA_HALANT_YA, SAL_N_ELEMENTS(TA_HALANT_MA_HALANT_YA));
sal_Int32 nDone=0;
@@ -156,10 +158,12 @@ void TestBreakIterator::testWeak()
aLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"));
{
- sal_Unicode WEAKS[] =
+ const sal_Unicode WEAKS[] =
{
0x0001, 0x0002,
0x0020, 0x00A0,
+ 0x2150, 0x215F, //Number Forms, fractions
+ 0x2160, 0x2180, //Number Forms, roman numerals
0x2200, 0x22FF, //Mathematical Operators
0x27C0, 0x27EF, //Miscellaneous Mathematical Symbols-A
0x2980, 0x29FF, //Miscellaneous Mathematical Symbols-B
@@ -184,6 +188,45 @@ void TestBreakIterator::testWeak()
}
}
+//A test to ensure that certain ranges and codepoints that are categorized as
+//asian remain as asian, so that existing docs that depend on this don't silently
+//change font for those asian chars.
+//See https://bugs.freedesktop.org/show_bug.cgi?id=38095
+void TestBreakIterator::testAsian()
+{
+ lang::Locale aLocale;
+ aLocale.Language = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
+ aLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"));
+
+ {
+ const sal_Unicode ASIANS[] =
+ {
+ //some typical CJK chars
+ 0x4E00, 0x62FF,
+ //The full HalfWidth and FullWidth block has historically been
+ //designated as taking the CJK font :-(
+ //HalfWidth and FullWidth forms of ASCII 0-9, categorized under
+ //UAX24 as "Common" i.e. by that logic WEAK
+ 0xFF10, 0xFF19,
+ //HalfWidth and FullWidth forms of ASCII A-z, categorized under
+ //UAX25 as "Latin", i.e. by that logic LATIN
+ 0xFF21, 0xFF5A
+ };
+ ::rtl::OUString aAsians(ASIANS, SAL_N_ELEMENTS(ASIANS));
+
+ for (sal_Int32 i = 0; i < aAsians.getLength(); ++i)
+ {
+ sal_Int16 nScript = m_xBreak->getScriptType(aAsians, i);
+ rtl::OStringBuffer aMsg;
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("Char 0x"));
+ aMsg.append(static_cast<sal_Int32>(aAsians.getStr()[i]), 16);
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(" should have been asian"));
+ CPPUNIT_ASSERT_MESSAGE(aMsg.getStr(),
+ nScript == i18n::ScriptType::ASIAN);
+ }
+ }
+}
+
TestBreakIterator::TestBreakIterator()
{
m_xContext = cppu::defaultBootstrap_InitialComponentContext();
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 601acef..377e575 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -443,67 +443,155 @@ sal_Int16 SAL_CALL BreakIteratorImpl::getWordType( const OUString& /*Text*/,
return 0;
}
-static sal_Int16 scriptTypes[] = {
- ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX,
- ScriptType::ASIAN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN,
-// 15
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::ASIAN, ScriptType::COMPLEX,
- ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN,
-// 30
- ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::LATIN, ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
-// 45
- ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN,
- ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
-// 60
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::ASIAN,
-// 75
- ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
-// 90
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX,
-// 105
- ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN,
-// 120
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::WEAK, ScriptType::WEAK,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
-// 135
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
- ScriptType::COMPLEX,
- ScriptType::WEAK};
-
-#define scriptListCount SAL_N_ELEMENTS(scriptTypes)
+namespace
+{
+ //See unicode/uscript.h
+ static sal_Int16 scriptTypes[] =
+ {
+ ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX,
+ ScriptType::ASIAN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN,
+ // 15
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::ASIAN, ScriptType::COMPLEX,
+ ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN,
+ // 30
+ ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::LATIN, ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ // 45
+ ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN,
+ ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ // 60
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::ASIAN,
+ // 75
+ ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ // 90
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX,
+ // 105
+ ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN,
+ // 120
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::WEAK, ScriptType::WEAK,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ // 135
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX,
+ ScriptType::COMPLEX,
+ ScriptType::WEAK
+ };
+
+# define scriptTypesCount SAL_N_ELEMENTS(scriptTypes)
+
+ sal_Int16 getScriptClassByUAX24Script(sal_uInt32 currentChar)
+ {
+ sal_Int16 nRet;
+ int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
+ if (script < 0)
+ nRet = ScriptType::WEAK;
+ else if (static_cast<size_t>(script) >= SAL_N_ELEMENTS(scriptTypes))
+ nRet = ScriptType::COMPLEX; // anything new is going to be pretty wild
+ else
+ nRet = scriptTypes[script];
+ return nRet;
+ }
+
+ struct UBlock2Script
+ {
+ UBlockCode from;
+ UBlockCode to;
+ sal_Int16 script;
+ };
+
+ static UBlock2Script scriptList[] =
+ {
+ {UBLOCK_NO_BLOCK, UBLOCK_NO_BLOCK, ScriptType::WEAK},
+ {UBLOCK_BASIC_LATIN, UBLOCK_ARMENIAN, ScriptType::LATIN},
+ {UBLOCK_HEBREW, UBLOCK_MYANMAR, ScriptType::COMPLEX},
+ {UBLOCK_GEORGIAN, UBLOCK_GEORGIAN, ScriptType::LATIN},
+ {UBLOCK_HANGUL_JAMO, UBLOCK_HANGUL_JAMO, ScriptType::ASIAN},
+ {UBLOCK_ETHIOPIC, UBLOCK_ETHIOPIC, ScriptType::COMPLEX},
+ {UBLOCK_CHEROKEE, UBLOCK_RUNIC, ScriptType::LATIN},
+ {UBLOCK_KHMER, UBLOCK_MONGOLIAN, ScriptType::COMPLEX},
+ {UBLOCK_LATIN_EXTENDED_ADDITIONAL, UBLOCK_GREEK_EXTENDED, ScriptType::LATIN},
+ {UBLOCK_NUMBER_FORMS, UBLOCK_NUMBER_FORMS, ScriptType::WEAK},
+ {UBLOCK_CJK_RADICALS_SUPPLEMENT, UBLOCK_HANGUL_SYLLABLES, ScriptType::ASIAN},
+ {UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, ScriptType::ASIAN},
+ {UBLOCK_ARABIC_PRESENTATION_FORMS_A, UBLOCK_ARABIC_PRESENTATION_FORMS_A, ScriptType::COMPLEX},
+ {UBLOCK_CJK_COMPATIBILITY_FORMS, UBLOCK_CJK_COMPATIBILITY_FORMS, ScriptType::ASIAN},
+ {UBLOCK_ARABIC_PRESENTATION_FORMS_B, UBLOCK_ARABIC_PRESENTATION_FORMS_B, ScriptType::COMPLEX},
+ {UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, ScriptType::ASIAN},
+ {UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B, UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, ScriptType::ASIAN},
+ {UBLOCK_CJK_STROKES, UBLOCK_CJK_STROKES, ScriptType::ASIAN},
+ {UBLOCK_LATIN_EXTENDED_C, UBLOCK_LATIN_EXTENDED_D, ScriptType::LATIN}
+ };
+
+ #define scriptListCount SAL_N_ELEMENTS(scriptTypes)
+
+ //always sets rScriptType
+ //
+ //returns true for characters historically explicitly assigned to
+ //latin/weak/asian
+ //
+ //returns false for characters that historically implicitly assigned to
+ //weak as unknown
+ bool getCompatibilityScriptClassByBlock(sal_uInt32 currentChar, sal_Int16 &rScriptType)
+ {
+ bool bKnown = true;
+ //handle specific characters always as weak:
+ // 0x01 - this breaks a word
+ // 0x02 - this can be inside a word
+ // 0x20 & 0xA0 - Bug 102975, declare western space and non-break space as WEAK char.
+ if( 0x01 == currentChar || 0x02 == currentChar || 0x20 == currentChar || 0xA0 == currentChar)
+ rScriptType = ScriptType::WEAK;
+ // workaround for Coptic
+ else if ( 0x2C80 <= currentChar && 0x2CE3 >= currentChar)
+ rScriptType = ScriptType::LATIN;
+ else
+ {
+ UBlockCode block=ublock_getCode(currentChar);
+ size_t i = 0;
+ while (i < scriptListCount)
+ {
+ if (block <= scriptList[i].to)
+ break;
+ ++i;
+ }
+ if (i < scriptListCount && block >= scriptList[i].from)
+ rScriptType = scriptList[i].script;
+ else
+ {
+ rScriptType = ScriptType::WEAK;
+ bKnown = false;
+ }
+ }
+ return bKnown;
+ }
+}
sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar)
{
- static sal_uInt32 lastChar = 0;
- static sal_Int16 nRet = 0;
+ static sal_uInt32 lastChar = 0;
+ static sal_Int16 nRet = 0;
- if (currentChar != lastChar) {
- lastChar = currentChar;
+ if (currentChar != lastChar)
+ {
+ lastChar = currentChar;
- int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
- if (script < 0)
- nRet = ScriptType::WEAK;
- else if (static_cast<size_t>(script) >= SAL_N_ELEMENTS(scriptTypes))
- nRet = ScriptType::COMPLEX; // anything new is going to be pretty wild
- else
- nRet = scriptTypes[script];
- }
- return nRet;
+ if (!getCompatibilityScriptClassByBlock(currentChar, nRet))
+ nRet = getScriptClassByUAX24Script(currentChar);
+ }
+
+ return nRet;
}
static inline sal_Bool operator == (const Locale& l1, const Locale& l2) {
commit 833864132f7a8e4a35ce3848e6f1478258d0e43b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 19 00:12:15 2011 +0100
callcatcher: remove some unused methods
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index b68792a..ec0f0b7 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -265,8 +265,6 @@ private:
using Window::ImplInvalidate;
SAL_DLLPRIVATE void ImplInvalidate( sal_Bool bNewCalc = sal_False, sal_Bool bFullPaint = sal_False );
SAL_DLLPRIVATE void ImplUpdateItem( sal_uInt16 nIndex = 0xFFFF );
- SAL_DLLPRIVATE void ImplStartCustomizeMode();
- SAL_DLLPRIVATE void ImplEndCustomizeMode();
SAL_DLLPRIVATE const XubString& ImplConvertMenuString( const XubString& rStr );
SAL_DLLPRIVATE sal_Bool ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat = sal_False );
SAL_DLLPRIVATE sal_Bool ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel = sal_False );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index e25ac80..2e491ad 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3768,52 +3768,6 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
// -----------------------------------------------------------------------
-void ToolBox::ImplStartCustomizeMode()
-{
- mbCustomizeMode = sal_True;
-
- mpData->ImplClearLayoutData();
-
- std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
- while ( it != mpData->m_aItems.end() )
- {
- if ( it->mbShowWindow )
- {
- it->mpWindow->Hide();
-
- if ( !(it->maRect.IsEmpty()) )
- Invalidate( it->maRect );
- }
-
- ++it;
- }
-}
-
-// -----------------------------------------------------------------------
-
-void ToolBox::ImplEndCustomizeMode()
-{
- mbCustomizeMode = sal_False;
-
- mpData->ImplClearLayoutData();
-
- std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
- while ( it != mpData->m_aItems.end() )
- {
- if ( it->mbShowWindow )
- {
- if ( !(it->maRect.IsEmpty()) )
- Invalidate( it->maRect );
-
- it->mpWindow->Show();
- }
-
- ++it;
- }
-}
-
-// -----------------------------------------------------------------------
-
void ToolBox::ImplDrawFloatwinBorder( ImplToolItem* pItem )
{
if ( !pItem->maRect.IsEmpty() )
commit 275ce20c4f405157891106781f35a2361a38a794
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 18 23:51:01 2011 +0100
callcatcher: remove unused GetTemporaryStorageOfFormat
diff --git a/comphelper/inc/comphelper/storagehelper.hxx b/comphelper/inc/comphelper/storagehelper.hxx
index 139d927..e8bf004 100644
--- a/comphelper/inc/comphelper/storagehelper.hxx
+++ b/comphelper/inc/comphelper/storagehelper.hxx
@@ -128,14 +128,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
throw ( ::com::sun::star::uno::Exception );
- // The followin methods are related to creation of a storage of specified format
- static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
- GetTemporaryStorageOfFormat(
- const ::rtl::OUString& aFormat,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory
- = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >() )
- throw ( ::com::sun::star::uno::Exception );
-
static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
GetStorageOfFormatFromURL(
const ::rtl::OUString& aFormat,
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index a377377..cec5ce9 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -314,23 +314,6 @@ sal_Int32 OStorageHelper::GetXStorageFormat(
}
// ----------------------------------------------------------------------
-uno::Reference< embed::XStorage > OStorageHelper::GetTemporaryStorageOfFormat(
- const ::rtl::OUString& aFormat,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
- throw ( uno::Exception )
-{
- uno::Reference< lang::XMultiServiceFactory > xFactoryToUse = xFactory.is() ? xFactory : ::comphelper::getProcessServiceFactory();
- if ( !xFactoryToUse.is() )
- throw uno::RuntimeException();
-
- uno::Reference< io::XStream > xTmpStream(
- xFactoryToUse->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) ) ),
- uno::UNO_QUERY_THROW );
-
- return GetStorageOfFormatFromStream( aFormat, xTmpStream, embed::ElementModes::READWRITE, xFactoryToUse );
-}
-
-// ----------------------------------------------------------------------
uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL(
const ::rtl::OUString& aFormat,
const ::rtl::OUString& aURL,
commit 32e5dad6b5d97e0d70be8351822f8876ebb9b7d5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 18 23:30:36 2011 +0100
callcatcher: unused INetMIME::getDigit
diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx
index cf8f817..4a3abe5 100644
--- a/tools/inc/tools/inetmime.hxx
+++ b/tools/inc/tools/inetmime.hxx
@@ -352,15 +352,6 @@ public:
*/
static inline int getBase64Weight(sal_uInt32 nChar);
- /** Get a decimal digit encoded as US-ASCII.
-
- @param nWeight Must be in the range 0--9, inclusive.
-
- @return The decimal digit corresponding to nWeight (US-ASCII
- '0'--'9').
- */
- static sal_uInt32 getDigit(int nWeight);
-
/** Get a hexadecimal digit encoded as US-ASCII.
@param nWeight Must be in the range 0--15, inclusive.
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 6ec7278..fed159c 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -492,18 +492,6 @@ bool INetMIME::isIMAPAtomChar(sal_uInt32 nChar)
//============================================================================
// static
-sal_uInt32 INetMIME::getDigit(int nWeight)
-{
- DBG_ASSERT(nWeight >= 0 && nWeight < 10,
- "INetMIME::getDigit(): Bad weight");
-
- static const sal_Char aDigits[16]
- = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
- return aDigits[nWeight];
-}
-
-//============================================================================
-// static
sal_uInt32 INetMIME::getHexDigit(int nWeight)
{
DBG_ASSERT(nWeight >= 0 && nWeight < 16,
More information about the Libreoffice-commits
mailing list