diff options
-rw-r--r-- | sw/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sw/qa/unoapi/sw.sce | 4 | ||||
-rw-r--r-- | sw/source/core/crsr/findtxt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unobkm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 91 | ||||
-rw-r--r-- | sw/source/ui/app/docsh2.cxx | 27 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.src | 10 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 76 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbmgr.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/docvw/romenu.cxx | 42 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/column.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/inc/wrtsh.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.src | 18 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/grfsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/colwd.src | 18 | ||||
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewsrch.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/select.cxx | 7 |
22 files changed, 119 insertions, 228 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 45cb37f8ac68..6bfd5437a20e 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 e9739711ae42..6d8c2b30d56d 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 90680b7a1d22..89686a3673bc 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 ae48966e31b8..926a555c8a4e 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 d58f7f86cab3..a922c5334f3e 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 475438ec8d83..decd73e07e63 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 0511065e3bce..c00c21f5494e 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 caa315999523..182bda09d7b8 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 763e5e82d62e..96719f17bd58 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 a15f5cacdf53..4b85042d0003 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,41 +2183,16 @@ 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 98a5f8416185..93fad7cb699d 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 437f7eabb25c..50776ef80f11 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 03dd5fa36fdd..a9df9762ad92 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 491a603d52ab..a8e6597cf757 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 70e509972ddb..5656f6df1ab4 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 1bccc6c27765..8b84ca3d2b92 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 1f2f9e152c65..3fb0157b89f3 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 1ecf506d19c2..62a3af2f6f28 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 8f83a797d2ab..609b080941bc 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 c063c72c5892..6a03909d92f9 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 c5602411f324..690a1900749e 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 5124cf66d687..f45c68ef7ec9 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 |