User: timar Date: 05/12/09 05:30:18 Removed: /hu/src/2.0.1/Patches/ default-industrial-icons-w32.diff
Added: /hu/src/2.0.1/Patches/ ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff, sc-insert-note-on-right-click.diff, sc-sheet-double-click-rename.diff, sc-standard-filter-options.diff Log: new patches File Changes: Directory: /hu/src/2.0.1/Patches/ ================================= File [removed]: default-industrial-icons-w32.diff File [added]: ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff Url: http://hu.openoffice.org/source/browse/hu/src/2.0.1/Patches/ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff?rev=1.1&content-type=text/vnd.viewcvs-markup Added lines: 411 ---------------- --- sfx2/source/view/viewsh.cxx.bakj 2005-02-17 16:51:32.000000000 +0530 +++ sfx2/source/view/viewsh.cxx 2005-02-18 16:07:53.935695125 +0530 @@ -188,6 +188,9 @@ case SID_MAIL_SENDDOCASPDF: case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASMSDOC: + case SID_MAIL_SENDDOCASMSPPT: + case SID_MAIL_SENDDOCASMSEXCEL: { SfxObjectShell* pDoc = GetObjectShell(); if ( pDoc && pDoc->QueryHiddenInformation( @@ -218,10 +221,18 @@ } SfxMailModel_Impl::SendMailResult eResult = SfxMailModel_Impl::SEND_MAIL_ERROR; - if ( nId == SID_MAIL_SENDDOCASPDF ) - eResult = aModel.Send( SfxMailModel_Impl::TYPE_ASPDF ); - else - eResult = aModel.Send( SfxMailModel_Impl::TYPE_SELF ); + switch (nId) { + case SID_MAIL_SENDDOCASPDF: + eResult = aModel.Send( SfxMailModel_Impl::TYPE_ASPDF );break; + case SID_MAIL_SENDDOCASMSDOC: + eResult = aModel.Send( SfxMailModel_Impl::TYPE_ASMSDOC );break; + case SID_MAIL_SENDDOCASMSEXCEL: + eResult = aModel.Send( SfxMailModel_Impl::TYPE_ASMSEXCEL );break; + case SID_MAIL_SENDDOCASMSPPT: + eResult = aModel.Send( SfxMailModel_Impl::TYPE_ASMSPOWERPOINT );break; + default: + eResult = aModel.Send( SfxMailModel_Impl::TYPE_SELF ); + } if ( eResult == SfxMailModel_Impl::SEND_MAIL_ERROR ) { @@ -302,6 +312,15 @@ } //-------------------------------------------------------------------- +static const BOOL +filterExsists(const char * aExtension, SfxObjectShellRef xDocShell) +{ + if ( ! xDocShell.Is() ) + return false; + String aPDFExtension = String::CreateFromAscii( aExtension ); + return (SfxFilterMatcher( String::CreateFromAscii( xDocShell->GetFactory().GetShortName()) ).GetFilter4Extension( aPDFExtension, SFX_FILTER_EXPORT )) ? true : false ; + +} void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) { @@ -342,6 +362,9 @@ // Mail-Funktionen case SID_MAIL_SENDDOCASPDF: case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASMSDOC: + case SID_MAIL_SENDDOCASMSPPT: + case SID_MAIL_SENDDOCASMSEXCEL: { BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN ); if ( !bEnable ) --- ./sfx2/sdi/viwslots.sdi.bakj 2005-02-17 16:48:16.000000000 +0530 +++ ./sfx2/sdi/viwslots.sdi 2005-02-18 11:12:45.000000000 +0530 @@ -22,6 +22,22 @@ ExecMethod = ExecMisc_Impl ; StateMethod = GetState_Impl ; ] + SID_MAIL_SENDDOCASMSDOC // ole(no) api(todo) + [ + ExecMethod = ExecMisc_Impl ; + StateMethod = GetState_Impl ; + ] + SID_MAIL_SENDDOCASMSPPT // ole(no) api(todo) + [ + ExecMethod = ExecMisc_Impl ; + StateMethod = GetState_Impl ; + ] + SID_MAIL_SENDDOCASMSEXCEL // ole(no) api(todo) + [ + ExecMethod = ExecMisc_Impl ; + StateMethod = GetState_Impl ; + ] + //--------------------------------------------------------------------- SID_PRINTDOC // ole(no) api(play/rec) [ --- ./sfx2/inc/sfxsids.hrc.bakj 2005-02-17 16:56:30.000000000 +0530 +++ ./sfx2/inc/sfxsids.hrc 2005-02-18 12:08:21.000000000 +0530 @@ -148,7 +148,9 @@ #define SID_MAIL_NOTIFY (SID_SFX_START + 330) #define SID_MAIL_SENDDOC (SID_SFX_START + 331) #define SID_MAIL_SENDDOCASPDF (SID_SFX_START + 1672) - +#define SID_MAIL_SENDDOCASMSPPT (SID_SFX_START + 1706) +#define SID_MAIL_SENDDOCASMSEXCEL (SID_SFX_START + 1707) +#define SID_MAIL_SENDDOCASMSDOC (SID_SFX_START + 1708) #define SID_MAIL_RECIPIENT (SID_SFX_START + 334) #define SID_MAIL_TEXT (SID_SFX_START + 335) @@ -566,7 +568,7 @@ #define SID_MACRO_SIGNATURE (SID_SFX_START + 1704) #define SID_ATTR_WARNALIENFORMAT (SID_SFX_START + 1705) -#define SID_SFX_free_START (SID_SFX_START + 1706) +#define SID_SFX_free_START (SID_SFX_START + 1709) #define SID_SFX_free_END (SID_SFX_START + 3999) #define SID_OPEN_NEW_VIEW (SID_SFX_START + 520) --- ./sfx2/sdi/sfx.sdi.bakj 2005-02-17 17:01:38.000000000 +0530 +++ ./sfx2/sdi/sfx.sdi 2005-02-18 12:01:13.000000000 +0530 @@ -6369,6 +6369,86 @@ GroupId = GID_DOCUMENT; ] +SfxBoolItem SendMailDocAsMSDoc SID_MAIL_SENDDOCASMSDOC +(SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY,SfxBoolItem AttachedDoc SID_MAIL_ATTACH,SfxStringItem AttachFiles SID_MAIL_ATTACH_FILE) +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* status: */ + SlotType = SfxStringItem + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] + +SfxBoolItem SendMailDocAsMSExcel SID_MAIL_SENDDOCASMSEXCEL +(SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY,SfxBoolItem AttachedDoc SID_MAIL_ATTACH,SfxStringItem AttachFiles SID_MAIL_ATTACH_FILE) +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* status: */ + SlotType = SfxStringItem + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] +SfxBoolItem SendMailDocAsMSPowerPoint SID_MAIL_SENDDOCASMSPPT +(SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY,SfxBoolItem AttachedDoc SID_MAIL_ATTACH,SfxStringItem AttachFiles SID_MAIL_ATTACH_FILE) +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* status: */ + SlotType = SfxStringItem + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] + SfxBoolItem SendMailDocAsPDF SID_MAIL_SENDDOCASPDF (SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY,SfxBoolItem AttachedDoc SID_MAIL_ATTACH,SfxStringItem AttachFiles SID_MAIL_ATTACH_FILE) [ --- sfx2/source/inc/mailmodel.hxx.bakj 2005-02-18 11:49:05.000000000 +0530 +++ sfx2/source/inc/mailmodel.hxx 2005-02-18 12:24:36.000000000 +0530 @@ -90,6 +90,9 @@ enum MailDocType { TYPE_SELF, + TYPE_ASMSDOC, + TYPE_ASMSEXCEL, + TYPE_ASMSPOWERPOINT, TYPE_ASPDF }; @@ -114,7 +117,7 @@ void ClearList( AddressList_Impl* pList ); void MakeValueList( AddressList_Impl* pList, String& rValueList ); SaveResult SaveDocument( String& rFileName, String& rType ); - SaveResult SaveDocAsPDF( String& rFileName, String& rType ); + SaveResult SaveDocAs( String& rFileName, String& rType,MailDocType mailDocType ); DECL_LINK( DoneHdl, void* ); --- sc/uiconfig/scalc/menubar/menubar.xml.bakj 2005-02-18 10:15:10.000000000 +0530 +++ sc/uiconfig/scalc/menubar/menubar.xml 2005-02-18 16:41:41.175086541 +0530 @@ -22,6 +22,7 @@ <menu:menupopup> <menu:menuitem menu:id=".uno:SendMail" menu:helpid="5331" menu:label="" /> <menu:menuitem menu:id=".uno:SendMailDocAsPDF" menu:helpid="6672" menu:label="" /> + <menu:menuitem menu:id=".uno:SendMailDocAsMSExcel" menu:helpid="6707" menu:label="" /> </menu:menupopup> </menu:menu> <menu:menuseparator/> --- sw/uiconfig/swriter/menubar/menubar.xml.bakj 2005-02-17 16:38:52.000000000 +0530 +++ sw/uiconfig/swriter/menubar/menubar.xml 2005-02-18 16:43:07.919222464 +0530 @@ -22,6 +22,7 @@ <menu:menupopup> <menu:menuitem menu:id=".uno:SendMail" menu:helpid="5331" menu:label="" /> <menu:menuitem menu:id=".uno:SendMailDocAsPDF" menu:helpid="6672" menu:label="" /> + <menu:menuitem menu:id=".uno:SendMailDocAsMSDoc" menu:helpid="6708" menu:label="" /> <menu:menuseparator/> <menu:menuitem menu:id=".uno:NewGlobalDoc" menu:helpid="20004" menu:label="" /> <menu:menuitem menu:id=".uno:NewHtmlDoc" menu:helpid="20040" menu:label="" /> --- sd/uiconfig/simpress/menubar/menubar.xml.bakj 2005-02-18 16:44:27.103479847 +0530 +++ sd/uiconfig/simpress/menubar/menubar.xml 2005-02-18 16:47:02.584344135 +0530 @@ -22,6 +22,7 @@ <menu:menupopup> <menu:menuitem menu:id=".uno:SendMail" menu:helpid="5331" menu:label="" /> <menu:menuitem menu:id=".uno:SendMailDocAsPDF" menu:helpid="6672" menu:label="" /> + <menu:menuitem menu:id=".uno:SendMailDocAsMSPowerPoint" menu:helpid="6706" menu:label="" /> </menu:menupopup> </menu:menu> <menu:menuseparator/> --- officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu.bakj 2005-02-18 16:55:18.659537625 +0530 +++ officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 2005-02-18 17:00:20.837598320 +0530 @@ -809,6 +809,11 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:SendMailDocAsMSDoc" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Document as MS-~Doc Attachment...</value> + </prop> + </node> <node oor:name=".uno:SendOutlineToClipboard" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">Gliederung zur Zwis~chenablage</value> --- officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu.bakj 2005-02-18 16:58:17.271973105 +0530 +++ officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 2005-02-18 16:59:43.010223193 +0530 @@ -1731,6 +1731,11 @@ <value xml:lang="en-US">Sen~d</value> </prop> </node> + <node oor:name=".uno:SendMailDocAsMSPowerPoint" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Document as MS-~PPT Attachment...</value> + </prop> + </node> <node oor:name=".uno:TemplatesMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">~Vorlagen</value> --- svx/inc/globlmn_tmpl.hrc.bakj 2005-02-18 18:05:06.196343865 +0530 +++ svx/inc/globlmn_tmpl.hrc 2005-02-18 18:07:51.216700899 +0530 @@ -588,6 +588,24 @@ Text [ en-US ] = "Document as ~E-mail..." ; \ Text [ x-comment ] = " "; \ +#define ITEM_FILE_MAIL_SENDDOCASMSEXCEL \ + Identifier = SID_MAIL_SENDDOCASMSEXCEL ; \ + Command = ".uno:SendMailDocAsMSExcel" ; \ + HelpID = SID_MAIL_SENDDOCASMSEXCEL ; \ + Text [ en-US ] = "Document as MS-E~xcel Attachment..." ; \ + +#define ITEM_FILE_MAIL_SENDDOCASMSDOC \ + Identifier = SID_MAIL_SENDDOCASMSDOC ; \ + Command = ".uno:SendMailDocAsMSDoc" ; \ + HelpID = SID_MAIL_SENDDOCASMSDOC ; \ + Text [ en-US ] = "Document as MS-~Doc Attachment..." ; \ + +#define ITEM_FILE_MAIL_SENDDOCASMSPPT \ + Identifier = SID_MAIL_SENDDOCASMSPPT ; \ + Command = ".uno:SendMailDocAsMSPowerPoint" ; \ + HelpID = SID_MAIL_SENDDOCASMSPPT ; \ + Text [ en-US ] = "Document as MS-~PPT Attachment..." ; \ + #define ITEM_FILE_MAIL_SENDDOCASPDF \ Identifier = SID_MAIL_SENDDOCASPDF ; \ Command = ".uno:SendMailDocAsPDF" ; \ --- sfx2/source/dialog/mailmodel.cxx.bakj 2005-05-10 13:33:35.000000000 +0530 +++ sfx2/source/dialog/mailmodel.cxx 2005-05-10 13:52:59.000000000 +0530 @@ -509,7 +509,7 @@ return 0; } -SfxMailModel_Impl::SaveResult SfxMailModel_Impl::SaveDocAsPDF( String& rFileName, String& rType ) +SfxMailModel_Impl::SaveResult SfxMailModel_Impl::SaveDocAs( String& rFileName, String& rType,MailDocType mailDocType ) { SaveResult eRet = SAVE_CANCELLED; SfxViewFrame* pTopViewFrm = mpBindings->GetDispatcher_Impl()->GetFrame()->GetTopViewFrame(); @@ -528,9 +528,16 @@ String sFactoryShortName = String::CreateFromAscii(xDocShell->GetFactory().GetShortName()); String sFactoryLongName = SfxObjectShell::GetServiceNameFromFactory(sFactoryShortName); SfxFilterMatcher aMatcher( sFactoryShortName ); - String aPDFExtension = String::CreateFromAscii( "pdf" ); // Extension without dot! - - const SfxFilter* pFilter = impl_getPDFFilterForDoc( sFactoryLongName, aMatcher); + String aExtension; + switch (mailDocType) + { + case TYPE_ASPDF : aExtension = String::CreateFromAscii( "pdf" );break; + case TYPE_ASMSDOC : aExtension = String::CreateFromAscii( "doc" );break; + case TYPE_ASMSEXCEL : aExtension = String::CreateFromAscii( "xls" );break; + case TYPE_ASMSPOWERPOINT : aExtension = String::CreateFromAscii( "ppt" );break; + } + + const SfxFilter* pFilter = aMatcher.GetFilter4Extension( aExtension, SFX_FILTER_EXPORT ); sal_Bool bHasFilter = pFilter ? sal_True : sal_False; // create temp file name with leading chars and extension @@ -546,7 +553,7 @@ String aName; if ( aFileObj.hasExtension() ) { - pExt = new String( String::CreateFromAscii( "." ) + (OUString)aPDFExtension ); + pExt = new String( String::CreateFromAscii( "." ) + (OUString)aExtension ); aFileObj.removeExtension(); aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); } @@ -567,10 +574,27 @@ delete pExt; rFileName = aTempFile.GetURL(); - + SfxBoolItem aPicklist( SID_PICKLIST, FALSE ); + SfxBoolItem aSaveTo( SID_SAVETO, TRUE ); + SfxStringItem* pFilterName = NULL; + if ( pFilter && bHasFilter ) + pFilterName = new SfxStringItem( SID_FILTER_NAME, pFilter->GetFilterName() ); + + SfxStringItem* pPassItem = NULL; + String aPasswd; + if ( GetPasswd_Impl( xDocShell->GetMedium()->GetItemSet(), aPasswd ) ) + pPassItem = new SfxStringItem( SID_PASSWORD, aPasswd ); + // save document to temp file SfxStringItem aFileName( SID_FILE_NAME, rFileName ); - const SfxBoolItem *pRet = (const SfxBoolItem*)pDisp->Execute( SID_EXPORTDOCASPDF, SFX_CALLMODE_SYNCHRON, &aFileName, 0L ); + const SfxBoolItem *pRet = (const SfxBoolItem*)pDisp->Execute( SID_SAVEASDOC, + SFX_CALLMODE_SYNCHRON, + &aFileName, + &aPicklist, + &aSaveTo, + pFilterName ? pFilterName : pPassItem, + pFilterName ? pPassItem : 0L, 0L ); + BOOL bRet = pRet ? pRet->GetValue() : FALSE; eRet = bRet ? SAVE_SUCCESSFULL : SAVE_CANCELLED; @@ -670,10 +694,16 @@ String aFileName, aContentType; sal_Bool bSuccessfull = sal_False; - if ( eMailDocType == TYPE_SELF ) - eSaveResult = SaveDocument( aFileName, aContentType ); - else - eSaveResult = SaveDocAsPDF( aFileName, aContentType ); + switch (eMailDocType){ + case TYPE_ASMSDOC: + case TYPE_ASMSPOWERPOINT: + case TYPE_ASPDF: + case TYPE_ASMSEXCEL: + eSaveResult = SaveDocAs( aFileName, aContentType,eMailDocType ); + break; + default: + eSaveResult = SaveDocument( aFileName, aContentType); + } if ( eSaveResult == SAVE_SUCCESSFULL ) { --- officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu.bakj 2005-05-10 13:59:29.000000000 +0530 +++ officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 2005-05-10 14:00:12.000000000 +0530 @@ -1498,6 +1498,11 @@ <value xml:lang="en-US">Sen~d</value> </prop> </node> + <node oor:name=".uno:SendMailDocAsMSExcel" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Document as MS-E~xcel Attachment...</value> + </prop> + </node> <node oor:name=".uno:ProtectMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">Dokument sch~ützen</value> File [added]: sc-insert-note-on-right-click.diff Url: http://hu.openoffice.org/source/browse/hu/src/2.0.1/Patches/sc-insert-note-on-right-click.diff?rev=1.1&content-type=text/vnd.viewcvs-markup Added lines: 33 --------------- --- sc/source/ui/src/popup.src.back 2005-02-15 10:55:00.000000000 +0530 +++ sc/source/ui/src/popup.src 2005-03-26 12:06:20.000000000 +0530 @@ -165,6 +165,13 @@ //------------------------------ MenuItem { + Identifier = SID_INSERT_POSTIT ; + HelpId = SID_INSERT_POSTIT ; + Text [ en-US ] = "Insert Not~e" ; + Text [ x-comment ] = " "; + }; + MenuItem + { Identifier = FID_NOTE_VISIBLE ; HelpId = FID_NOTE_VISIBLE ; Text [ de ] = "~Notiz anzeigen" ; --- sc/source/ui/view/cellsh.cxx.back1 2005-11-17 18:58:00.000000000 +0530 +++ sc/source/ui/view/cellsh.cxx 2005-03-30 10:40:14.000000000 +0530 @@ -308,6 +308,14 @@ } } break; + case SID_INSERT_POSTIT: + { + ScPostIt aNote(pDoc); + ScViewData* pView = GetViewData(); + if ( pDoc->GetNote( pView->GetCurX(), pView->GetCurY(), pView->GetTabNo(), aNote ) ) + rSet.DisableItem( nWhich ); + } + break; case SID_OPENDLG_FUNCTION: { ScMarkData aMarkData=GetViewData()->GetMarkData(); File [added]: sc-sheet-double-click-rename.diff Url: http://hu.openoffice.org/source/browse/hu/src/2.0.1/Patches/sc-sheet-double-click-rename.diff?rev=1.1&content-type=text/vnd.viewcvs-markup Added lines: 14 --------------- --- sc/source/ui/view/tabcont.cxx 2005-03-17 10:55:46.000000000 -0800 +++ sc/source/ui/view/tabcont.cxx 2005-03-17 10:55:10.000000000 -0800 @@ -173,6 +173,11 @@ // mouse button down and up on same page? if( nMouseClickPageId != GetPageId( aPos ) ) nMouseClickPageId = TAB_PAGE_NOTFOUND; + else if ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ) + { + SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher(); + pDispatcher->Execute( FID_TAB_MENU_RENAME, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD ); + } if( nMouseClickPageId == 0 ) { File [added]: sc-standard-filter-options.diff Url: http://hu.openoffice.org/source/browse/hu/src/2.0.1/Patches/sc-standard-filter-options.diff?rev=1.1&content-type=text/vnd.viewcvs-markup Added lines: 222 ---------------- Index: sc/inc/global.hxx =================================================================== RCS file: /cvs/sc/sc/inc/global.hxx,v retrieving revision 1.42 diff -u -p -u -r1.42 global.hxx --- sc/inc/global.hxx 13 Jan 2005 17:21:00 -0000 1.42 +++ sc/inc/global.hxx 11 Apr 2005 11:36:29 -0000 @@ -818,7 +818,11 @@ enum ScQueryOp SC_TOPVAL, SC_BOTVAL, SC_TOPPERC, - SC_BOTPERC + SC_BOTPERC, + SC_CONTAINS, + SC_DOES_NOT_CONTAIN, + SC_BEGINS_WITH, + SC_ENDS_WITH }; // ----------------------------------------------------------------------- Index: sc/source/ui/src/filter.src =================================================================== RCS file: /cvs/sc/sc/source/ui/src/filter.src,v retrieving revision 1.54 diff -u -p -u -r1.54 filter.src --- sc/source/ui/src/filter.src 18 Mar 2005 15:17:32 -0000 1.54 +++ sc/source/ui/src/filter.src 11 Apr 2005 11:36:29 -0000 @@ -180,16 +180,20 @@ ModelessDialog RID_SCDLG_FILTER }; stringlist [ en-US ] = { - < "=" ; Default ; > ; + < "Equals" ; Default ; > ; < "<" ; Default ; > ; < ">" ; Default ; > ; < "<=" ; Default ; > ; < ">=" ; Default ; > ; - < "<>" ; Default ; > ; + < "Not equals" ; Default ; > ; < "Largest" ; Default ; > ; < "Smallest" ; Default ; > ; < "Largest %" ; Default ; > ; < "Smallest %" ; Default ; > ; + < "Contains" ; Default ; > ; + < "Does not Contain" ; Default ; > ; + < "Begins with" ; Default ; > ; + < "Ends with" ; Default ; > ; }; }; ListBox LB_COND2 @@ -214,16 +218,20 @@ ModelessDialog RID_SCDLG_FILTER }; stringlist [ en-US ] = { - < "=" ; Default ; > ; + < "Equals" ; Default ; > ; < "<" ; Default ; > ; < ">" ; Default ; > ; < "<=" ; Default ; > ; < ">=" ; Default ; > ; - < "<>" ; Default ; > ; + < "Not equals" ; Default ; > ; < "Largest" ; Default ; > ; < "Smallest" ; Default ; > ; < "Largest %" ; Default ; > ; < "Smallest %" ; Default ; > ; + < "Contains" ; Default ; > ; + < "Does not Contain" ; Default ; > ; + < "Begins with" ; Default ; > ; + < "Ends with" ; Default ; > ; }; }; ListBox LB_COND3 @@ -248,16 +256,20 @@ ModelessDialog RID_SCDLG_FILTER }; stringlist [ en-US ] = { - < "=" ; Default ; > ; + < "Equals" ; Default ; > ; < "<" ; Default ; > ; < ">" ; Default ; > ; < "<=" ; Default ; > ; < ">=" ; Default ; > ; - < "<>" ; Default ; > ; + < "Not equals" ; Default ; > ; < "Largest" ; Default ; > ; < "Smallest" ; Default ; > ; < "Largest %" ; Default ; > ; < "Smallest %" ; Default ; > ; + < "Contains" ; Default ; > ; + < "Does not Contain" ; Default ; > ; + < "Begins with" ; Default ; > ; + < "Ends with" ; Default ; > ; }; }; ComboBox ED_VAL1 Index: sc/source/ui/dbgui/filtdlg.cxx =================================================================== RCS file: /cvs/sc/sc/source/ui/dbgui/filtdlg.cxx,v retrieving revision 1.11 diff -u -p -u -r1.11 filtdlg.cxx --- sc/source/ui/dbgui/filtdlg.cxx 23 Jul 2004 10:51:24 -0000 1.11 +++ sc/source/ui/dbgui/filtdlg.cxx 11 Apr 2005 11:36:29 -0000 @@ -84,6 +84,7 @@ #include "document.hxx" #include "docsh.hxx" #include "scresid.hxx" +#include "docoptio.hxx" #include "foptmgr.hxx" @@ -572,6 +573,8 @@ ScQueryItem* ScFilterDlg::GetOutputItem( bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) ); } + theParam.bRegExp = aBtnRegExp.IsChecked(); + for ( i = 0; i < 3; i++ ) { USHORT nField = aFieldLbArr[i]->GetSelectEntryPos(); @@ -605,6 +608,18 @@ ScQueryItem* ScFilterDlg::GetOutputItem( } else { + if (eOp == SC_BEGINS_WITH ) { + String tmp ('^'); + tmp .Append(aStrVal); + ::rtl::OUString str (tmp); + aStrVal.Assign(tmp); + theParam.bRegExp = TRUE; + } + else if (eOp == SC_ENDS_WITH ) { + aStrVal.Append (String('$')); + theParam.bRegExp = TRUE; + } + *rEntry.pStr = aStrVal; rEntry.nVal = 0; rEntry.bQueryByString = TRUE; @@ -642,7 +657,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem( theParam.bByRow = TRUE; theParam.bDuplicate = !aBtnUnique.IsChecked(); theParam.bCaseSens = aBtnCase.IsChecked(); - theParam.bRegExp = aBtnRegExp.IsChecked(); + theParam.bDestPers = aBtnDestPers.IsChecked(); // nur die drei eingestellten - alles andere zuruecksetzen Index: sc/source/core/data/table3.cxx =================================================================== RCS file: /cvs/sc/sc/source/core/data/table3.cxx,v retrieving revision 1.20 diff -u -p -u -r1.20 table3.cxx --- sc/source/core/data/table3.cxx 15 Nov 2004 16:34:51 -0000 1.20 +++ sc/source/core/data/table3.cxx 11 Apr 2005 11:36:30 -0000 @@ -1037,13 +1037,22 @@ BOOL ScTable::ValidQuery(SCROW nRow, con break; } } - else if ( (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL) || + else if ( (rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN || + rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH || + rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL) || (rEntry.bQueryByString && (pCell ? pCell->HasStringData() : HasStringData( static_cast<SCCOL>(rEntry.nField), nRow)))) { // by String String aCellStr; + + // Contains and Does not contain is similar to EQUAL and NOT EQUAL + // but with bMatchWholeCell set to false + if(rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_BEGINS_WITH || + rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_DOES_NOT_CONTAIN) + bMatchWholeCell = FALSE; + if ( pCell ) { if (pCell->GetCellType() != CELLTYPE_NOTE) @@ -1056,7 +1065,9 @@ BOOL ScTable::ValidQuery(SCROW nRow, con GetInputString( static_cast<SCCOL>(rEntry.nField), nRow, aCellStr ); BOOL bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL) - || (rEntry.eOp == SC_NOT_EQUAL))); + || (rEntry.eOp == SC_NOT_EQUAL) || (rEntry.eOp == SC_CONTAINS) + || (rEntry.eOp == SC_DOES_NOT_CONTAIN) || (rEntry.eOp == SC_BEGINS_WITH) + || (rEntry.eOp == SC_ENDS_WITH))); BOOL bTestRegExp = (pbTestEqualCondition && rParam.bRegExp && ((rEntry.eOp == SC_LESS_EQUAL) || (rEntry.eOp == SC_GREATER_EQUAL))); @@ -1071,13 +1082,16 @@ BOOL ScTable::ValidQuery(SCROW nRow, con && (nStart != 0 || nEnd != aCellStr.Len()) ) bMatch = FALSE; // RegExp must match entire cell string if ( bRealRegExp ) - bOk = ((rEntry.eOp == SC_NOT_EQUAL) ? !bMatch : bMatch); + bOk = ((rEntry.eOp == SC_NOT_EQUAL || + rEntry.eOp == SC_DOES_NOT_CONTAIN) ? !bMatch : bMatch); else bTestEqual = bMatch; } if ( !bRealRegExp ) { - if ( rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL ) + if ( rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL + || rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN + || rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH) { if ( !rEntry.bQueryByString && rEntry.pStr->Len() == 0 ) { @@ -1099,7 +1113,8 @@ BOOL ScTable::ValidQuery(SCROW nRow, con &xOff ) ); bOk = (aCell.Search( aQuer ) != STRING_NOTFOUND); } - if ( rEntry.eOp == SC_NOT_EQUAL ) + if ( rEntry.eOp == SC_NOT_EQUAL || + rEntry.eOp == SC_DOES_NOT_CONTAIN) bOk = !bOk; } else --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
