[ooo-build-commit] Branch 'ooo/master' - sw/inc sw/qa sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Aug 6 20:04:26 PDT 2009


 sw/inc/docsh.hxx                   |    2 
 sw/qa/unoapi/sw.sce                |    4 -
 sw/source/core/crsr/findtxt.cxx    |    2 
 sw/source/core/doc/doc.cxx         |   12 ++--
 sw/source/core/unocore/unobkm.cxx  |    2 
 sw/source/core/unocore/unocoll.cxx |   12 +++-
 sw/source/core/unocore/unotext.cxx |   91 -------------------------------------
 sw/source/ui/app/docsh2.cxx        |   27 ----------
 sw/source/ui/config/optdlg.src     |   10 ++--
 sw/source/ui/config/optpage.cxx    |   80 ++++++++++++++++++--------------
 sw/source/ui/dbui/dbmgr.cxx        |    6 ++
 sw/source/ui/docvw/romenu.cxx      |   42 +++--------------
 sw/source/ui/frmdlg/column.cxx     |    2 
 sw/source/ui/inc/column.hxx        |    1 
 sw/source/ui/inc/wrtsh.hxx         |    1 
 sw/source/ui/index/cnttab.src      |   18 +++----
 sw/source/ui/misc/pggrid.cxx       |    2 
 sw/source/ui/shells/grfsh.cxx      |    2 
 sw/source/ui/table/colwd.src       |   18 +++----
 sw/source/ui/uiview/view2.cxx      |    6 +-
 sw/source/ui/uiview/viewsrch.cxx   |    4 -
 sw/source/ui/wrtsh/select.cxx      |    7 ++
 22 files changed, 121 insertions(+), 230 deletions(-)

New commits:
commit b243f02033437ec1543b12cf32c378edda6425ee
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Aug 6 12:44:16 2009 +0000

    CWS-TOOLING: integrate CWS os132
    2009-07-21 15:24:18 +0200 os  r274201 : #i103696# SwXTextPortion/SwXParagraph excluded
    2009-07-15 13:19:17 +0200 os  r274007 : #i103564# typo
    2009-07-15 13:09:30 +0200 os  r274005 : #i103564# SwFrames::hasElements
    2009-07-15 13:02:16 +0200 os  r274003 : #i103564# SwXBookmark::getPropertySetInfo fixed
    2009-06-26 10:11:00 +0200 os  r273395 : CWS-TOOLING: rebase CWS os132 to trunk at 272827 (milestone: DEV300:m50)
    2009-06-23 08:52:24 +0200 os  r273256 : #i102764# patch: attribute ListBoxes correctly handled in ::Reset()
    2009-06-23 08:51:31 +0200 os  r273255 : #i102764# ResetColor() added to remove background color
    2009-06-22 14:57:38 +0200 os  r273233 : #i102619# prevent access to already destroyed shell
    2009-06-18 13:26:51 +0200 os  r273112 : #i99508# ::insertTextContent: re-route to ::attach()
    2009-06-18 10:59:53 +0200 os  r273107 : #i85405# patch to enable 'Print grid' CheckBox correctly
    2009-06-18 10:54:02 +0200 os  r273106 : #i85133# dispose connection in GetColumnFmt to prevent connection locking
    2009-06-18 10:24:31 +0200 os  r273104 : #99535# ExportGraphic changed
    2009-06-18 10:24:03 +0200 os  r273103 : #99535# ExportGraphic changed
    2009-06-18 10:23:11 +0200 os  r273102 : #i102841# redlining mode switches to insert mode (cmc)
    2009-06-17 14:05:42 +0200 os  r273070 : #i102111# do not save already saved HTML documents before switching to source veiw
    2009-06-17 13:18:20 +0200 os  r273063 : #i101825# set rembered start position at the real start not at the initial start
    2009-06-17 08:24:10 +0200 os  r273048 : #99535# no dierect access to the file picker interface
    2009-06-16 15:00:12 +0200 os  r273020 : #i99937# notification of user options changes re-introduced
    2009-06-15 14:36:03 +0200 os  r272987 : #i98032# unreplaced text in protected areas must not be attributed either
    2009-06-15 14:20:26 +0200 os  r272985 : #i98032# replace list has to be initialised
    2009-06-04 13:29:02 +0200 os  r272624 : #i97810# set focus into column page
    2009-06-04 11:01:14 +0200 os  r272617 : #i98164# dialog resize to ease localisation
    2009-06-04 10:59:44 +0200 os  r272616 : #i98164# dialog resize to ease localisation
    2009-05-28 16:05:03 +0200 os  r272413 : #i98172# ConvertFieldsToText: take care of tabs with attributes
    2009-05-28 11:12:45 +0200 os  r272385 : #i59361# dialog controls resized
    2009-05-28 11:03:14 +0200 os  r272383 : #i59174# dialog controls moved

diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index e46bc84..b7a1cf3 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -305,6 +305,6 @@ public:
 
 class Graphic;
 //implemented in source/ui/docvw/romenu.cxx
-String ExportGraphic( const Graphic &rGraphic, const String &rGrfName, const String &rName );
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName );
 
 #endif
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
index e973971..6d8c2b3 100644
--- a/sw/qa/unoapi/sw.sce
+++ b/sw/qa/unoapi/sw.sce
@@ -41,7 +41,7 @@
 #i85640 -o sw.SwXMailMerge
 -o sw.SwXModule
 -o sw.SwXNumberingRules
--o sw.SwXParagraph
+#i103696 -o sw.SwXParagraph
 -o sw.SwXParagraphEnumeration
 -o sw.SwXPrintSettings
 -o sw.SwXPropertySet
@@ -67,7 +67,7 @@
 -o sw.SwXTextFrameText
 -o sw.SwXTextGraphicObject
 -o sw.SwXTextGraphicObjects
--o sw.SwXTextPortion
+#i103696 -o sw.SwXTextPortion
 -o sw.SwXTextPortionEnumeration
 -o sw.SwXTextRange
 -o sw.SwXTextRanges
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 16baf27..e483aa4 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -623,7 +623,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
                 p->MoveTo( (Ring*)pRegion );
             } while( p != pPrev );
         }
-        rSttCntIdx = nSttCnt;
+        pCrsr->Start()->nContent = nSttCnt;
         return FIND_NO_RING;
     }
     return bFnd ? FIND_FOUND : FIND_NOT_FOUND;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 22556f5..cf8c7cd 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1710,11 +1710,13 @@ BOOL SwDoc::ConvertFieldsToText()
                         sText.Erase();
 
                     //now remove the field and insert the string
-                    SwPaM aPam(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
-                    aPam.SetMark();
-                    aPam.Move();
-                    DeleteAndJoin(aPam);
-                    Insert( aPam, sText, true );
+                    SwPaM aPam1(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
+                    aPam1.Move();
+                    Insert( aPam1, sText, true );//insert first to keep the field's attributes
+                    SwPaM aPam2(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
+                    aPam2.SetMark();
+                    aPam2.Move();
+                    DeleteAndJoin(aPam2);//remove the field 
                 }
             }
             ++aBegin;
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 34bb61b..ca27062 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -286,7 +286,7 @@ uno::Reference< beans::XPropertySetInfo >  SwXBookmark::getPropertySetInfo(void)
     static uno::Reference< beans::XPropertySetInfo >  aRef;
     if(!aRef.is())
     {
-        uno::Reference< beans::XPropertySetInfo >  xInfo = aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK)->getPropertySetInfo();
+        aRef = aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK)->getPropertySetInfo();
     }
     return aRef;
 }
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index f9a5501..dfbc42f 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -985,7 +985,8 @@ uno::Any SwXFrames::getByIndex(sal_Int32 nIndex)
     throw(IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
 {
     vos::OGuard aGuard(Application::GetSolarMutex());
-    if(!IsValid()) throw uno::RuntimeException();
+    if(!IsValid()) 
+        throw uno::RuntimeException();
     if(nIndex < 0 || nIndex >= USHRT_MAX) throw IndexOutOfBoundsException();
     const Reference<XEnumeration> xEnum = createEnumeration();
     while(xEnum->hasMoreElements())
@@ -1000,7 +1001,8 @@ uno::Any SwXFrames::getByName(const OUString& rName)
     throw(NoSuchElementException, WrappedTargetException, uno::RuntimeException )
 {
     vos::OGuard aGuard(Application::GetSolarMutex());
-    if(!IsValid()) throw uno::RuntimeException();
+    if(!IsValid()) 
+        throw uno::RuntimeException();
     const Reference<XEnumeration> xEnum = createEnumeration();
     while(xEnum->hasMoreElements())
     {
@@ -1016,7 +1018,8 @@ uno::Any SwXFrames::getByName(const OUString& rName)
 uno::Sequence<OUString> SwXFrames::getElementNames(void) throw( uno::RuntimeException )
 {
     vos::OGuard aGuard(Application::GetSolarMutex());
-    if(!IsValid()) throw uno::RuntimeException();
+    if(!IsValid()) 
+        throw uno::RuntimeException();
     const Reference<XEnumeration> xEnum = createEnumeration();
     ::std::vector<OUString> vNames;
     while(xEnum->hasMoreElements())
@@ -1063,7 +1066,8 @@ uno::Type SAL_CALL SwXFrames::getElementType() throw(uno::RuntimeException)
 sal_Bool SwXFrames::hasElements(void) throw(uno::RuntimeException)
 {
     vos::OGuard aGuard(Application::GetSolarMutex());
-    if(IsValid()) throw uno::RuntimeException();
+    if(!IsValid()) 
+        throw uno::RuntimeException();
     return createEnumeration()->hasMoreElements();
 }
 
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index f6bde77..ad6154f 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -542,96 +542,7 @@ void SwXText::insertTextContent(const uno::Reference< text::XTextRange > & xRang
                 xTempRange = xRange;
             else
                 xTempRange = xRange->getStart();
-            SwXTextTable* pTable = reinterpret_cast< SwXTextTable * >(
-                    sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXTextTable::getUnoTunnelId()) ));
-
-            if(pTable)
-                pTable->attachToRange(xTempRange);
-            else
-            {
-                if(pBookmark)
-                    pBookmark ->attachToRange(xTempRange);
-                else
-                {
-                    if(pSection)
-                        pSection ->attachToRange(xTempRange);
-                    else
-                    {
-                        SwXFootnote* pFootnote = reinterpret_cast< SwXFootnote * >(
-                                sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXFootnote::getUnoTunnelId()) ));
-
-                        if(pFootnote)
-                            pFootnote->attachToRange(xTempRange);
-                        else
-                        {
-                            if(pReferenceMark)
-                                pReferenceMark->attachToRange(xTempRange);
-                            else
-                            {
-                                SwXFrame* pFrame = reinterpret_cast< SwXFrame * >(
-                                        sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXFrame::getUnoTunnelId()) ));
-
-                                if(pFrame)
-                                    pFrame->attachToRange(xTempRange);
-                                else
-                                {
-                                    SwXDocumentIndex* pDocumentIndex = reinterpret_cast< SwXDocumentIndex * >(
-                                            sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXDocumentIndex::getUnoTunnelId()) ));
-
-                                    if(pDocumentIndex)
-                                        pDocumentIndex->attachToRange(xTempRange);
-                                    else
-                                    {
-                                        if(pDocumentIndexMark)
-                                            pDocumentIndexMark->attachToRange(xTempRange);
-                                        else
-                                        {
-                                            SwXTextField* pTextField = reinterpret_cast< SwXTextField * >(
-                                                    sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXTextField::getUnoTunnelId()) ));
-
-                                            if(pTextField)
-                                                pTextField->attachToRange(xTempRange);
-                                            else
-                                            {
-                                                uno::Reference<beans::XPropertySet> xShapeProperties(xContent, uno::UNO_QUERY);
-                                                SwXShape* pShape = 0;
-                                                if(xShapeProperties.is())
-                                                    pShape = reinterpret_cast< SwXShape * >(
-                                                            sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXShape::getUnoTunnelId()) ));
-                                                if(pShape)
-                                                {
-                                                    uno::Any aPos(&xRange,
-                                                        ::getCppuType((uno::Reference<text::XTextRange>*)0));
-                                                    pShape->setPropertyValue(C2U("TextRange"), aPos);
-
-                                                    uno::Reference<frame::XModel> xModel =
-                                                                    pDoc->GetDocShell()->GetBaseModel();
-                                                    uno::Reference<drawing::XDrawPageSupplier> xPageSupp(
-                                                                xModel, uno::UNO_QUERY);
-
-                                                    uno::Reference<drawing::XDrawPage> xPage = xPageSupp->getDrawPage();
-
-                                                    uno::Reference<drawing::XShape> xShape((cppu::OWeakObject*)pShape,
-                                                                                                            uno::UNO_QUERY);
-                                                    //nuer die XShapes haengen an der Sw-Drawpage
-                                                    uno::Reference<drawing::XShapes> xShps(xPage, uno::UNO_QUERY);
-                                                    xShps->add(xShape);
-                                                }
-                                                else
-                                                {
-                                                    lang::IllegalArgumentException aArgException;
-                                                    aArgException.Message = C2U("unknown text content");
-                                                    throw aArgException;
-                                                }
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
+            xContent->attach(xTempRange);
         }
         else
         {
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 36f662d..8cd955a 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -918,33 +918,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         if(!pBool || !pBool->GetValue())
                             break;
                     }
-                    else
-                    {
-                        // try to store the document
-                        sal_uInt32 nErrorCode = ERRCODE_NONE;
-                        try
-                        {
-                            uno::Reference< frame::XStorable > xStorable( GetModel(), uno::UNO_QUERY_THROW );
-                            xStorable->store();
-                        }
-                        catch( task::ErrorCodeIOException& aErrEx )
-                        {
-                            nErrorCode = (sal_uInt32)aErrEx.ErrCode;
-                        }
-                        catch( uno::Exception& )
-                        {
-                            nErrorCode = ERRCODE_IO_GENERAL;
-                        }
-
-                        if ( nErrorCode != ERRCODE_NONE )
-                        {
-                            // if the saving has failed show the error and break the action
-                            if ( nErrorCode != ERRCODE_ABORT )
-                                ErrorHandler::HandleError( nErrorCode );
-
-                            break;
-                        }
-                    }
                 }
 #ifdef DBG_UTIL
                 {
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index af8c90d..6fd2204 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -60,19 +60,19 @@ TabPage TP_CONTENT_OPT
     CheckBox CB_CROSS
     {
         Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 108 , 10 ) ;
+        Size = MAP_APPFONT ( 118 , 10 ) ;
         Text [ en-US ] = "Guides ~while moving";
     };
     CheckBox CB_HANDLE
     {
         Pos = MAP_APPFONT ( 12 , 27 ) ;
-        Size = MAP_APPFONT ( 108 , 10 ) ;
+        Size = MAP_APPFONT ( 118 , 10 ) ;
         Text [ en-US ] = "Sim~ple handles";
     };
     CheckBox CB_BIGHANDLE
     {
         Pos = MAP_APPFONT ( 12 , 40 ) ;
-        Size = MAP_APPFONT ( 108 , 10 ) ;
+        Size = MAP_APPFONT ( 118 , 10 ) ;
         Text [ en-US ] = "Large handles";
     };
     FixedLine FL_WINDOW
@@ -103,7 +103,7 @@ TabPage TP_CONTENT_OPT
     CheckBox CB_HRULER
     {
         Pos = MAP_APPFONT ( 142 , 53 ) ;
-        Size = MAP_APPFONT ( 61 , 10 ) ;
+        Size = MAP_APPFONT ( 62 , 10 ) ;
         Text [ en-US ] = "Hori~zontal ruler" ;
     };
     ListBox LB_HMETRIC
@@ -115,7 +115,7 @@ TabPage TP_CONTENT_OPT
     CheckBox CB_VRULER
     {
         Pos = MAP_APPFONT ( 142 , 66 ) ;
-        Size = MAP_APPFONT ( 61 , 10 ) ;
+        Size = MAP_APPFONT ( 62 , 10 ) ;
         Text [ en-US ] = "Verti~cal ruler" ;
     };
     CheckBox CB_VRULER_RIGHT
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 4835aaa..886239a 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1688,7 +1688,7 @@ struct CharAttr
 };
 
 // Editieren entspricht Einfuegen-Attributen
-static CharAttr __FAR_DATA aInsertAttr[] =
+static CharAttr __FAR_DATA aRedlineAttr[] =
 {
     { SID_ATTR_CHAR_CASEMAP,		SVX_CASEMAP_NOT_MAPPED },
     { SID_ATTR_CHAR_WEIGHT,			WEIGHT_BOLD },
@@ -1702,7 +1702,17 @@ static CharAttr __FAR_DATA aInsertAttr[] =
     { SID_ATTR_CHAR_CASEMAP,      	SVX_CASEMAP_TITEL },
     { SID_ATTR_BRUSH,				0 }
 };
+// Items from aRedlineAttr relevant for InsertAttr: strikethrough is
+// not used
+static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
 
+// Items from aRedlineAttr relevant for DeleteAttr: underline and
+// double underline is not used
+static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
+
+// Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
+// not used
+static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
 
 /*-----------------------------------------------------------------------
     Beschreibung: Markierungsvorschau
@@ -1860,6 +1870,23 @@ void SwMarkPreview::DrawRect(const Rectangle &rRect, const Color &rFillColor, co
     Window::DrawRect(rRect);
 }
 
+namespace
+{
+    void lcl_FillRedlineAttrListBox(
+            ListBox& rLB, const AuthorCharAttr& rAttrToSelect,
+            const USHORT* pAttrMap, const USHORT nAttrMapSize)
+    {
+        for (USHORT i = 0; i != nAttrMapSize; ++i)
+        {
+            CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]);
+            rLB.SetEntryData(i, &rAttr);
+            if (rAttr.nItemId == rAttrToSelect.nItemId &&
+                rAttr.nAttr == rAttrToSelect.nAttr)
+                rLB.SelectEntryPos(i);
+        }
+    }
+}
+
 SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
                                                     const SfxItemSet& rSet )
     : SfxTabPage(pParent, SW_RES(TP_REDLINE_OPT), rSet),
@@ -1908,6 +1935,13 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
         aChangedLB.InsertEntry(sEntry);
     };
 
+    // remove strikethrough from insert and change and underline + double
+    // underline from delete
+    aInsertLB.RemoveEntry(5);
+    aChangedLB.RemoveEntry(5);
+    aDeletedLB.RemoveEntry(4);
+    aDeletedLB.RemoveEntry(3);
+    
     Link aLk = LINK(this, SwRedlineOptionsTabPage, AttribHdl);
     aInsertLB.SetSelectHdl( aLk );
     aDeletedLB.SetSelectHdl( aLk );
@@ -2149,42 +2183,17 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet&  )
 
     aMarkColorLB.SelectEntry(pOpt->GetMarkAlignColor());
 
-    // Attributlistboxen initialisieren
-    USHORT nNum = sizeof(aInsertAttr) / sizeof(CharAttr);
-
     aInsertLB.SelectEntryPos(0);
     aDeletedLB.SelectEntryPos(0);
     aChangedLB.SelectEntryPos(0);
-    for (i = 0; i < nNum; i++)
-    {
-        aInsertLB.SetEntryData(i, &aInsertAttr[i]);
-        if (aInsertAttr[i].nItemId == rInsertAttr.nItemId &&
-            aInsertAttr[i].nAttr == rInsertAttr.nAttr)
-            aInsertLB.SelectEntryPos(i);
-    }
-
-    for (i = 0; i < nNum; i++)
-    {
-        aDeletedLB.SetEntryData(i, &aInsertAttr[i]);
-        if (aInsertAttr[i].nItemId == rDeletedAttr.nItemId &&
-            aInsertAttr[i].nAttr == rDeletedAttr.nAttr)
-            aDeletedLB.SelectEntryPos(i);
-    }
-
-    for (i = 0; i < nNum; i++)
-    {
-        aChangedLB.SetEntryData(i, &aInsertAttr[i]);
-        if (aInsertAttr[i].nItemId == rChangedAttr.nItemId &&
-            aInsertAttr[i].nAttr == rChangedAttr.nAttr)
-            aChangedLB.SelectEntryPos(i);
-    }
-    //remove strikethrough from insert and delete and underline+double underline from delete
-    aInsertLB.RemoveEntry(5);
-    aChangedLB.RemoveEntry(5);
-    aDeletedLB.RemoveEntry(4);
-    aDeletedLB.RemoveEntry(3);
-
-
+    
+    lcl_FillRedlineAttrListBox(aInsertLB, rInsertAttr, aInsertAttrMap,
+            sizeof(aInsertAttrMap) / sizeof(USHORT));
+    lcl_FillRedlineAttrListBox(aDeletedLB, rDeletedAttr, aDeletedAttrMap,
+            sizeof(aDeletedAttrMap) / sizeof(USHORT));
+    lcl_FillRedlineAttrListBox(aChangedLB, rChangedAttr, aChangedAttrMap,
+            sizeof(aChangedAttrMap) / sizeof(USHORT));
+    
     USHORT nPos = 0;
     switch (pOpt->GetMarkAlignMode())
     {
@@ -2266,7 +2275,8 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB )
         nPos = 0;
 
     CharAttr*	pAttr = ( CharAttr* ) pLB->GetEntryData( nPos );
-
+    //switch off preview background color
+    pPrev->ResetColor();
     switch (pAttr->nItemId)
     {
         case SID_ATTR_CHAR_WEIGHT:
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 128d0e7..f2cde72 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1736,6 +1736,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
         uno::Reference< XConnection> xConnection;
         sal_Bool bUseMergeData = sal_False;
         uno::Reference< XColumnsSupplier> xColsSupp;
+        bool bDisposeConnection = false;
         if(pImpl->pMergeData &&
             pImpl->pMergeData->sDataSource.equals(rDBName) && pImpl->pMergeData->sCommand.equals(rTableName))
         {
@@ -1760,6 +1761,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
             {
                 rtl::OUString sDBName(rDBName);
                 xConnection = RegisterConnection( sDBName );
+                bDisposeConnection = true;
             }
             if(bUseMergeData)
                 pImpl->pMergeData->xConnection = xConnection;
@@ -1790,6 +1792,10 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
             {
                 ::comphelper::disposeComponent( xColsSupp );
             }
+            if(bDisposeConnection)
+            {
+                ::comphelper::disposeComponent( xConnection );
+            }
         }
         else
             nRet = pNFmtr->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM );
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index aaed91f..7bd6e7f 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -34,12 +34,8 @@
 
 
 #include <tools/urlobj.hxx>
-#ifndef _GRAPH_HXX //autogen
 #include <vcl/graph.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
 #include <vcl/msgbox.hxx>
-#endif
 #include <sot/formats.hxx>
 #include <svtools/eitem.hxx>
 #include <svtools/stritem.hxx>
@@ -61,30 +57,18 @@
 #include <fmturl.hxx>
 #include <fmtinfmt.hxx>
 #include <docsh.hxx>
-#ifndef _VIEW_HXX
 #include <view.hxx>
-#endif
 #include <wrtsh.hxx>
 #include <viewopt.hxx>
 #include <swmodule.hxx>
 #include <romenu.hxx>
 #include <pagedesc.hxx>
-#ifndef _MODCFG_HXX
 #include <modcfg.hxx>
-#endif
 
-#ifndef _CMDID_H
 #include <cmdid.h>
-#endif
-#ifndef _HELPID_H
 #include <helpid.h>
-#endif
-#ifndef _DOCVW_HRC
 #include <docvw.hrc>
-#endif
-#ifndef _DOCVW_HRC
 #include <docvw.hrc>
-#endif
 #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
 #include <com/sun/star/ui/dialogs/XFilterManager.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
@@ -92,6 +76,7 @@
 
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
 using namespace ::com::sun::star::ui::dialogs;
 using namespace ::sfx2;
 
@@ -415,22 +400,13 @@ static void lcl_GetPreferedExtension( String &rExt, const Graphic &rGrf )
 
 String SwReadOnlyPopup::SaveGraphic( USHORT nId )
 {
-/*	SvtPathOptions aPathOpt;
-    String sGrfPath( aPathOpt.GetGraphicPath() );
-
-    FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
-    Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
-
-//    aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
-    INetURLObject aPath;
-    aPath.SetSmartURL( sGrfPath);*/
 
     //Namen der Grafik herausfischen.
     String aName;
     if ( MN_READONLY_SAVEBACKGROUND == nId )
     {
         if ( pItem->GetGraphicLink() )
-            aName = *pItem->GetGraphicLink();
+            sGrfName = *pItem->GetGraphicLink();
         ((SvxBrushItem*)pItem)->SetDoneLink( Link() );
         const Graphic *pGrf = pItem->GetGraphic( rView.GetDocShell() );
         if ( pGrf )
@@ -442,12 +418,10 @@ String SwReadOnlyPopup::SaveGraphic( USHORT nId )
         else
             return aEmptyStr;
     }
-    else
-        aName = sGrfName;
-    return ExportGraphic( aGraphic, sGrfName, aName );
+    return ExportGraphic( aGraphic, sGrfName );
 }
 
-String ExportGraphic( const Graphic &rGraphic, const String &rGrfName, const String &rName )
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
 {
     SvtPathOptions aPathOpt;
     String sGrfPath( aPathOpt.GetGraphicPath() );
@@ -457,16 +431,16 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName, const Str
 
 //    aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
     INetURLObject aPath;
-    aPath.SetSmartURL( rName );
+    aPath.SetSmartURL( sGrfPath );
 
     //Namen der Grafik herausfischen.
     String aName = rGrfName;
 
+    aDlgHelper.SetTitle( SW_RESSTR(STR_EXPORT_GRAFIK_TITLE));
+    aDlgHelper.SetDisplayDirectory( aPath.GetMainURL(INetURLObject::DECODE_TO_IURI) );
     INetURLObject aURL;
     aURL.SetSmartURL( aName );
-    aPath.Append( aURL.GetName() );
-    xFP->setDisplayDirectory( aPath.GetMainURL(INetURLObject::DECODE_TO_IURI) );
-    xFP->setTitle( SW_RESSTR(STR_EXPORT_GRAFIK_TITLE));
+    aDlgHelper.SetFileName( aURL.GetName() );
 
     GraphicFilter& rGF = *GetGrfFilter();
     const USHORT nCount = rGF.GetExportFormatCount();
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 69c2008..46969d6 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -230,6 +230,8 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
     //#i80458# if no columns can be set then disable OK
     if( !aApplyToLB.GetEntryCount() )
         aOK.Enable( sal_False );
+    //#i97810# set focus to the TabPage
+    pTabPage->ActivateColumnControl();
 }
 
 /*--------------------------------------------------------------------
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 5841ff2..6f07392 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -223,6 +223,7 @@ public:
     void ShowBalance(BOOL bShow) {aBalanceColsCB.Show(bShow);}
     void SetInSection(BOOL bSet);
 
+    void ActivateColumnControl() {aCLNrEdt.GrabFocus();}
 };
 
 #endif
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index b8da26a..f9d49cd 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -157,6 +157,7 @@ public:
     void	SetInsMode( BOOL bOn = TRUE );
     void	ToggleInsMode() { SetInsMode( !bIns ); }
     BOOL	IsInsMode() const { return bIns; }
+    void    SetRedlineModeAndCheckInsMode( USHORT eMode );
 
     void	EnterSelFrmMode(const Point *pStartDrag = 0);
     void	LeaveSelFrmMode();
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index bfcd1d7..51fbd03 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -342,12 +342,12 @@ TabPage TP_TOX_SELECT
     CheckBox	CB_FROMFILE
     {
         Pos = MAP_APPFONT ( 136 , 124 ) ;
-        Size = MAP_APPFONT ( 63 , 10 ) ;
+        Size = MAP_APPFONT ( 115 , 10 ) ;
         Text [ en-US ] = "~Concordance file";
     };
     MenuButton 	MB_AUTOMARK
     {
-        Pos = MAP_APPFONT ( 201 , 122 ) ;
+        Pos = MAP_APPFONT ( 136 , 137 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
         TabStop = TRUE ;
         ButtonMenu = Menu
@@ -486,32 +486,32 @@ TabPage TP_TOX_SELECT
     };
     FixedLine FL_SORTOPTIONS
     {
-        Pos = MAP_APPFONT ( 6, 150) ;
+        Pos = MAP_APPFONT ( 6, 153) ;
         Size = MAP_APPFONT ( 248, 8 ) ;
         Text [ en-US ] = "Sort";
     };
     FixedText FT_LANGUAGE
     {
-        Pos = MAP_APPFONT ( 12, 163) ;
+        Pos = MAP_APPFONT ( 12, 166) ;
         Size = MAP_APPFONT ( 33, 8 ) ;
         Text [ en-US ] = "Language";
     };
     ListBox LB_LANGUAGE
     {
-        Pos = MAP_APPFONT ( 47, 161) ;
+        Pos = MAP_APPFONT ( 47, 164) ;
         Size = MAP_APPFONT ( 80, 50 ) ;
         Border = TRUE;
         DropDown = TRUE;
     };
     FixedText FT_SORTALG
     {
-        Pos = MAP_APPFONT ( 130, 163) ;
+        Pos = MAP_APPFONT ( 130, 166) ;
         Size = MAP_APPFONT ( 50, 8 ) ;
         Text [ en-US ] = "Key type";
     };
     ListBox LB_SORTALG
     {
-        Pos = MAP_APPFONT ( 201, 161) ;
+        Pos = MAP_APPFONT ( 201, 164) ;
         Size = MAP_APPFONT ( 50, 50 ) ;
         Border = TRUE;
         DropDown = TRUE;
@@ -1049,7 +1049,7 @@ TabPage TP_TOX_STYLES
     FixedText FT_LEVEL
     {
         Pos = MAP_APPFONT ( 11 , 14 ) ;
-        Size = MAP_APPFONT ( 24 , 8 ) ;
+        Size = MAP_APPFONT ( 102 , 8 ) ;
         Text [ en-US ] = "~Levels" ;
         Left = TRUE ;
     };
@@ -1064,7 +1064,7 @@ TabPage TP_TOX_STYLES
     FixedText FT_TEMPLATE
     {
         Pos = MAP_APPFONT ( 142 , 14 ) ;
-        Size = MAP_APPFONT ( 54 , 8 ) ;
+        Size = MAP_APPFONT ( 102 , 8 ) ;
         Text [ en-US ] = "Paragraph ~Styles" ;
         Left = TRUE ;
     };
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 4aed531..78ff192 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -245,6 +245,7 @@ void    SwTextGridPage::Reset(const SfxItemSet &rSet)
             default:                pButton = &aCharsGridRB;
         }
         pButton->Check();
+        aDisplayCB.Check(rGridItem.IsDisplayGrid());
         GridTypeHdl(pButton);
         aSnapToCharsCB.Check(rGridItem.IsSnapToChars());
         aLinesPerPageNF.SetValue(rGridItem.GetLines());
@@ -254,7 +255,6 @@ void    SwTextGridPage::Reset(const SfxItemSet &rSet)
         aRubySizeMF.SetValue(aRubySizeMF.Normalize(rGridItem.GetRubyHeight()), FUNIT_TWIP);
         aCharWidthMF.SetValue(aCharWidthMF.Normalize(rGridItem.GetBaseWidth()), FUNIT_TWIP);
         aRubyBelowCB.Check(rGridItem.IsRubyTextBelow());
-        aDisplayCB.Check(rGridItem.IsDisplayGrid());
         aPrintCB.Check(rGridItem.IsPrintGrid());
         aColorLB.SelectEntry(rGridItem.GetColor());
     }
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 03221e1..8616e71 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -114,7 +114,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
             {
                 String sGrfNm, sFilterNm;
                 rSh.GetGrfNms( &sGrfNm, &sFilterNm );
-                ExportGraphic( *pGraphic, sGrfNm, sGrfNm );
+                ExportGraphic( *pGraphic, sGrfNm );
             }
         }
         break;
diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src
index db43503..7d1693a 100644
--- a/sw/source/ui/table/colwd.src
+++ b/sw/source/ui/table/colwd.src
@@ -38,39 +38,39 @@ ModalDialog DLG_COL_WIDTH
     HelpID = FN_TABLE_SET_COL_WIDTH ;
     OutputSize = TRUE ;
     SVLook = TRUE ;
-    Size = MAP_APPFONT ( 149 , 60 ) ;
+    Size = MAP_APPFONT ( 159 , 60 ) ;
     Text [ en-US ] = "Column Width" ;
     Moveable = TRUE ;
     OKButton BT_OK
     {
-        Pos = MAP_APPFONT ( 94 , 6 ) ;
+        Pos = MAP_APPFONT ( 104 , 6 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
         TabStop = TRUE ;
         DefButton = TRUE ;
     };
     CancelButton BT_CANCEL
     {
-        Pos = MAP_APPFONT ( 94 , 23 ) ;
+        Pos = MAP_APPFONT ( 104 , 23 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
         TabStop = TRUE ;
     };
     HelpButton BT_HELP
     {
-        Pos = MAP_APPFONT ( 94 , 43 ) ;
+        Pos = MAP_APPFONT ( 104 , 43 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
         TabStop = TRUE ;
     };
     FixedText FT_WIDTH
     {
         Pos = MAP_APPFONT ( 12 , 31 ) ;
-        Size = MAP_APPFONT ( 22 , 8 ) ;
+        Size = MAP_APPFONT ( 35 , 8 ) ;
         Text [ en-US ] = "~Width" ;
         Left = TRUE ;
     };
     MetricField ED_WIDTH
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 41 , 30 ) ;
+        Pos = MAP_APPFONT ( 51 , 30 ) ;
         Size = MAP_APPFONT ( 38 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -88,20 +88,20 @@ ModalDialog DLG_COL_WIDTH
     FixedLine FL_WIDTH
     {
         Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 81 , 8 ) ;
+        Size = MAP_APPFONT ( 91 , 8 ) ;
         Text [ en-US ] = "Width" ;
     };
     FixedText FT_COL
     {
         Pos = MAP_APPFONT ( 12 , 16 ) ;
-        Size = MAP_APPFONT ( 29 , 8 ) ;
+        Size = MAP_APPFONT ( 35 , 8 ) ;
         Text [ en-US ] = "~Column" ;
         Left = TRUE ;
     };
     NumericField ED_COL
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 41 , 14 ) ;
+        Pos = MAP_APPFONT ( 51 , 14 ) ;
         Size = MAP_APPFONT ( 38 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 7fc5220..41a9ada 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -584,7 +584,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
 
                 USHORT nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
                 USHORT nMode = pWrtShell->GetRedlineMode();
-                pWrtShell->SetRedlineMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
+                pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
             }
         }
         break;
@@ -624,7 +624,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
                     nOn = 0;
                 }
                 USHORT nMode = pIDRA->GetRedlineMode();
-                pWrtShell->SetRedlineMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
+                pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
                 rReq.AppendItem( SfxBoolItem( FN_REDLINE_PROTECT, ((nMode&nsRedlineMode_t::REDLINE_ON)==0) ) );
             }
             else
@@ -641,7 +641,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
                 if( ((const SfxBoolItem*)pItem)->GetValue() )
                     nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
 
-                pWrtShell->SetRedlineMode( nMode );
+                pWrtShell->SetRedlineModeAndCheckInsMode( nMode );
             }
             break;
         case FN_MAILMERGE_SENDMAIL_CHILDWINDOW:
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 4329883..1735041 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -607,10 +607,10 @@ void SwView::Replace()
     {
         if (GetPostItMgr()->GetActivePostIt())
             GetPostItMgr()->Replace(pSrchItem);
-        pWrtShell->SwEditShell::Replace( pSrchItem->GetReplaceString(),
+        sal_Bool bReplaced = pWrtShell->SwEditShell::Replace( pSrchItem->GetReplaceString(),
                                             pSrchItem->GetRegExp());
 
-        if( pReplList && pReplList->Count() && pWrtShell->HasSelection() )
+        if( bReplaced && pReplList && pReplList->Count() && pWrtShell->HasSelection() )
         {
             SfxItemSet aReplSet( pWrtShell->GetAttrPool(),
                                     aTxtFmtCollSetRange );
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index fb47636..f4d35d9 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -701,6 +701,13 @@ void SwWrtShell::SetInsMode( BOOL bOn )
     StartAction();
     EndAction();
 }
+//Overwrite mode is incompatible with red-lining
+void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
+{
+   SetRedlineMode( eMode );
+   if (IsRedlineOn())
+       SetInsMode( true );
+}
 
 /*
  * Rahmen bearbeiten


More information about the ooo-build-commit mailing list