[Libreoffice-commits] .: Branch 'integration/dev300_m98' - sw/source

Michael Meeks mmeeks at kemper.freedesktop.org
Mon Mar 7 13:14:28 PST 2011


 sw/source/core/txtnode/thints.cxx |    5 -
 sw/source/core/txtnode/txtedt.cxx |  184 --------------------------------------
 sw/source/core/unocore/unotbl.cxx |   31 ------
 sw/source/core/view/viewsh.cxx    |    2 
 sw/source/filter/ww8/wrtww8.hxx   |    2 
 sw/source/ui/app/docsh2.cxx       |    7 -
 sw/source/ui/config/usrpref.cxx   |    3 
 sw/source/ui/docvw/SidebarWin.cxx |    2 
 sw/source/ui/shells/textsh1.cxx   |    2 
 sw/source/ui/uiview/pview.cxx     |    1 
 sw/source/ui/uiview/srcview.cxx   |    1 
 sw/source/ui/uiview/viewling.cxx  |   33 ------
 12 files changed, 6 insertions(+), 267 deletions(-)

New commits:
commit fb7f1fe153699524da1d217143600c2748d6d98a
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Mon Mar 7 21:13:16 2011 +0000

    more writer merge error removal

diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 6ff2a82..68fc912 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2241,10 +2241,6 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet)
             m_pSwpHints->Insert(
                     MakeTxtAttr(*GetDoc(), aCurSet,
                         aCurRange->first.first, aCurRange->first.second));
-            }
-            m_pSwpHints->Insert(
-                    MakeTxtAttr(*GetDoc(), aCurSet,
-                        aCurRange->first.first, aCurRange->first.second));
         }
 
         aCurRange = aRange.second;
@@ -2339,7 +2335,6 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
                 SwFmtChg aTmp1( pNd->GetFmtColl() );
                 pNd->SwModify::Modify( &aTmp1, &aTmp1 );
             }
-            }
         }
     }
 
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index d94fa7b..ed0f91e 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -29,7 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include <hintids.hxx>
 #include <vcl/svapp.hxx>
 #include <svl/itemiter.hxx>
@@ -85,7 +84,6 @@
 
 #include <vector>
 
-
 using rtl::OUString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -1655,168 +1653,8 @@ void SwTxtNode::TransliterateText(
                 String aText( GetTxt().Copy( nCurrentStart, nLen ) );
 #endif
 
-
-struct TransliterationChgData
-{
-    xub_StrLen              nStart;
-    xub_StrLen              nLen;
-    String                  sChanged;
-    Sequence< sal_Int32 >   aOffsets;
-};
-
-void SwTxtNode::TransliterateText( 
-    utl::TransliterationWrapper& rTrans,
-    xub_StrLen nStt, xub_StrLen nEnd, 
-    SwUndoTransliterate* pUndo )
-                {
-    if (nStt < nEnd && pBreakIt->GetBreakIter().is())
-    {
-        // since we don't use Hiragana/Katakana or half-width/full-width transliterations here
-        // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will 
-        // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES
-        // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the
-        // proper thing to do.
-        const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES;
-
-        //! In order to have less trouble with changing text size, e.g. because
-        //! of ligatures or � (German small sz) being resolved, we need to process 
-        //! the text replacements from end to start. 
-        //! This way the offsets for the yet to be changed words will be 
-        //! left unchanged by the already replaced text. 
-        //! For this we temporarily save the changes to be done in this vector
-        std::vector< TransliterationChgData >   aChanges;
-        TransliterationChgData                  aChgData;
-
-        if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::TITLE_CASE)
-        {
-            // for 'capitalize every word' we need to iterate over each word
-
-            Boundary aSttBndry;
-            Boundary aEndBndry;
-            aSttBndry = pBreakIt->GetBreakIter()->getWordBoundary(
-                        GetTxt(), nStt,
-                        pBreakIt->GetLocale( GetLang( nStt ) ),
-                        nWordType,
-                        TRUE /*prefer forward direction*/);
-            aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary(
-                        GetTxt(), nEnd,
-                        pBreakIt->GetLocale( GetLang( nEnd ) ),
-                        nWordType,
-                        FALSE /*prefer backward direction*/);
-
-            // prevent backtracking to the previous word if selection is at word boundary
-            if (aSttBndry.endPos <= nStt)
-            {
-                aSttBndry = pBreakIt->GetBreakIter()->nextWord(
-                        GetTxt(), aSttBndry.endPos,
-                        pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ),
-                        nWordType);
-            }
-            // prevent advancing to the next word if selection is at word boundary
-            if (aEndBndry.startPos >= nEnd)
-            {
-                aEndBndry = pBreakIt->GetBreakIter()->previousWord(
-                        GetTxt(), aEndBndry.startPos,
-                        pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ),
-                        nWordType);
-            }
-
-            Boundary aCurWordBndry( aSttBndry );
-            while (aCurWordBndry.startPos <= aEndBndry.startPos)
-            {
-                nStt = (xub_StrLen)aCurWordBndry.startPos;
-                nEnd = (xub_StrLen)aCurWordBndry.endPos;
-                sal_Int32 nLen = nEnd - nStt;
-                DBG_ASSERT( nLen > 0, "invalid word length of 0" );
-#if OSL_DEBUG_LEVEL > 1
-                String aText( GetTxt().Copy( nStt, nLen ) );
-#endif
-
-                Sequence <sal_Int32> aOffsets;
-                String sChgd( rTrans.transliterate( GetTxt(), GetLang( nStt ), nStt, nLen, &aOffsets ));
-
-                if (!m_Text.Equals( sChgd, nStt, nLen ))
-                {
-                    aChgData.nStart     = nStt;
-                    aChgData.nLen       = nLen;
-                    aChgData.sChanged   = sChgd;
-                    aChgData.aOffsets   = aOffsets;
-                    aChanges.push_back( aChgData );
-                }
-
-                aCurWordBndry = pBreakIt->GetBreakIter()->nextWord(
-                        GetTxt(), nEnd,
-                        pBreakIt->GetLocale( GetLang( nEnd ) ),
-                        nWordType);
-            }
-        }
-        else if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::SENTENCE_CASE)
-        {
-            // for 'sentence case' we need to iterate sentence by sentence
-
-            sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence( 
-                    GetTxt(), nEnd, 
-                    pBreakIt->GetLocale( GetLang( nEnd ) ) );
-            sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                    GetTxt(), nLastStart, 
-                    pBreakIt->GetLocale( GetLang( nLastStart ) ) );
-            
-            // extend nStt, nEnd to the current sentence boundaries
-            sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( 
-                    GetTxt(), nStt, 
-                    pBreakIt->GetLocale( GetLang( nStt ) ) );
-            sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                    GetTxt(), nCurrentStart, 
-                    pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
-
-            // prevent backtracking to the previous sentence if selection starts at end of a sentence
-            if (nCurrentEnd <= nStt)
-            {
-                // now nCurrentStart is probably located on a non-letter word. (unless we
-                // are in Asian text with no spaces...)
-                // Thus to get the real sentence start we should locate the next real word, 
-                // that is one found by DICTIONARY_WORD
-                i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord( 
-                        GetTxt(), nCurrentEnd,
-                        pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
-                        i18n::WordType::DICTIONARY_WORD);
-
-                // now get new current sentence boundaries
-                nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( 
-                        GetTxt(), aBndry.startPos, 
-                        pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
-                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                        GetTxt(), nCurrentStart, 
-                        pBreakIt->GetLocale( GetLang( nCurrentStart) ) );
-            }
-            // prevent advancing to the next sentence if selection ends at start of a sentence
-            if (nLastStart >= nEnd)
-            {
-                // now nCurrentStart is probably located on a non-letter word. (unless we
-                // are in Asian text with no spaces...)
-                // Thus to get the real sentence start we should locate the previous real word, 
-                // that is one found by DICTIONARY_WORD
-                i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord( 
-                        GetTxt(), nLastStart, 
-                        pBreakIt->GetLocale( GetLang( nLastStart) ),
-                        i18n::WordType::DICTIONARY_WORD);
-                nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                        GetTxt(), aBndry.startPos, 
-                        pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
-                if (nCurrentEnd > nLastEnd)
-                    nCurrentEnd = nLastEnd;
-            }
-
-            while (nCurrentStart < nLastEnd)
-            {
-                sal_Int32 nLen = nCurrentEnd - nCurrentStart;
-                DBG_ASSERT( nLen > 0, "invalid word length of 0" );
-#if OSL_DEBUG_LEVEL > 1
-                String aText( GetTxt().Copy( nCurrentStart, nLen ) );
-#endif
-
                 Sequence <sal_Int32> aOffsets;
-                String sChgd( rTrans.transliterate( GetTxt(), 
+                String sChgd( rTrans.transliterate( GetTxt(),
                         GetLang( nCurrentStart ), nCurrentStart, nLen, &aOffsets ));
 
                 if (!m_Text.Equals( sChgd, nStt, nLen ))
@@ -1834,8 +1672,8 @@ void SwTxtNode::TransliterateText(
                         pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
                         nWordType);
                 nCurrentStart = aFirstWordBndry.startPos;
-                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                        GetTxt(), nCurrentStart, 
+                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+                        GetTxt(), nCurrentStart,
                         pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
             }
         }
@@ -1895,20 +1733,6 @@ void SwTxtNode::TransliterateText(
                 ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets );
             }
         }
-        }
-
-        if (aChanges.size() > 0)
-        {
-            // now apply the changes from end to start to leave the offsets of the
-            // yet unchanged text parts remain the same.
-            for (size_t i = 0; i < aChanges.size(); ++i)
-            {
-                TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ];
-                if (pUndo)
-                    pUndo->AddChanges( *this, rData.nStart, rData.nLen, rData.aOffsets );
-                ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets );
-            }
-        }
     }
 }
 
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 4f06506..835c3ae 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -508,37 +508,6 @@ const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const
     return pBox;
 }
 
-  @param i_pTable the table
-
-  @param i_bTopLeft if true, find top left box, otherwise find bottom
-         right box
- */
-const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft)
-{
-    bool bFirst = true;
-    const SwTableBox* pBox = 0;
-    do
-    {
-        const SwTableLines& rLines(bFirst ? rTableLines : pBox->GetTabLines());
-        bFirst = false;
-        OSL_ASSERT(rLines.Count() != 0);
-        if (rLines.Count() != 0)
-        {
-            const SwTableLine* pLine(rLines[i_bTopLeft ? 0 : rLines.Count() - 1]);
-            OSL_ASSERT(pLine);
-            const SwTableBoxes& rBoxes(pLine->GetTabBoxes());
-            OSL_ASSERT(rBoxes.Count() != 0);
-            pBox = rBoxes[i_bTopLeft ? 0 : rBoxes.Count() - 1];
-            OSL_ASSERT(pBox);
-        }
-        else
-        {
-            pBox = 0;
-        }
-    } while (pBox && !pBox->GetSttNd());
-    return pBox;
-}
-
 // start cell should be in the upper-left corner of the range and
 // end cell in the lower-right.
 // I.e. from the four possible representation
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c1c5ae9..1c1eff1 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2232,8 +2232,6 @@ SwAccessibleMap* ViewShell::GetAccessibleMap()
     return 0;
 }
 
-    return 0;
-}
 void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
 {
     if(pOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 054b3ec..6ced2e7 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -58,7 +58,7 @@ namespace msfilter
     class MSCodec_Std97;
 }
 
-class SwAttrIter;
+class SwWW8AttrIter;
 class AttributeOutputBase;
 class DocxAttributeOutput;
 class RtfAttributeOutput;
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 702d856..017ed8e 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1214,13 +1214,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         ExtendedFilePickerElementIds::LISTBOX_TEMPLATE,
                         0
                     };
-                    sal_Int32 nHelpIds[8];
-                    sal_Int32 nStartHelpId =
-                        bCreateHtml ?
-                            HID_SEND_HTML_CTRL_PUSHBUTTON_OK : HID_SEND_MASTER_CTRL_PUSHBUTTON_OK ;
-                    for(int nHelp = 0; nHelp < 7; nHelp++)
-                        nHelpIds[nHelp] = nStartHelpId++;
-                    nHelpIds[7] = 0;
 
                     const char* aHTMLHelpIds[] = 
                     {                       
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index 5642c55..0c6462c 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -318,9 +318,6 @@ void SwLayoutViewConfig::Commit()
             case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break;        // "Other/IsSquaredPageMode",
             case 20: rVal <<= (sal_Bool ) rParent.IsApplyCharUnit(); break;         // "Other/ApplyCharUnit",
         }
-#warning these Magic numbers need post-merge checking ...
-        if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 || nProp == 20 )
-            pValues[nProp].setValue(&bSet, ::getBooleanCppuType());
     }
     PutProperties(aNames, aValues);
 }
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index ccd09d5..8ee88b6 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -936,8 +936,6 @@ void SwSidebarWin::ExecuteCommand(USHORT nSlot)
             break;
         }
         case FN_DELETE_COMMENT:
-        case FN_DELETE_NOTE:
-
                 //Delete(); // do not kill the parent of our open popup menu
                 mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 );
             break;
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 1d87c6d..7b58ea1 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1701,7 +1701,7 @@ void SwTextShell::ChangeHeaderOrFooter(
         String sTmp(aDesc.GetName());
         if( !rStyleName.Len() || rStyleName == sTmp )
         {
-            if( (bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
+            if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
                     ((bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
                         (!bHeader && aDesc.GetMaster().GetFooter().IsActive())))
             {
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 073a340..5b15de9 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -185,7 +185,6 @@ SwPreViewZoomDlg::~SwPreViewZoomDlg()
 {
 }
 
-SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
 void  SwPreViewZoomDlg::Apply()
 {
     ((SwPagePreViewWin*)GetParent())->CalcWish(
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index ec40aff..cda62f7 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -656,7 +656,6 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
                 StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE );
             }
         }
-        }
     }
     return nFound;
 }
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 686cd4a..b05ca41 100755
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -844,39 +844,6 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt )
     return bRet;
 }
 
-
-
-class SwFieldPopup : public PopupMenu
-{
-public:
-    SwFieldPopup()  {
-    InsertItem(1, ::rtl::OUString::createFromAscii("Hello"));
-    }
-};
-
-class SwFieldListBox : public ListBox
-{
-public:
-    SwFieldListBox(Window* pParent) : ListBox(pParent /*, WB_DROPDOWN*/) {
-    }
-
-    void *GetImplWin() {
-    return NULL; //FIXME!!!
-//	return mpImplWin;
-    }
-
-protected:
-    virtual void LoseFocus() {
-//	printf("ListBox: lose focus!!\n");
-    ListBox::LoseFocus();
-    }    
-
-    virtual void Select() {
-//	printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect());
-    ListBox::Select();
-    }
-};
-
 class SwFieldDialog : public Dialog
 {
 private:


More information about the Libreoffice-commits mailing list