bump product version to 4.1.6.2
[LibreOffice.git] / sc / source / ui / dbgui / dbnamdlg.cxx
blobf9c8482255a9e11de3812611e39b5ca0c6d38ec3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <comphelper/string.hxx>
21 #include <vcl/msgbox.hxx>
23 #include "reffact.hxx"
24 #include "document.hxx"
25 #include "scresid.hxx"
26 #include "globstr.hrc"
27 #include "dbnamdlg.hrc"
28 #include "rangenam.hxx" // IsNameValid
29 #include "globalnames.hxx"
31 #define _DBNAMDLG_CXX
32 #include "dbnamdlg.hxx"
33 #undef _DBNAMDLG_CXX
36 //============================================================================
38 #define ABS_SREF SCA_VALID \
39 | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE
40 #define ABS_DREF ABS_SREF \
41 | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE
42 #define ABS_DREF3D ABS_DREF | SCA_TAB_3D
44 //----------------------------------------------------------------------------
46 class DBSaveData;
48 static DBSaveData* pSaveObj = NULL;
50 #define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute()
52 //============================================================================
53 // class DBSaveData
55 class DBSaveData
57 public:
58 DBSaveData( Edit& rEd, CheckBox& rHdr, CheckBox& rSize, CheckBox& rFmt,
59 CheckBox& rStrip, ScRange& rArea )
60 : rEdAssign(rEd),
61 rBtnHeader(rHdr), rBtnSize(rSize), rBtnFormat(rFmt), rBtnStrip(rStrip),
62 rCurArea(rArea),
63 bHeader(false), bSize(false), bFormat(false), bDirty(false) {}
64 void Save();
65 void Restore();
67 private:
68 Edit& rEdAssign;
69 CheckBox& rBtnHeader;
70 CheckBox& rBtnSize;
71 CheckBox& rBtnFormat;
72 CheckBox& rBtnStrip;
73 ScRange& rCurArea;
74 String aStr;
75 ScRange aArea;
76 sal_Bool bHeader:1;
77 sal_Bool bSize:1;
78 sal_Bool bFormat:1;
79 sal_Bool bStrip:1;
80 sal_Bool bDirty:1;
85 //----------------------------------------------------------------------------
87 void DBSaveData::Save()
89 aArea = rCurArea;
90 aStr = rEdAssign.GetText();
91 bHeader = rBtnHeader.IsChecked();
92 bSize = rBtnSize.IsChecked();
93 bFormat = rBtnFormat.IsChecked();
94 bStrip = rBtnStrip.IsChecked();
95 bDirty = sal_True;
99 //----------------------------------------------------------------------------
101 void DBSaveData::Restore()
103 if ( bDirty )
105 rCurArea = aArea;
106 rEdAssign.SetText( aStr );
107 rBtnHeader.Check ( bHeader );
108 rBtnSize.Check ( bSize );
109 rBtnFormat.Check ( bFormat );
110 rBtnStrip.Check ( bStrip );
111 bDirty = false;
116 //============================================================================
117 // class ScDbNameDlg
119 //----------------------------------------------------------------------------
121 ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
122 ScViewData* ptrViewData )
124 : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_DBNAMES ),
126 aFlName ( this, ScResId( FL_NAME ) ),
127 aEdName ( this, ScResId( ED_NAME ) ),
129 aFlAssign ( this, ScResId( FL_ASSIGN ) ),
130 aEdAssign ( this, this, &aFlAssign, ScResId( ED_DBAREA ) ),
131 aRbAssign ( this, ScResId( RB_DBAREA ), &aEdAssign, this ),
133 aFlOptions ( this, ScResId( FL_OPTIONS ) ),
134 aBtnHeader ( this, ScResId( BTN_HEADER ) ),
135 aBtnDoSize ( this, ScResId( BTN_SIZE ) ),
136 aBtnKeepFmt ( this, ScResId( BTN_FORMAT ) ),
137 aBtnStripData ( this, ScResId( BTN_STRIPDATA ) ),
138 aFTSource ( this, ScResId( FT_SOURCE ) ),
139 aFTOperations ( this, ScResId( FT_OPERATIONS ) ),
141 aBtnOk ( this, ScResId( BTN_OK ) ),
142 aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
143 aBtnHelp ( this, ScResId( BTN_HELP ) ),
144 aBtnAdd ( this, ScResId( BTN_ADD ) ),
145 aBtnRemove ( this, ScResId( BTN_REMOVE ) ),
146 aBtnMore ( this, ScResId( BTN_MORE ) ),
148 aStrAdd ( ScResId( STR_ADD ) ),
149 aStrModify ( ScResId( STR_MODIFY ) ),
150 aStrInvalid ( ScResId( STR_DB_INVALID ) ),
152 pViewData ( ptrViewData ),
153 pDoc ( ptrViewData->GetDocument() ),
154 bRefInputMode ( false ),
155 aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ),
156 aLocalDbCol ( *(pDoc->GetDBCollection()) )
158 // WB_NOLABEL can't be set in resource...
159 aFTSource.SetStyle( aFTSource.GetStyle() | WB_NOLABEL );
160 aFTOperations.SetStyle( aFTOperations.GetStyle() | WB_NOLABEL );
162 // damit die Strings in der Resource bei den FixedTexten bleiben koennen:
163 aStrSource = aFTSource.GetText();
164 aStrOperations = aFTOperations.GetText();
166 pSaveObj = new DBSaveData( aEdAssign, aBtnHeader,
167 aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea );
168 Init();
169 FreeResource();
170 aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
174 //----------------------------------------------------------------------------
176 ScDbNameDlg::~ScDbNameDlg()
178 DELETEZ( pSaveObj );
182 //----------------------------------------------------------------------------
184 void ScDbNameDlg::Init()
186 aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
188 aBtnMore.AddWindow( &aFlOptions );
189 aBtnMore.AddWindow( &aBtnHeader );
190 aBtnMore.AddWindow( &aBtnDoSize );
191 aBtnMore.AddWindow( &aBtnKeepFmt );
192 aBtnMore.AddWindow( &aBtnStripData );
193 aBtnMore.AddWindow( &aFTSource );
194 aBtnMore.AddWindow( &aFTOperations );
196 aBtnOk.SetClickHdl ( LINK( this, ScDbNameDlg, OkBtnHdl ) );
197 aBtnCancel.SetClickHdl ( LINK( this, ScDbNameDlg, CancelBtnHdl ) );
198 aBtnAdd.SetClickHdl ( LINK( this, ScDbNameDlg, AddBtnHdl ) );
199 aBtnRemove.SetClickHdl ( LINK( this, ScDbNameDlg, RemoveBtnHdl ) );
200 aEdName.SetModifyHdl ( LINK( this, ScDbNameDlg, NameModifyHdl ) );
201 aEdAssign.SetModifyHdl ( LINK( this, ScDbNameDlg, AssModifyHdl ) );
202 UpdateNames();
204 String theAreaStr;
206 if ( pViewData && pDoc )
208 SCCOL nStartCol = 0;
209 SCROW nStartRow = 0;
210 SCTAB nStartTab = 0;
211 SCCOL nEndCol = 0;
212 SCROW nEndRow = 0;
213 SCTAB nEndTab = 0;
215 ScDBCollection* pDBColl = pDoc->GetDBCollection();
216 ScDBData* pDBData = NULL;
218 pViewData->GetSimpleArea( nStartCol, nStartRow, nStartTab,
219 nEndCol, nEndRow, nEndTab );
221 theCurArea = ScRange( ScAddress( nStartCol, nStartRow, nStartTab ),
222 ScAddress( nEndCol, nEndRow, nEndTab ) );
224 theCurArea.Format( theAreaStr, ABS_DREF3D, pDoc, aAddrDetails );
226 if ( pDBColl )
228 // Feststellen, ob definierter DB-Bereich markiert wurde:
229 pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True );
230 if ( pDBData )
232 ScAddress& rStart = theCurArea.aStart;
233 ScAddress& rEnd = theCurArea.aEnd;
234 SCCOL nCol1;
235 SCCOL nCol2;
236 SCROW nRow1;
237 SCROW nRow2;
238 SCTAB nTab;
240 pDBData->GetArea( nTab, nCol1, nRow1, nCol2, nRow2 );
242 if ( (rStart.Tab() == nTab)
243 && (rStart.Col() == nCol1) && (rStart.Row() == nRow1)
244 && (rEnd.Col() == nCol2) && (rEnd.Row() == nRow2 ) )
246 OUString aDBName = pDBData->GetName();
247 if ( aDBName != STR_DB_LOCAL_NONAME )
248 aEdName.SetText(aDBName);
250 aBtnHeader.Check( pDBData->HasHeader() );
251 aBtnDoSize.Check( pDBData->IsDoSize() );
252 aBtnKeepFmt.Check( pDBData->IsKeepFmt() );
253 aBtnStripData.Check( pDBData->IsStripData() );
254 SetInfoStrings( pDBData );
260 aEdAssign.SetText( theAreaStr );
261 aEdName.GrabFocus();
262 bSaved=sal_True;
263 pSaveObj->Save();
264 NameModifyHdl( 0 );
268 void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
270 OUStringBuffer aBuf;
271 aBuf.append(aStrSource);
272 if (pDBData)
274 aBuf.append(sal_Unicode(' '));
275 aBuf.append(pDBData->GetSourceString());
277 aFTSource.SetText(aBuf.makeStringAndClear());
279 aBuf.append(aStrOperations);
280 if (pDBData)
282 aBuf.append(sal_Unicode(' '));
283 aBuf.append(pDBData->GetOperations());
285 aFTOperations.SetText(aBuf.makeStringAndClear());
288 //----------------------------------------------------------------------------
289 // Uebergabe eines mit der Maus selektierten Tabellenbereiches, der dann als
290 // neue Selektion im Referenz-Fenster angezeigt wird.
292 void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
294 if ( aEdAssign.IsEnabled() )
296 if ( rRef.aStart != rRef.aEnd )
297 RefInputStart( &aEdAssign );
299 theCurArea = rRef;
301 String aRefStr;
302 theCurArea.Format( aRefStr, ABS_DREF3D, pDocP, aAddrDetails );
303 aEdAssign.SetRefString( aRefStr );
304 aBtnHeader.Enable();
305 aBtnDoSize.Enable();
306 aBtnKeepFmt.Enable();
307 aBtnStripData.Enable();
308 aFTSource.Enable();
309 aFTOperations.Enable();
310 aBtnAdd.Enable();
311 bSaved=sal_True;
312 pSaveObj->Save();
317 //----------------------------------------------------------------------------
319 sal_Bool ScDbNameDlg::Close()
321 return DoClose( ScDbNameDlgWrapper::GetChildWindowId() );
324 //------------------------------------------------------------------------
326 void ScDbNameDlg::SetActive()
328 aEdAssign.GrabFocus();
330 // kein NameModifyHdl, weil sonst Bereiche nicht geaendert werden koennen
331 // (nach dem Aufziehen der Referenz wuerde der alte Inhalt wieder angezeigt)
332 // (der ausgewaehlte DB-Name hat sich auch nicht veraendert)
334 RefInputDone();
337 //------------------------------------------------------------------------
339 void ScDbNameDlg::UpdateNames()
341 typedef ScDBCollection::NamedDBs DBsType;
343 const DBsType& rDBs = aLocalDbCol.getNamedDBs();
345 aEdName.SetUpdateMode( false );
346 //-----------------------------------------------------------
347 aEdName.Clear();
348 aEdAssign.SetText( EMPTY_STRING );
350 if (!rDBs.empty())
352 DBsType::const_iterator itr = rDBs.begin(), itrEnd = rDBs.end();
353 for (; itr != itrEnd; ++itr)
354 aEdName.InsertEntry(itr->GetName());
356 else
358 aBtnAdd.SetText( aStrAdd );
359 aBtnAdd.Disable();
360 aBtnRemove.Disable();
362 //-----------------------------------------------------------
363 aEdName.SetUpdateMode( sal_True );
364 aEdName.Invalidate();
367 //------------------------------------------------------------------------
369 void ScDbNameDlg::UpdateDBData( const String& rStrName )
372 const ScDBData* pData = aLocalDbCol.getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(rStrName));
374 if ( pData )
376 SCCOL nColStart = 0;
377 SCROW nRowStart = 0;
378 SCCOL nColEnd = 0;
379 SCROW nRowEnd = 0;
380 SCTAB nTab = 0;
382 pData->GetArea( nTab, nColStart, nRowStart, nColEnd, nRowEnd );
383 theCurArea = ScRange( ScAddress( nColStart, nRowStart, nTab ),
384 ScAddress( nColEnd, nRowEnd, nTab ) );
385 OUString theArea;
386 theCurArea.Format( theArea, ABS_DREF3D, pDoc, aAddrDetails );
387 aEdAssign.SetText( theArea );
388 aBtnAdd.SetText( aStrModify );
389 aBtnHeader.Check( pData->HasHeader() );
390 aBtnDoSize.Check( pData->IsDoSize() );
391 aBtnKeepFmt.Check( pData->IsKeepFmt() );
392 aBtnStripData.Check( pData->IsStripData() );
393 SetInfoStrings( pData );
396 aBtnAdd.SetText( aStrModify );
397 aBtnAdd.Enable();
398 aBtnRemove.Enable();
399 aBtnHeader.Enable();
400 aBtnDoSize.Enable();
401 aBtnKeepFmt.Enable();
402 aBtnStripData.Enable();
403 aFTSource.Enable();
404 aFTOperations.Enable();
407 //------------------------------------------------------------------------
410 sal_Bool ScDbNameDlg::IsRefInputMode() const
412 return bRefInputMode;
415 //------------------------------------------------------------------------
416 // Handler:
417 // ========
419 IMPL_LINK_NOARG(ScDbNameDlg, OkBtnHdl)
421 AddBtnHdl( 0 );
423 // Der View die Aenderungen und die Remove-Liste uebergeben:
424 // beide werden nur als Referenz uebergeben, so dass an dieser
425 // Stelle keine Speicherleichen entstehen koennen:
426 if ( pViewData )
427 pViewData->GetView()->
428 NotifyCloseDbNameDlg( aLocalDbCol, aRemoveList );
430 Close();
431 return 0;
434 //------------------------------------------------------------------------
436 IMPL_LINK_NOARG_INLINE_START(ScDbNameDlg, CancelBtnHdl)
438 Close();
439 return 0;
441 IMPL_LINK_NOARG_INLINE_END(ScDbNameDlg, CancelBtnHdl)
443 //------------------------------------------------------------------------
445 IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
447 String aNewName = comphelper::string::strip(aEdName.GetText(), ' ');
448 String aNewArea = aEdAssign.GetText();
450 if ( aNewName.Len() > 0 && aNewArea.Len() > 0 )
452 if ( ScRangeData::IsNameValid( aNewName, pDoc ) && !aNewName.EqualsAscii(STR_DB_LOCAL_NONAME) )
454 // weil jetzt editiert werden kann, muss erst geparst werden
455 ScRange aTmpRange;
456 String aText = aEdAssign.GetText();
457 if ( aTmpRange.ParseAny( aText, pDoc, aAddrDetails ) & SCA_VALID )
459 theCurArea = aTmpRange;
460 ScAddress aStart = theCurArea.aStart;
461 ScAddress aEnd = theCurArea.aEnd;
463 ScDBData* pOldEntry = aLocalDbCol.getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aNewName));
464 if (pOldEntry)
466 // Bereich veraendern
468 pOldEntry->MoveTo( aStart.Tab(), aStart.Col(), aStart.Row(),
469 aEnd.Col(), aEnd.Row() );
470 pOldEntry->SetByRow( sal_True );
471 pOldEntry->SetHeader( aBtnHeader.IsChecked() );
472 pOldEntry->SetDoSize( aBtnDoSize.IsChecked() );
473 pOldEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
474 pOldEntry->SetStripData( aBtnStripData.IsChecked() );
476 else
478 // neuen Bereich einfuegen
480 ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(),
481 aStart.Col(), aStart.Row(),
482 aEnd.Col(), aEnd.Row(),
483 sal_True, aBtnHeader.IsChecked() );
484 pNewEntry->SetDoSize( aBtnDoSize.IsChecked() );
485 pNewEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
486 pNewEntry->SetStripData( aBtnStripData.IsChecked() );
488 aLocalDbCol.getNamedDBs().insert(pNewEntry);
491 UpdateNames();
493 aEdName.SetText( EMPTY_STRING );
494 aEdName.GrabFocus();
495 aBtnAdd.SetText( aStrAdd );
496 aBtnAdd.Disable();
497 aBtnRemove.Disable();
498 aEdAssign.SetText( EMPTY_STRING );
499 aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
500 aBtnDoSize.Check( false );
501 aBtnKeepFmt.Check( false );
502 aBtnStripData.Check( false );
503 SetInfoStrings( NULL ); // leer
504 theCurArea = ScRange();
505 bSaved=sal_True;
506 pSaveObj->Save();
507 NameModifyHdl( 0 );
509 else
511 ERRORBOX( aStrInvalid );
512 aEdAssign.SetSelection( Selection( 0, SELECTION_MAX ) );
513 aEdAssign.GrabFocus();
516 else
518 ERRORBOX( ScGlobal::GetRscString(STR_INVALIDNAME) );
519 aEdName.SetSelection( Selection( 0, SELECTION_MAX ) );
520 aEdName.GrabFocus();
523 return 0;
526 namespace {
528 class FindByName : public ::std::unary_function<ScDBData, bool>
530 const OUString& mrName;
531 public:
532 FindByName(const OUString& rName) : mrName(rName) {}
533 bool operator() (const ScDBData& r) const
535 return r.GetName().equals(mrName);
541 IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl)
543 OUString aStrEntry = aEdName.GetText();
544 ScDBCollection::NamedDBs& rDBs = aLocalDbCol.getNamedDBs();
545 ScDBCollection::NamedDBs::iterator itr =
546 ::std::find_if(rDBs.begin(), rDBs.end(), FindByName(aStrEntry));
548 if (itr != rDBs.end())
550 String aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY );
552 OUStringBuffer aBuf;
553 aBuf.append(aStrDelMsg.GetToken(0, '#'));
554 aBuf.append(aStrEntry);
555 aBuf.append(aStrDelMsg.GetToken(1, '#'));
556 QueryBox aBox(this, WinBits(WB_YES_NO|WB_DEF_YES), aBuf.makeStringAndClear());
558 if (RET_YES == aBox.Execute())
560 SCTAB nTab;
561 SCCOL nColStart, nColEnd;
562 SCROW nRowStart, nRowEnd;
563 itr->GetArea( nTab, nColStart, nRowStart, nColEnd, nRowEnd );
564 aRemoveList.push_back(
565 ScRange( ScAddress( nColStart, nRowStart, nTab ),
566 ScAddress( nColEnd, nRowEnd, nTab ) ) );
568 rDBs.erase(itr);
570 UpdateNames();
572 aEdName.SetText( EMPTY_STRING );
573 aEdName.GrabFocus();
574 aBtnAdd.SetText( aStrAdd );
575 aBtnAdd.Disable();
576 aBtnRemove.Disable();
577 aEdAssign.SetText( EMPTY_STRING );
578 theCurArea = ScRange();
579 aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
580 aBtnDoSize.Check( false );
581 aBtnKeepFmt.Check( false );
582 aBtnStripData.Check( false );
583 SetInfoStrings( NULL ); // leer
584 bSaved=false;
585 pSaveObj->Restore();
586 NameModifyHdl( 0 );
589 return 0;
592 //------------------------------------------------------------------------
594 IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
596 OUString theName = aEdName.GetText();
597 sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
598 != aEdName.GetEntryPos( theName ));
600 if ( theName.isEmpty() )
602 if (aBtnAdd.GetText() != aStrAdd)
603 aBtnAdd.SetText( aStrAdd );
604 aBtnAdd .Disable();
605 aBtnRemove .Disable();
606 aFlAssign .Disable();
607 aBtnHeader .Disable();
608 aBtnDoSize .Disable();
609 aBtnKeepFmt .Disable();
610 aBtnStripData.Disable();
611 aFTSource .Disable();
612 aFTOperations.Disable();
613 aEdAssign .Disable();
614 aRbAssign .Disable();
615 //bSaved=sal_False;
616 //pSaveObj->Restore();
617 //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
618 //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
619 bRefInputMode = false;
621 else
623 if ( bNameFound )
625 if (aBtnAdd.GetText() != aStrModify)
626 aBtnAdd.SetText( aStrModify );
628 if(!bSaved)
630 bSaved=sal_True;
631 pSaveObj->Save();
633 UpdateDBData( theName );
635 else
637 if (aBtnAdd.GetText() != aStrAdd)
638 aBtnAdd.SetText( aStrAdd );
640 bSaved=false;
641 pSaveObj->Restore();
643 if ( !aEdAssign.GetText().isEmpty() )
645 aBtnAdd.Enable();
646 aBtnHeader.Enable();
647 aBtnDoSize.Enable();
648 aBtnKeepFmt.Enable();
649 aBtnStripData.Enable();
650 aFTSource.Enable();
651 aFTOperations.Enable();
653 else
655 aBtnAdd.Disable();
656 aBtnHeader.Disable();
657 aBtnDoSize.Disable();
658 aBtnKeepFmt.Disable();
659 aBtnStripData.Disable();
660 aFTSource.Disable();
661 aFTOperations.Disable();
663 aBtnRemove.Disable();
666 aFlAssign.Enable();
667 aEdAssign.Enable();
668 aRbAssign.Enable();
670 //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
671 //SFX_APPWINDOW->Enable();
672 bRefInputMode = true;
674 return 0;
677 //------------------------------------------------------------------------
679 IMPL_LINK_NOARG(ScDbNameDlg, AssModifyHdl)
681 // hier parsen fuer Save() etc.
683 ScRange aTmpRange;
684 String aText = aEdAssign.GetText();
685 if ( aTmpRange.ParseAny( aText, pDoc, aAddrDetails ) & SCA_VALID )
686 theCurArea = aTmpRange;
688 return 0;
692 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */