[Libreoffice-commits] .: 2 commits - connectivity/source i18npool/qa i18npool/source oox/inc oox/source sc/source slideshow/source svtools/inc svtools/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Thu Apr 12 01:46:52 PDT 2012


 connectivity/source/commontools/dbexception.cxx     |    4 
 i18npool/qa/cppunit/test_breakiterator.cxx          |   73 ++++++++++++++---
 i18npool/source/breakiterator/data/char.txt         |    7 -
 i18npool/source/breakiterator/data/char_in.txt      |    7 -
 oox/inc/oox/dump/dumperbase.hxx                     |    8 -
 oox/source/dump/dumperbase.cxx                      |   28 ------
 sc/source/filter/oox/workbookhelper.cxx             |    8 -
 slideshow/source/engine/animationnodes/basenode.cxx |    8 -
 slideshow/source/engine/animationnodes/basenode.hxx |    1 
 svtools/inc/svtools/scrwin.hxx                      |    1 
 svtools/source/control/scrwin.cxx                   |   83 --------------------
 unusedcode.easy                                     |   10 +-
 12 files changed, 74 insertions(+), 164 deletions(-)

New commits:
commit be3ee9c889f4240848a3f232f2b3009ea647fefc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 12 09:45:52 2012 +0100

    callcatcher: update unused code list

diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index b4e862f..37fbb2a 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -437,11 +437,9 @@ void throwFunctionNotSupportedException( const sal_Char* _pAsciiFunctionName, co
             STR_UNSUPPORTED_FUNCTION,
             "$functionname$", ::rtl::OUString::createFromAscii( _pAsciiFunctionName )
          ) );
-    throw SQLException(
+    throwFunctionNotSupportedException(
         sError,
         _rxContext,
-        getStandardSQLState( SQL_FUNCTION_NOT_SUPPORTED ),
-        0,
         _pNextException ? *_pNextException : Any()
     );
 }
diff --git a/oox/inc/oox/dump/dumperbase.hxx b/oox/inc/oox/dump/dumperbase.hxx
index 10b1e11..10995ef 100644
--- a/oox/inc/oox/dump/dumperbase.hxx
+++ b/oox/inc/oox/dump/dumperbase.hxx
@@ -380,9 +380,6 @@ public:
     static void         appendAddrName( ::rtl::OUStringBuffer& rStr, sal_Unicode cPrefix, sal_Int32 nColRow, bool bRel );
 
     static void         appendAddress( ::rtl::OUStringBuffer& rStr, const Address& rPos );
-    static void         appendRange( ::rtl::OUStringBuffer& rStr, const Range& rRange );
-
-    static void         appendAddress( ::rtl::OUStringBuffer& rStr, const TokenAddress& rPos, bool bR1C1 );
 
     // encoded text output ----------------------------------------------------
 
@@ -1848,11 +1845,6 @@ protected:
                             const ::rtl::OUString& rSysFileName,
                             const String& rRecNames,
                             const String& rSimpleRecs = EMPTY_STRING );
-    void                construct(
-                            const OutputObjectBase& rParent,
-                            const BinaryInputStreamRef& rxBaseStrm,
-                            const String& rRecNames,
-                            const String& rSimpleRecs = EMPTY_STRING );
 
     virtual bool        implStartRecord( BinaryInputStream& rBaseStrm, sal_Int64& ornRecPos, sal_Int64& ornRecId, sal_Int64& ornRecSize );
     virtual bool        implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize ) = 0;
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 62a6d4c..d7cc27d 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -504,27 +504,6 @@ void StringHelper::appendAddress( OUStringBuffer& rStr, const Address& rPos )
     appendAddrRow( rStr, rPos.mnRow, true );
 }
 
-void StringHelper::appendRange( OUStringBuffer& rStr, const Range& rRange )
-{
-    appendAddress( rStr, rRange.maFirst );
-    rStr.append( OOX_DUMP_RANGESEP );
-    appendAddress( rStr, rRange.maLast );
-}
-
-void StringHelper::appendAddress( OUStringBuffer& rStr, const TokenAddress& rPos, bool bR1C1 )
-{
-    if( bR1C1 && (rPos.mbRelCol || rPos.mbRelRow) )
-    {
-        appendAddrName( rStr, OOX_DUMP_R1C1ROW, rPos.mnRow, rPos.mbRelRow );
-        appendAddrName( rStr, OOX_DUMP_R1C1COL, rPos.mnCol, rPos.mbRelCol );
-    }
-    else
-    {
-        appendAddrCol( rStr, rPos.mnCol, rPos.mbRelCol );
-        appendAddrRow( rStr, rPos.mnRow, rPos.mbRelRow );
-    }
-}
-
 // encoded text output --------------------------------------------------------
 
 void StringHelper::appendCChar( OUStringBuffer& rStr, sal_Unicode cChar, bool bPrefix )
@@ -2695,13 +2674,6 @@ void SequenceRecordObjectBase::construct( const ObjectBase& rParent,
     RecordObjectBase::construct( rParent, rxBaseStrm, rSysFileName, xRecStrm, rRecNames, rSimpleRecs );
 }
 
-void SequenceRecordObjectBase::construct( const OutputObjectBase& rParent,
-        const BinaryInputStreamRef& rxBaseStrm, const String& rRecNames, const String& rSimpleRecs )
-{
-    BinaryInputStreamRef xRecStrm( new SequenceInputStream( *mxRecData ) );
-    RecordObjectBase::construct( rParent, rxBaseStrm, xRecStrm, rRecNames, rSimpleRecs );
-}
-
 bool SequenceRecordObjectBase::implStartRecord( BinaryInputStream& rBaseStrm, sal_Int64& ornRecPos, sal_Int64& ornRecId, sal_Int64& ornRecSize )
 {
     bool bValid = true;
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 627854f..5bdac51 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -231,8 +231,6 @@ public:
     inline BiffType     getBiff() const { return meBiff; }
     /** Returns the text encoding used to import/export byte strings. */
     inline rtl_TextEncoding getTextEncoding() const { return meTextEnc; }
-    /** Sets the text encoding to import/export byte strings. */
-    void                setTextEncoding( rtl_TextEncoding eTextEnc );
     /** Returns the codec helper that stores the encoder/decoder object. */
     inline BiffCodecHelper& getCodecHelper() { return *mxCodecHelper; }
 
@@ -503,12 +501,6 @@ Reference< XStyle > WorkbookGlobals::createStyleObject( OUString& orStyleName, b
 
 // BIFF specific --------------------------------------------------------------
 
-void WorkbookGlobals::setTextEncoding( rtl_TextEncoding eTextEnc )
-{
-    if( eTextEnc != RTL_TEXTENCODING_DONTKNOW )
-        meTextEnc = eTextEnc;
-}
-
 // private --------------------------------------------------------------------
 
 void WorkbookGlobals::initialize( bool bWorkbookFile )
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index 8150f88..b434413 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -748,14 +748,6 @@ const char* BaseNode::getDescription() const
     return "BaseNode";
 }
 
-void BaseNode::showTreeFromWithin() const
-{
-    // find root node
-    BaseNodeSharedPtr pCurrNode( mpSelf );
-    while( pCurrNode->mpParent ) pCurrNode = pCurrNode->mpParent;
-
-    pCurrNode->showState();
-}
 #endif
 
 } // namespace internal
diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx
index eb0aef7..80d306d 100644
--- a/slideshow/source/engine/animationnodes/basenode.hxx
+++ b/slideshow/source/engine/animationnodes/basenode.hxx
@@ -112,7 +112,6 @@ public:
 #if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL)
     virtual void showState() const;
     virtual const char* getDescription() const;
-    void showTreeFromWithin() const;
 #endif
 
     const ::boost::shared_ptr< BaseContainerNode >& getParentNode() const
diff --git a/svtools/inc/svtools/scrwin.hxx b/svtools/inc/svtools/scrwin.hxx
index f38ec01..152649d 100644
--- a/svtools/inc/svtools/scrwin.hxx
+++ b/svtools/inc/svtools/scrwin.hxx
@@ -90,7 +90,6 @@ public:
     void            SetTotalSize( const Size& rNewSize );
     Size            GetTotalSize() { return PixelToLogic( aTotPixSz ); }
 
-    sal_Bool        MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy = sal_False );
     Rectangle       GetVisibleArea() const;
 
     using Window::Scroll;
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index a60833b..5363db7 100644
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -329,89 +329,6 @@ void ScrollableWindow::SetTotalSize( const Size& rNewSize )
 
 //-------------------------------------------------------------------
 
-sal_Bool ScrollableWindow::MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy )
-{
-    Rectangle aTarget;
-    Rectangle aTotRect( Point(0, 0), PixelToLogic( aTotPixSz ) );
-
-    if ( bSloppy )
-    {
-        aTarget = rTarget;
-
-        // at maximum to right border
-        if ( aTarget.Right() > aTotRect.Right() )
-        {
-            long nDelta = aTarget.Right() - aTotRect.Right();
-            aTarget.Left() -= nDelta;
-            aTarget.Right() -= nDelta;
-
-            // too wide?
-            if ( aTarget.Left() < aTotRect.Left() )
-                aTarget.Left() = aTotRect.Left();
-        }
-
-        // at maximum to bottom border
-        if ( aTarget.Bottom() > aTotRect.Bottom() )
-        {
-            long nDelta = aTarget.Bottom() - aTotRect.Bottom();
-            aTarget.Top() -= nDelta;
-            aTarget.Bottom() -= nDelta;
-
-            // too high?
-            if ( aTarget.Top() < aTotRect.Top() )
-                aTarget.Top() = aTotRect.Top();
-        }
-
-        // at maximum to left border
-        if ( aTarget.Left() < aTotRect.Left() )
-        {
-            long nDelta = aTarget.Left() - aTotRect.Left();
-            aTarget.Right() -= nDelta;
-            aTarget.Left() -= nDelta;
-
-            // too wide?
-            if ( aTarget.Right() > aTotRect.Right() )
-                aTarget.Right() = aTotRect.Right();
-        }
-
-        // at maximum to top border
-        if ( aTarget.Top() < aTotRect.Top() )
-        {
-            long nDelta = aTarget.Top() - aTotRect.Top();
-            aTarget.Bottom() -= nDelta;
-            aTarget.Top() -= nDelta;
-
-            // too high?
-            if ( aTarget.Bottom() > aTotRect.Bottom() )
-                aTarget.Bottom() = aTotRect.Bottom();
-        }
-    }
-    else
-        aTarget = rTarget.GetIntersection( aTotRect );
-
-    // is the area already visible?
-    Rectangle aVisArea( GetVisibleArea() );
-    if ( aVisArea.IsInside(rTarget) )
-        return sal_True;
-
-    // is there somewhat to scroll?
-    if ( aVisArea.TopLeft() != aTarget.TopLeft() )
-    {
-        Rectangle aBox( aTarget.GetUnion(aVisArea) );
-        long  nDeltaX = ( aBox.Right() - aVisArea.Right() ) +
-                        ( aBox.Left() - aVisArea.Left() );
-        long  nDeltaY = ( aBox.Top() - aVisArea.Top() ) +
-                        ( aBox.Bottom() - aVisArea.Bottom() );
-        Scroll( nDeltaX, nDeltaY );
-    }
-
-    // determine if the target is completely visible
-    return aVisArea.GetWidth() >= aTarget.GetWidth() &&
-           aVisArea.GetHeight() >= aTarget.GetHeight();
-}
-
-//-------------------------------------------------------------------
-
 Rectangle ScrollableWindow::GetVisibleArea() const
 {
     Point aTopLeft( PixelToLogic( Point() ) );
diff --git a/unusedcode.easy b/unusedcode.easy
index acb0b6c..ec1bfeb 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -66,6 +66,7 @@ ScConditionalFormats_Impl::Remove(ScConditionalFormat* const&, unsigned short)
 ScConditionalFormats_Impl::Remove(unsigned short, unsigned short)
 ScCsvControl::ScCsvControl(Window*, ScCsvLayoutData const&, long)
 ScDBCollection::AnonDBs::erase(boost::void_ptr_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<void**, std::__cxx1998::vector<void*, std::allocator<void*> > >, std::__debug::vector<void*, std::allocator<void*> > >, ScDBData>)
+ScDBCollection::AnonDBs::findByTable(short) const
 ScDBCollection::AnonDBs::size() const
 ScDPItemData::ScDPItemData(rtl::OUString const*)
 ScDPItemData::SetErrorString(rtl::OUString const&)
@@ -105,7 +106,6 @@ ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent()
 ScVbaFormat<ooo::vba::excel::XStyle>::getXServiceInfo()
 ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&)
 ScVbaFormat<ooo::vba::excel::XStyle>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&)
-ScrollableWindow::MakeVisible(Rectangle const&, unsigned char)
 SectReprArr::Insert(SectRepr* const&, unsigned short&)
 SectReprArr::Insert(SectRepr* const*, unsigned short)
 SectReprArr::Insert(SectReprArr const*, unsigned short, unsigned short)
@@ -437,7 +437,6 @@ binfilter::ScriptTypePosInfos::Insert(binfilter::ScriptTypePosInfos const*, unsi
 binfilter::ScriptTypePosInfos::Replace(binfilter::ScriptTypePosInfo const&, unsigned short)
 binfilter::ScriptTypePosInfos::Replace(binfilter::ScriptTypePosInfo const*, unsigned short, unsigned short)
 binfilter::ScriptTypePosInfos::_ForEach(unsigned short, unsigned short, unsigned char (*)(binfilter::ScriptTypePosInfo const&, void*), void*)
-binfilter::SdXMLFilter::SdXMLFilter(binfilter::SfxMedium&, binfilter::SdDrawDocShell&, unsigned char, binfilter::SdXMLFilterMode)
 binfilter::SdrUnoControlAccessArr::DeleteAndDestroy(unsigned short, unsigned short)
 binfilter::SdrUnoControlAccessArr::Insert(binfilter::SdrUnoControlAccess* const&, unsigned short&)
 binfilter::SdrUnoControlAccessArr::Insert(binfilter::SdrUnoControlAccess* const*, unsigned short)
@@ -740,7 +739,6 @@ dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(com::sun::star::
 dbtools::StatementComposer::getDisposeComposer() const
 dbtools::getComposedRowSetStatement(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, unsigned char, unsigned char)
 dbtools::getConnection(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
-dbtools::throwFunctionNotSupportedException(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, com::sun::star::uno::Any const&)
 dp_misc::TRACE(rtl::OString const&)
 dp_misc::writeConsoleError(rtl::OString const&)
 drawinglayer::attribute::SdrFormTextAttribute::getFormTextShdwTransp() const
@@ -765,7 +763,7 @@ oox::PropertyMap::dump(com::sun::star::uno::Reference<com::sun::star::beans::XPr
 oox::core::BinaryFilterBase::BinaryFilterBase(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
 oox::core::FilterBase::openSubStorage(rtl::OUString const&, bool) const
 oox::core::FilterBase::requestEncryptionData(comphelper::IDocPasswordVerifier&) const
-oox::dump::SequenceRecordObjectBase::construct(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&, oox::dump::String const&, oox::dump::String const&)
+oox::xls::Alignment::setBiff2Data(unsigned char)
 oox::xls::Alignment::setBiff3Data(unsigned short)
 oox::xls::Alignment::setBiff4Data(unsigned short)
 oox::xls::Alignment::setBiff5Data(unsigned short)
@@ -777,6 +775,7 @@ oox::xls::BiffDrawingObjectBase::importObjBiff4(oox::xls::WorksheetHelper const&
 oox::xls::BiffDrawingObjectBase::importObjBiff5(oox::xls::WorksheetHelper const&, oox::xls::BiffInputStream&)
 oox::xls::BiffHelper::calcTextEncodingFromCodePage(unsigned short)
 oox::xls::BiffWorkbookContextBase::BiffWorkbookContextBase(oox::xls::WorkbookHelper const&)
+oox::xls::Border::setBiff2Data(unsigned char)
 oox::xls::Border::setBiff3Data(unsigned int)
 oox::xls::Border::setBiff5Data(unsigned int, unsigned int)
 oox::xls::Border::setBiff8Data(unsigned int, unsigned int)
@@ -792,6 +791,7 @@ oox::xls::ExternalLink::importExternalName(oox::xls::BiffInputStream&)
 oox::xls::ExternalLinkBuffer::importExternSheet(oox::xls::BiffInputStream&)
 oox::xls::ExternalLinkBuffer::importExternSheet8(oox::xls::BiffInputStream&)
 oox::xls::ExternalLinkBuffer::importExternalBook(oox::xls::BiffInputStream&)
+oox::xls::Fill::setBiff2Data(unsigned char)
 oox::xls::Fill::setBiff3Data(unsigned short)
 oox::xls::Fill::setBiff5Data(unsigned int)
 oox::xls::Fill::setBiff8Data(unsigned int, unsigned short)
@@ -809,6 +809,7 @@ oox::xls::PivotTable::importPTDefinition2(oox::xls::BiffInputStream&)
 oox::xls::PivotTable::importPTPageFields(oox::xls::BiffInputStream&)
 oox::xls::PivotTable::importPTRowColFields(oox::xls::BiffInputStream&)
 oox::xls::PivotTableField::importPTField(oox::xls::BiffInputStream&)
+oox::xls::Protection::setBiff2Data(unsigned char)
 oox::xls::Protection::setBiff3Data(unsigned short)
 oox::xls::QueryTable::importQueryTable(oox::xls::BiffInputStream&)
 oox::xls::QueryTable::importQueryTableRefresh(oox::xls::BiffInputStream&)
@@ -816,6 +817,7 @@ oox::xls::QueryTable::importQueryTableSettings(oox::xls::BiffInputStream&)
 oox::xls::RichString::importByteString(oox::xls::BiffInputStream&, unsigned short, int)
 oox::xls::RichString::importUniString(oox::xls::BiffInputStream&, int)
 oox::xls::Scenario::importScenario(oox::xls::BiffInputStream&)
+oox::xls::Xf::setAllUsedFlags(bool)
 oox::xls::Xf::setBiffUsedFlags(unsigned char)
 psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&)
 psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&)
commit 16cd97480d0681d37f86e89366e1f9964ec16ef8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 12 09:35:33 2012 +0100

    Resolves: fdo#40292 Tamil grapheme cluster rules

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 820e57b..7a70f01 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -80,10 +80,10 @@ private:
     uno::Reference<i18n::XBreakIterator> m_xBreak;
 };
 
-//See https://bugs.freedesktop.org/show_bug.cgi?id=31271 for motivation
+//See https://bugs.freedesktop.org/show_bug.cgi?id=31271
 void TestBreakIterator::testLineBreaking()
 {
-    ::rtl::OUString aTest1(RTL_CONSTASCII_USTRINGPARAM("(some text here)"));
+    ::rtl::OUString aTest(RTL_CONSTASCII_USTRINGPARAM("(some text here)"));
 
     i18n::LineBreakHyphenationOptions aHyphOptions;
     i18n::LineBreakUserOptions aUserOptions;
@@ -94,18 +94,19 @@ void TestBreakIterator::testLineBreaking()
 
     {
         //Here we want the line break to leave text here) on the next line
-        i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest1, strlen("(some tex"), aLocale, 0, aHyphOptions, aUserOptions);
+        i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest, strlen("(some tex"), aLocale, 0, aHyphOptions, aUserOptions);
         CPPUNIT_ASSERT_MESSAGE("Expected a break at the the start of the word", aResult.breakIndex == 6);
     }
 
     {
         //Here we want the line break to leave "here)" on the next line
-        i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest1, strlen("(some text here"), aLocale, 0, aHyphOptions, aUserOptions);
+        i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest, strlen("(some text here"), aLocale, 0, aHyphOptions, aUserOptions);
         CPPUNIT_ASSERT_MESSAGE("Expected a break at the the start of the word", aResult.breakIndex == 11);
     }
 }
 
-//See http://qa.openoffice.org/issues/show_bug.cgi?id=111152 for motivation
+//See http://qa.openoffice.org/issues/show_bug.cgi?id=111152
+//See https://bugs.freedesktop.org/show_bug.cgi?id=40292
 void TestBreakIterator::testGraphemeIteration()
 {
     lang::Locale aLocale;
@@ -114,46 +115,90 @@ void TestBreakIterator::testGraphemeIteration()
 
     {
         const sal_Unicode BA_HALANT_LA[] = { 0x09AC, 0x09CD, 0x09AF };
-        ::rtl::OUString aTest1(BA_HALANT_LA, SAL_N_ELEMENTS(BA_HALANT_LA));
+        ::rtl::OUString aTest(BA_HALANT_LA, SAL_N_ELEMENTS(BA_HALANT_LA));
 
         sal_Int32 nDone=0;
         sal_Int32 nPos;
-        nPos = m_xBreak->nextCharacters(aTest1, 0, aLocale,
+        nPos = m_xBreak->nextCharacters(aTest, 0, aLocale,
             i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
         CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == SAL_N_ELEMENTS(BA_HALANT_LA));
-        nPos = m_xBreak->previousCharacters(aTest1, SAL_N_ELEMENTS(BA_HALANT_LA), aLocale,
+        nPos = m_xBreak->previousCharacters(aTest, SAL_N_ELEMENTS(BA_HALANT_LA), aLocale,
             i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
         CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == 0);
     }
 
     {
         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));
+        ::rtl::OUString aTest(HA_HALANT_NA_VOWELSIGNI, SAL_N_ELEMENTS(HA_HALANT_NA_VOWELSIGNI));
 
         sal_Int32 nDone=0;
         sal_Int32 nPos;
-        nPos = m_xBreak->nextCharacters(aTest1, 0, aLocale,
+        nPos = m_xBreak->nextCharacters(aTest, 0, aLocale,
             i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
         CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == SAL_N_ELEMENTS(HA_HALANT_NA_VOWELSIGNI));
-        nPos = m_xBreak->previousCharacters(aTest1, SAL_N_ELEMENTS(HA_HALANT_NA_VOWELSIGNI), aLocale,
+        nPos = m_xBreak->previousCharacters(aTest, SAL_N_ELEMENTS(HA_HALANT_NA_VOWELSIGNI), aLocale,
             i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
         CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == 0);
     }
 
     {
         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));
+        ::rtl::OUString aTest(TA_HALANT_MA_HALANT_YA, SAL_N_ELEMENTS(TA_HALANT_MA_HALANT_YA));
 
         sal_Int32 nDone=0;
         sal_Int32 nPos;
-        nPos = m_xBreak->nextCharacters(aTest1, 0, aLocale,
+        nPos = m_xBreak->nextCharacters(aTest, 0, aLocale,
             i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
         CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == SAL_N_ELEMENTS(TA_HALANT_MA_HALANT_YA));
-        nPos = m_xBreak->previousCharacters(aTest1, SAL_N_ELEMENTS(TA_HALANT_MA_HALANT_YA), aLocale,
+        nPos = m_xBreak->previousCharacters(aTest, SAL_N_ELEMENTS(TA_HALANT_MA_HALANT_YA), aLocale,
             i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
         CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == 0);
     }
 
+    aLocale.Language = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ta"));
+    aLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IN"));
+
+    {
+        const sal_Unicode KA_VIRAMA_SSA[] = { 0x0B95, 0x0BCD, 0x0BB7 };
+        ::rtl::OUString aTest(KA_VIRAMA_SSA, SAL_N_ELEMENTS(KA_VIRAMA_SSA));
+
+        sal_Int32 nDone=0;
+        sal_Int32 nPos = 0;
+
+        nPos = m_xBreak->nextCharacters(aTest, 0, aLocale,
+            i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
+        CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == SAL_N_ELEMENTS(KA_VIRAMA_SSA));
+        nPos = m_xBreak->previousCharacters(aTest, SAL_N_ELEMENTS(KA_VIRAMA_SSA), aLocale,
+            i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
+        CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == 0);
+    }
+
+    {
+        const sal_Unicode CA_VOWELSIGNI_TA_VIRAMA_TA_VOWELSIGNI_RA_VOWELSIGNAI[] =
+            { 0x0B9A, 0x0BBF, 0x0BA4, 0x0BCD, 0x0BA4, 0x0BBF, 0x0BB0, 0x0BC8 };
+        ::rtl::OUString aTest(CA_VOWELSIGNI_TA_VIRAMA_TA_VOWELSIGNI_RA_VOWELSIGNAI,
+            SAL_N_ELEMENTS(CA_VOWELSIGNI_TA_VIRAMA_TA_VOWELSIGNI_RA_VOWELSIGNAI));
+
+        sal_Int32 nDone=0;
+        sal_Int32 nPos=0;
+
+        for (sal_Int32 i = 0; i < 4; ++i)
+        {
+            sal_Int32 nOldPos = nPos;
+            nPos = m_xBreak->nextCharacters(aTest, nPos, aLocale,
+                i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
+            CPPUNIT_ASSERT_MESSAGE("Should skip 2 units", nPos == nOldPos+2);
+        }
+
+        for (sal_Int32 i = 0; i < 4; ++i)
+        {
+            sal_Int32 nOldPos = nPos;
+            nPos = m_xBreak->previousCharacters(aTest, nPos, aLocale,
+                i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
+            CPPUNIT_ASSERT_MESSAGE("Should skip 2 units", nPos == nOldPos-2);
+        }
+    }
+
     {
         const sal_Unicode ALEF_QAMATS [] = { 0x05D0, 0x05B8 };
         ::rtl::OUString aText(ALEF_QAMATS, SAL_N_ELEMENTS(ALEF_QAMATS));
diff --git a/i18npool/source/breakiterator/data/char.txt b/i18npool/source/breakiterator/data/char.txt
index 8e49a56..6ab8803 100644
--- a/i18npool/source/breakiterator/data/char.txt
+++ b/i18npool/source/breakiterator/data/char.txt
@@ -40,8 +40,9 @@ $OriyaLetter = [\u0B05-\u0B39 \u0B5C-\u0B61 \u0B71];
 $OriyaSignVirama = \u0B4D;
 $GurmukhiLetter = [\u0A05-\u0A39 \u0A59-\u0A5E];
 $GurmukhiSignVirama = \u0A4D;
-$TamilLetter = [\u0B85-\u0BB9];
+$TamilKa = \u0B95;
 $TamilSignVirama = \u0BCD;
+$TamilSsa = \u0BB7;
 $TeluguLetter = [\u0C05-\u0C39 \u0C58-\u0C61];
 $TeluguSignVirama = \u0C4D;
 
@@ -70,7 +71,7 @@ $KannadaLetter ($KannadaSignVirama $KannadaLetter?)+;
 $MalayalamLetter ($MalayalamSignVirama $MalayalamLetter?)+;
 $OriyaLetter ($OriyaSignVirama $OriyaLetter?)+;
 $GurmukhiLetter ($GurmukhiSignVirama $GurmukhiLetter?)+;
-$TamilLetter ($TamilSignVirama $TamilLetter?)+;
+$TamilKa $TamilSignVirama $TamilSsa;
 $TeluguLetter ($TeluguSignVirama $TeluguLetter?)+;
 
 $L ($L | $V | $LV | $LVT);
@@ -95,7 +96,7 @@ $LF $CR;
 ($MalayalamLetter? $MalayalamSignVirama)+ $MalayalamLetter;
 ($OriyaLetter? $OriyaSignVirama)+ $OriyaLetter;
 ($GurmukhiLetter? $GurmukhiSignVirama)+ $GurmukhiLetter;
-($TamilLetter? $TamilSignVirama)+ $TamilLetter;
+$TamilSsa $TamilSignVirama $TamilKa;
 ($TeluguLetter? $TeluguSignVirama)+ $TeluguLetter;
 ($L | $V | $LV | $LVT) $L;
 ($V | $T) ($LV | $V);
diff --git a/i18npool/source/breakiterator/data/char_in.txt b/i18npool/source/breakiterator/data/char_in.txt
index 5e1ed67..e791055 100644
--- a/i18npool/source/breakiterator/data/char_in.txt
+++ b/i18npool/source/breakiterator/data/char_in.txt
@@ -32,8 +32,9 @@ $OriyaLetter = [\u0B05-\u0B39 \u0B5C-\u0B61 \u0B71];
 $OriyaSignVirama = \u0B4D;
 $GurmukhiLetter = [\u0A05-\u0A39 \u0A59-\u0A5E];
 $GurmukhiSignVirama = \u0A4D;
-$TamilLetter = [\u0B85-\u0BB9];
+$TamilKa = \u0B95;
 $TamilSignVirama = \u0BCD;
+$TamilSsa = \u0BB7;
 $TeluguLetter = [\u0C05-\u0C39 \u0C58-\u0C61];
 $TeluguSignVirama = \u0C4D;
 
@@ -62,7 +63,7 @@ $KannadaLetter ($KannadaSignVirama $KannadaLetter?)+;
 $MalayalamLetter ($MalayalamSignVirama $MalayalamLetter?)+;
 $OriyaLetter ($OriyaSignVirama $OriyaLetter?)+;
 $GurmukhiLetter ($GurmukhiSignVirama $GurmukhiLetter?)+;
-$TamilLetter ($TamilSignVirama $TamilLetter?)+;
+$TamilKa $TamilSignVirama $TamilSsa;
 $TeluguLetter ($TeluguSignVirama $TeluguLetter?)+;
 
 $L ($L | $V | $LV | $LVT);
@@ -86,7 +87,7 @@ $LF $CR;
 ($MalayalamLetter? $MalayalamSignVirama)+ $MalayalamLetter;
 ($OriyaLetter? $OriyaSignVirama)+ $OriyaLetter;
 ($GurmukhiLetter? $GurmukhiSignVirama)+ $GurmukhiLetter;
-($TamilLetter? $TamilSignVirama)+ $TamilLetter;
+$TamilSsa $TamilSignVirama $TamilKa;
 ($TeluguLetter? $TeluguSignVirama)+ $TeluguLetter;
 ($L | $V | $LV | $LVT) $L;
 ($V | $T) ($LV | $V);


More information about the Libreoffice-commits mailing list