[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Nov 24 05:52:40 PST 2010
sw/source/filter/ww8/ww8par.cxx | 19 ++++++++++++++-----
sw/source/ui/shells/textsh1.cxx | 21 +++------------------
2 files changed, 17 insertions(+), 23 deletions(-)
New commits:
commit 9d706ee42d6fdc4a4d815842f76bf302840ee01f
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Wed Nov 24 14:50:34 2010 +0100
n#652204: Font color selection didn't effect new text
Fixed the font color selection behavior: selecting a color when no
text is selected doesn't turn the paintbrush mode anymore.
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 9455945..5633e4c 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1109,30 +1109,15 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwEditWin& rEditWin = GetView().GetEditWin();
rEditWin.SetTextColor(aSet);
SwApplyTemplate* pApply = rEditWin.GetApplyTemplate();
- SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
- // besteht eine Selektion, wird sie gleich gefaerbt
- if(!pApply && rWrtSh.HasSelection())
+ // If there is a selection, then set the color on it
+ // otherwise, it'll be the color for the next text to be typed
+ if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
{
rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR));
}
- else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
- {
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_EXT);
- }
rReq.Done();
-/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
- SwEditWin& rEdtWin = GetView().GetEditWin();
-
- SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
-
- if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
- {
- GetShell().SetAttr(aItem);
- }
-*/
}
}
break;
commit de10bd16e3a632b8326e5b6c88ea4131c2937d7b
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Tue Nov 23 10:01:12 2010 +0100
n#652364: Fixed a ww8 column break import problem.
When a column section break was inserted in word, it was transformed
into a page break.
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e3557d1..24c22df 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3647,6 +3647,14 @@ void wwSectionManager::InsertSegments()
mySegIter aStart = maSegments.begin();
for (mySegIter aIter = aStart; aIter != aEnd; ++aIter)
{
+ // If the section is of type "New column" (0x01), then simply insert a column break
+ if ( aIter->maSep.bkc == 1 )
+ {
+ SwPaM start( aIter->maStart );
+ mrReader.rDoc.InsertPoolItem( start, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
+ continue;
+ }
+
mySegIter aNext = aIter+1;
mySegIter aPrev = (aIter == aStart) ? aIter : aIter-1;
@@ -3658,11 +3666,12 @@ void wwSectionManager::InsertSegments()
bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() && bThisAndPreviousAreCompatible): false;
bool bInsertPageDesc = !bInsertSection;
bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this...
- if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected()) {
- // here we have the special case that the whole document is protected, with the execption of this section.
- // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
- mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
- }
+ if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected())
+ {
+ // here we have the special case that the whole document is protected, with the execption of this section.
+ // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
+ mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
+ }
if (bInsertPageDesc)
More information about the Libreoffice-commits
mailing list