summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-01-20 14:04:00 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-01-20 14:04:00 +0000
commit29acd7d6a176385114d98897dc6e449e408cd274 (patch)
tree49c28e6d3c6d2ff94138295f9570773cd35a1e49
parent6cae289855d8f5d85c42e0f90fd45fd7d1a54c55 (diff)
CWS-TOOLING: integrate CWS os124
2009-01-13 07:55:10 +0100 os r266195 : build error fixed 2009-01-12 17:56:41 +0100 os r266176 : CWS-TOOLING: rebase CWS os124 to trunk@265758 (milestone: DEV300:m38) 2008-12-29 15:24:28 +0100 os r265819 : #i97456# build error with PCH fixed 2008-12-29 15:12:28 +0100 os r265818 : #i97388# minimum values set for char width and text size 2008-12-29 10:22:09 +0100 os r265815 : #i94820# date fields imported with the correct type 2008-12-23 14:51:15 +0100 os r265783 : #ii97295# force shell update before inserting frmame or picture on click to field 2008-12-23 13:31:42 +0100 os r265779 : #i92817# annotation workaround added 2008-12-23 11:44:05 +0100 os r265776 : #i92817# import of annotation added 2008-12-23 11:42:22 +0100 os r265775 : #i92817# draw model needs to be created before creation of an Outliner 2008-12-23 08:49:13 +0100 os r265770 : #i97436#loading of documents in the wizard should only enable the second wizard page 2008-12-22 11:40:26 +0100 os r265750 : collect and set TableBorder property - currently not correctly processed in Writer 2008-12-18 16:31:38 +0100 os r265704 : #i97397# table/cell/paragraph background improved# 2008-12-10 14:36:00 +0100 os r265188 : #i30490# minimum decreased for fixed line spacing 2008-12-10 14:33:05 +0100 os r265186 : #i30490# minimum decreased for fixed line spacing
-rwxr-xr-xsw/source/core/fields/textapi.cxx6
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx2
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx11
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx3
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx42
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx2
-rw-r--r--sw/source/ui/inc/mailmergewizard.hxx5
-rw-r--r--sw/source/ui/misc/pggrid.src6
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx2
9 files changed, 46 insertions, 33 deletions
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index a4674d4b91..c21c5776d9 100755
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -132,6 +132,8 @@ SvxTextForwarder* SwTextAPIEditSource::GetTextForwarder()
if( !pImpl->mpOutliner )
{
+ //init draw model first
+ pImpl->mpDoc->GetOrCreateDrawModel();
pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
}
@@ -148,6 +150,8 @@ void SwTextAPIEditSource::SetText( OutlinerParaObject& rText )
{
if( !pImpl->mpOutliner )
{
+ //init draw model first
+ pImpl->mpDoc->GetOrCreateDrawModel();
pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
}
@@ -162,6 +166,8 @@ void SwTextAPIEditSource::SetString( const String& rText )
{
if( !pImpl->mpOutliner )
{
+ //init draw model first
+ pImpl->mpDoc->GetOrCreateDrawModel();
pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
}
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 4e45829cfd..d23a482187 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -204,7 +204,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
if (!bDrawParaDlg)
{
aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000E));
- aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, MM50/2));
+ aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, MM50/10));
}
rPage.PageCreated(aSet);
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 7b286a7197..6df323da4a 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -72,6 +72,7 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
SW_RES(DLG_MAILMERGEWIZARD),
WZB_NEXT|WZB_PREVIOUS|WZB_FINISH|WZB_CANCEL|WZB_HELP),
m_pSwView(&rView),
+ m_bDocumentLoad( false ),
m_rConfigItem(rItem),
m_sStarting( SW_RES( ST_STARTING )),
m_sDocumentType( SW_RES( ST_DOCUMETNTYPE )),
@@ -259,6 +260,8 @@ void SwMailMergeWizard::UpdateRoadmap()
bool bGreetingFieldsConfigured = !m_rConfigItem.IsGreetingLine(sal_False) ||
!m_rConfigItem.IsIndividualGreeting(sal_False)||
m_rConfigItem.IsGreetingFieldsAssigned();
+ //#i97436# if a document has to be loaded then enable output type page only
+ m_bDocumentLoad = false;
bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) ||
static_cast<svt::OWizardPage*>(pCurPage)->commitPage( eValidate );
@@ -270,11 +273,13 @@ void SwMailMergeWizard::UpdateRoadmap()
bEnable = sal_True;
break;
case MM_OUTPUTTYPETPAGE :
- case MM_ADDRESSBLOCKPAGE :
bEnable = bEnableOutputTypePage;
break;
+ case MM_ADDRESSBLOCKPAGE :
+ bEnable = !m_bDocumentLoad && bEnableOutputTypePage;
+ break;
case MM_GREETINGSPAGE :
- bEnable = bEnableOutputTypePage &&
+ bEnable = !m_bDocumentLoad && bEnableOutputTypePage &&
m_rConfigItem.GetResultSet().is() &&
bAddressFieldsConfigured;
break;
@@ -282,7 +287,7 @@ void SwMailMergeWizard::UpdateRoadmap()
case MM_MERGEPAGE :
case MM_OUTPUTPAGE :
case MM_LAYOUTPAGE :
- bEnable = bEnableOutputTypePage &&
+ bEnable = !m_bDocumentLoad && bEnableOutputTypePage &&
m_rConfigItem.GetResultSet().is() &&
bAddressFieldsConfigured &&
bGreetingFieldsConfigured;
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 33655db6f0..1c479cb995 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -212,6 +212,9 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )||
((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())||
(m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength());
+ if( _eReason == eValidate )
+ m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked());
+
if(bNext && !m_aCurrentDocRB.IsChecked())
{
if(sReloadDocument.getLength())
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 16830e2964..759fac9391 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -67,19 +67,11 @@
#endif
-enum SwHtmlTextType {
- TT_SGML = svtools::HTMLSGML ,
- TT_COMMENT = svtools::HTMLCOMMENT,
- TT_KEYWORD = svtools::HTMLKEYWORD,
- TT_UNKNOWN = svtools::HTMLUNKNOWN
-};
-
-
struct SwTextPortion
{
USHORT nLine;
USHORT nStart, nEnd;
- SwHtmlTextType eType;
+ svtools::ColorConfigEntry eType;
};
#define MAX_SYNTAX_HIGHLIGHT 20
@@ -120,7 +112,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
SwTextPortion aText;
while(nActPos < nStrLen)
{
- SwHtmlTextType eFoundType = TT_UNKNOWN;
+ svtools::ColorConfigEntry eFoundType = svtools::HTMLUNKNOWN;
if(rSource.GetChar(nActPos) == cOpenBracket && nActPos < nStrLen - 2 )
{
// 'leere' Portion einfuegen
@@ -132,7 +124,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(nInsert)
aText.nStart += 1;
aText.nEnd = nActPos - 1;
- aText.eType = TT_UNKNOWN;
+ aText.eType = svtools::HTMLUNKNOWN;
aPortionList.Insert(aText, nInsert++);
}
sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1));
@@ -143,10 +135,10 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(cMinus == cFollowNext &&
nActPos < nStrLen - 3 && cMinus == rSource.GetChar((xub_StrLen)(nActPos + 3)))
{
- eFoundType = TT_COMMENT;
+ eFoundType = svtools::HTMLCOMMENT;
}
else
- eFoundType = TT_SGML;
+ eFoundType = svtools::HTMLSGML;
nPortStart = nActPos;
nPortEnd = nActPos + 1;
}
@@ -157,7 +149,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
nActPos++;
nOffset++;
}
- if(TT_UNKNOWN == eFoundType)
+ if(svtools::HTMLUNKNOWN == eFoundType)
{
//jetzt koennte hier ein keyword folgen
USHORT nSrchPos = nActPos;
@@ -183,7 +175,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(nToken)
{
//Token gefunden
- eFoundType = TT_KEYWORD;
+ eFoundType = svtools::HTMLKEYWORD;
nPortEnd = nSrchPos;
nPortStart = nActPos;
}
@@ -199,7 +191,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
}
}
// jetzt muss noch '>' gesucht werden
- if(TT_UNKNOWN != eFoundType)
+ if(svtools::HTMLUNKNOWN != eFoundType)
{
BOOL bFound = FALSE;
for(USHORT i = nPortEnd; i < nStrLen; i++)
@@ -209,14 +201,14 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
nPortEnd = i;
break;
}
- if(!bFound && (eFoundType == TT_COMMENT))
+ if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{
// Kommentar ohne Ende in dieser Zeile
bFound = TRUE;
nPortEnd = nStrLen - 1;
}
- if(bFound ||(eFoundType == TT_COMMENT))
+ if(bFound ||(eFoundType == svtools::HTMLCOMMENT))
{
SwTextPortion aTextPortion;
aTextPortion.nLine = 0;
@@ -224,7 +216,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aTextPortion.nEnd = nPortEnd;
aTextPortion.eType = eFoundType;
aPortionList.Insert(aTextPortion, nInsert++);
- eFoundType = TT_UNKNOWN;
+ eFoundType = svtools::HTMLUNKNOWN;
}
}
@@ -236,7 +228,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nLine = 0;
aText.nStart = nPortEnd + 1;
aText.nEnd = nActPos - 1;
- aText.eType = TT_UNKNOWN;
+ aText.eType = svtools::HTMLUNKNOWN;
aPortionList.Insert(aText, nInsert++);
}
}
@@ -806,11 +798,11 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
SwTextPortion& r = aPortionList[i];
if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben
continue;
- if(r.eType != (SwHtmlTextType)svtools::HTMLSGML &&
- r.eType != (SwHtmlTextType)svtools::HTMLCOMMENT &&
- r.eType != (SwHtmlTextType)svtools::HTMLKEYWORD &&
- r.eType != (SwHtmlTextType)svtools::HTMLUNKNOWN)
- r.eType = (SwHtmlTextType)svtools::HTMLUNKNOWN;
+ if(r.eType != svtools::HTMLSGML &&
+ r.eType != svtools::HTMLCOMMENT &&
+ r.eType != svtools::HTMLKEYWORD &&
+ r.eType != svtools::HTMLUNKNOWN)
+ r.eType = svtools::HTMLUNKNOWN;
Color aColor((ColorData)SW_MOD()->GetColorConfig().GetColorValue((svtools::ColorConfigEntry)r.eType).nColor);
USHORT nLine = nLineOff+r.nLine; //
pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, TRUE );
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index fb3cf4caa8..500685b1f9 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -462,7 +462,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
{
if( rPage.GetItemSet().GetParent() )
{
- aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST,MM50/2));
+ aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST,MM50/10));
aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000F));
rPage.PageCreated(aSet);
}
diff --git a/sw/source/ui/inc/mailmergewizard.hxx b/sw/source/ui/inc/mailmergewizard.hxx
index 76d64b376b..a34b570d07 100644
--- a/sw/source/ui/inc/mailmergewizard.hxx
+++ b/sw/source/ui/inc/mailmergewizard.hxx
@@ -48,6 +48,8 @@ class SwMailMergeWizard : public ::svt::RoadmapWizard
{
SwView* m_pSwView;
String sDocumentURL;
+ bool m_bDocumentLoad;
+
SwMailMergeConfigItem& m_rConfigItem;
String m_sStarting;
@@ -83,6 +85,9 @@ public:
void SetReloadDocument(const String& rURL){sDocumentURL = rURL;}
const String& GetReloadDocument() const {return sDocumentURL;}
+ //next step requires loading of document
+ void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;}
+
void UpdateRoadmap();
void CreateTargetDocument();
diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src
index f52f6bc1b8..a7bdd513d2 100644
--- a/sw/source/ui/misc/pggrid.src
+++ b/sw/source/ui/misc/pggrid.src
@@ -115,7 +115,7 @@ TabPage TP_TEXTGRID_PAGE
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
- Minimum = 1 ;
+ Minimum = 100 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_POINT ;
@@ -161,7 +161,7 @@ TabPage TP_TEXTGRID_PAGE
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
- Minimum = 0 ;
+ Minimum = 100 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_POINT;
@@ -184,7 +184,7 @@ TabPage TP_TEXTGRID_PAGE
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
- Minimum = 0 ;
+ Minimum = 100 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_POINT;
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index a15396c6ed..fb2e4ab3ab 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -281,6 +281,8 @@ void SwWrtShell::ClickToField( const SwField& rFld )
if( nSlotId )
{
StartUndo( UNDO_START );
+ //#97295# immediately select the right shell
+ GetView().StopShellTimer();
GetView().GetViewFrame()->GetDispatcher()->Execute( nSlotId,
SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD );
EndUndo( UNDO_END );