You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/05/31 15:56:04 UTC
svn commit: r1488227 [2/15] - in /openoffice/branches/rejuvenate01: ./
ext_libraries/apr/ ext_libraries/apr/prj/ ext_libraries/coinmp/prj/
ext_libraries/ratscan/prj/ ext_libraries/serf/prj/ main/
main/basctl/source/dlged/ main/basctl/uiconfig/basicide/...
Modified: openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx (original)
+++ openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx Fri May 31 13:55:58 2013
@@ -99,6 +99,141 @@ namespace drawinglayer
mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
}
+ bool VclPixelProcessor2D::tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency)
+ {
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(rSource.getB2DPolyPolygon());
+
+ if(!aLocalPolyPolygon.count())
+ {
+ // no geometry, done
+ return true;
+ }
+
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rSource.getBColor()));
+
+ mpOutputDevice->SetFillColor(Color(aPolygonColor));
+ mpOutputDevice->SetLineColor();
+ aLocalPolyPolygon.transform(maCurrentTransformation);
+ mpOutputDevice->DrawTransparent(
+ aLocalPolyPolygon,
+ fTransparency);
+
+ return true;
+ }
+
+ bool VclPixelProcessor2D::tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency)
+ {
+ basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
+
+ if(!aLocalPolygon.count())
+ {
+ // no geometry, done
+ return true;
+ }
+
+ const basegfx::BColor aLineColor(maBColorModifierStack.getModifiedColor(rSource.getBColor()));
+
+ mpOutputDevice->SetFillColor();
+ mpOutputDevice->SetLineColor(Color(aLineColor));
+ aLocalPolygon.transform(maCurrentTransformation);
+
+ // try drawing; if it did not work, use standard fallback
+ if(mpOutputDevice->TryDrawPolyLineDirect(
+ aLocalPolygon,
+ 0.0,
+ fTransparency))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ bool VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency)
+ {
+ basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
+
+ if(!aLocalPolygon.count())
+ {
+ // no geometry, done
+ return true;
+ }
+
+ aLocalPolygon = basegfx::tools::simplifyCurveSegments(aLocalPolygon);
+ basegfx::B2DPolyPolygon aHairLinePolyPolygon;
+
+ if(rSource.getStrokeAttribute().isDefault() || 0.0 == rSource.getStrokeAttribute().getFullDotDashLen())
+ {
+ // no line dashing, just copy
+ aHairLinePolyPolygon.append(aLocalPolygon);
+ }
+ else
+ {
+ // apply LineStyle
+ basegfx::tools::applyLineDashing(
+ aLocalPolygon,
+ rSource.getStrokeAttribute().getDotDashArray(),
+ &aHairLinePolyPolygon,
+ 0,
+ rSource.getStrokeAttribute().getFullDotDashLen());
+ }
+
+ if(!aHairLinePolyPolygon.count())
+ {
+ // no geometry, done
+ return true;
+ }
+
+ const basegfx::BColor aLineColor(
+ maBColorModifierStack.getModifiedColor(
+ rSource.getLineAttribute().getColor()));
+
+ mpOutputDevice->SetFillColor();
+ mpOutputDevice->SetLineColor(Color(aLineColor));
+ aHairLinePolyPolygon.transform(maCurrentTransformation);
+
+ double fLineWidth(rSource.getLineAttribute().getWidth());
+
+ if(basegfx::fTools::more(fLineWidth, 0.0))
+ {
+ basegfx::B2DVector aLineWidth(fLineWidth, 0.0);
+
+ aLineWidth = maCurrentTransformation * aLineWidth;
+ fLineWidth = aLineWidth.getLength();
+ }
+
+ bool bHasPoints(false);
+ bool bTryWorked(false);
+
+ for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
+ {
+ const basegfx::B2DPolygon aSingle(aHairLinePolyPolygon.getB2DPolygon(a));
+
+ if(aSingle.count())
+ {
+ bHasPoints = true;
+
+ if(mpOutputDevice->TryDrawPolyLineDirect(
+ aSingle,
+ fLineWidth,
+ fTransparency,
+ rSource.getLineAttribute().getLineJoin(),
+ rSource.getLineAttribute().getLineCap()))
+ {
+ bTryWorked = true;
+ }
+ }
+ }
+
+ if(!bTryWorked && !bHasPoints)
+ {
+ // no geometry despite try
+ bTryWorked = true;
+ }
+
+ return bTryWorked;
+ }
+
void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate)
{
switch(rCandidate.getPrimitive2DID())
@@ -176,8 +311,17 @@ namespace drawinglayer
}
case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D :
{
- // direct draw of hairline
- RenderPolygonHairlinePrimitive2D(static_cast< const primitive2d::PolygonHairlinePrimitive2D& >(rCandidate), true);
+ // try to use directly
+ const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D = static_cast< const primitive2d::PolygonHairlinePrimitive2D& >(rCandidate);
+ static bool bAllowed(true);
+
+ if(bAllowed && tryDrawPolygonHairlinePrimitive2DDirect(rPolygonHairlinePrimitive2D, 0.0))
+ {
+ break;
+ }
+
+ // direct draw of hairline
+ RenderPolygonHairlinePrimitive2D(rPolygonHairlinePrimitive2D, true);
break;
}
case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D :
@@ -247,8 +391,53 @@ namespace drawinglayer
}
case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D :
{
- // direct draw of PolyPolygon with color
- RenderPolyPolygonColorPrimitive2D(static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate));
+ // try to use directly
+ const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D = static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate);
+ basegfx::B2DPolyPolygon aLocalPolyPolygon;
+ static bool bAllowed(true);
+
+ if(bAllowed && tryDrawPolyPolygonColorPrimitive2DDirect(rPolyPolygonColorPrimitive2D, 0.0))
+ {
+ // okay, done. In this case no gaps should have to be repaired, too
+ }
+ else
+ {
+ // direct draw of PolyPolygon with color
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolyPolygonColorPrimitive2D.getBColor()));
+
+ mpOutputDevice->SetFillColor(Color(aPolygonColor));
+ mpOutputDevice->SetLineColor();
+ aLocalPolyPolygon = rPolyPolygonColorPrimitive2D.getB2DPolyPolygon();
+ aLocalPolyPolygon.transform(maCurrentTransformation);
+ mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
+ }
+
+ // when AA is on and this filled polygons are the result of stroked line geometry,
+ // draw the geometry once extra as lines to avoid AA 'gaps' between partial polygons
+ // Caution: This is needed in both cases (!)
+ if(mnPolygonStrokePrimitive2D
+ && getOptionsDrawinglayer().IsAntiAliasing()
+ && (mpOutputDevice->GetAntialiasing() & ANTIALIASING_ENABLE_B2DDRAW))
+ {
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolyPolygonColorPrimitive2D.getBColor()));
+ sal_uInt32 nCount(aLocalPolyPolygon.count());
+
+ if(!nCount)
+ {
+ aLocalPolyPolygon = rPolyPolygonColorPrimitive2D.getB2DPolyPolygon();
+ aLocalPolyPolygon.transform(maCurrentTransformation);
+ nCount = aLocalPolyPolygon.count();
+ }
+
+ mpOutputDevice->SetFillColor();
+ mpOutputDevice->SetLineColor(Color(aPolygonColor));
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ mpOutputDevice->DrawPolyLine(aLocalPolyPolygon.getB2DPolygon(a), 0.0);
+ }
+ }
+
break;
}
case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D :
@@ -317,28 +506,44 @@ namespace drawinglayer
{
case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D:
{
- // single transparent PolyPolygon identified, use directly
- const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
- const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor()));
- mpOutputDevice->SetFillColor(Color(aPolygonColor));
- mpOutputDevice->SetLineColor();
-
- basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon());
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
- mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence());
- bDrawTransparentUsed = true;
- break;
- }
- // #i# need to wait for #i101378# which is in CWS vcl112 to directly paint transparent hairlines
- //case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
- //{
- // // single transparent PolygonHairlinePrimitive2D identified, use directly
- // const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
- // OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
- // break;
- //}
+ // single transparent PolyPolygon identified, use directly
+ const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
+ OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ bDrawTransparentUsed = tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
+ break;
+ }
+ case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
+ {
+ // single transparent PolygonHairlinePrimitive2D identified, use directly
+ const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
+ OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+
+ // do no tallow by default - problem is that self-overlapping parts of this geometry will
+ // not be in a all-same transparency but will already alpha-cover themselves with blending.
+ // This is not what the UnifiedTransparencePrimitive2D defines: It requires all it's
+ // content to be uniformely transparent.
+ // For hairline the effect is pretty minimal, but still not correct.
+ static bool bAllowed(false);
+
+ bDrawTransparentUsed = bAllowed && tryDrawPolygonHairlinePrimitive2DDirect(*pPoHair, rUniTransparenceCandidate.getTransparence());
+ break;
+ }
+ case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D:
+ {
+ // single transparent PolygonStrokePrimitive2D identified, use directly
+ const primitive2d::PolygonStrokePrimitive2D* pPoStroke = static_cast< const primitive2d::PolygonStrokePrimitive2D* >(pBasePrimitive);
+ OSL_ENSURE(pPoStroke, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+
+ // do no tallow by default - problem is that self-overlapping parts of this geometry will
+ // not be in a all-same transparency but will already alpha-cover themselves with blending.
+ // This is not what the UnifiedTransparencePrimitive2D defines: It requires all it's
+ // content to be uniformely transparent.
+ // To check, acitvate and draw a wide transparent self-crossing line/curve
+ static bool bAllowed(false);
+
+ bDrawTransparentUsed = bAllowed && tryDrawPolygonStrokePrimitive2DDirect(*pPoStroke, rUniTransparenceCandidate.getTransparence());
+ break;
+ }
}
}
}
@@ -438,6 +643,14 @@ namespace drawinglayer
}
case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D:
{
+ // try to use directly
+ const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D = static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate);
+
+ if(tryDrawPolygonStrokePrimitive2DDirect(rPolygonStrokePrimitive2D, 0.0))
+ {
+ break;
+ }
+
// the stroke primitive may be decomposed to filled polygons. To keep
// evtl. set DrawModes aka DRAWMODE_BLACKLINE, DRAWMODE_GRAYLINE,
// DRAWMODE_GHOSTEDLINE, DRAWMODE_WHITELINE or DRAWMODE_SETTINGSLINE
@@ -466,9 +679,7 @@ namespace drawinglayer
// as filled polygons is geometrically corret but looks wrong since polygon filling avoids
// the right and bottom pixels. The used method evaluates that and takes the correct action,
// including calling recursively with decomposition if line is wide enough
- const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive = static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate);
-
- RenderPolygonStrokePrimitive2D(rPolygonStrokePrimitive);
+ RenderPolygonStrokePrimitive2D(rPolygonStrokePrimitive2D);
}
// restore DrawMode
Modified: openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclprocessor2d.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclprocessor2d.cxx (original)
+++ openoffice/branches/rejuvenate01/main/drawinglayer/source/processor2d/vclprocessor2d.cxx Fri May 31 13:55:58 2013
@@ -756,86 +756,6 @@ namespace drawinglayer
}
}
- // direct draw of PolyPolygon with color
- void VclProcessor2D::RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate)
- {
- const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolygonCandidate.getBColor()));
- mpOutputDevice->SetFillColor(Color(aPolygonColor));
- mpOutputDevice->SetLineColor();
-
- basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolygonCandidate.getB2DPolyPolygon());
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
- static bool bCheckTrapezoidDecomposition(false);
- static bool bShowOutlinesThere(false);
- if(bCheckTrapezoidDecomposition)
- {
- // clip against discrete ViewPort
- const basegfx::B2DRange& rDiscreteViewport = getViewInformation2D().getDiscreteViewport();
- aLocalPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(
- aLocalPolyPolygon, rDiscreteViewport, true, false);
-
- if(aLocalPolyPolygon.count())
- {
- // subdivide
- aLocalPolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(
- aLocalPolyPolygon, 0.5);
-
- // trapezoidize
- basegfx::B2DTrapezoidVector aB2DTrapezoidVector;
- basegfx::tools::trapezoidSubdivide(aB2DTrapezoidVector, aLocalPolyPolygon);
-
- const sal_uInt32 nCount(aB2DTrapezoidVector.size());
-
- if(nCount)
- {
- basegfx::BColor aInvPolygonColor(aPolygonColor);
- aInvPolygonColor.invert();
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- const basegfx::B2DPolygon aTempPolygon(aB2DTrapezoidVector[a].getB2DPolygon());
-
- if(bShowOutlinesThere)
- {
- mpOutputDevice->SetFillColor(Color(aPolygonColor));
- mpOutputDevice->SetLineColor();
- }
-
- mpOutputDevice->DrawPolygon(aTempPolygon);
-
- if(bShowOutlinesThere)
- {
- mpOutputDevice->SetFillColor();
- mpOutputDevice->SetLineColor(Color(aInvPolygonColor));
- mpOutputDevice->DrawPolyLine(aTempPolygon, 0.0);
- }
- }
- }
- }
- }
- else
- {
- mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
-
- if(mnPolygonStrokePrimitive2D
- && getOptionsDrawinglayer().IsAntiAliasing()
- && (mpOutputDevice->GetAntialiasing() & ANTIALIASING_ENABLE_B2DDRAW))
- {
- // when AA is on and this filled polygons are the result of stroked line geometry,
- // draw the geometry once extra as lines to avoid AA 'gaps' between partial polygons
- mpOutputDevice->SetFillColor();
- mpOutputDevice->SetLineColor(Color(aPolygonColor));
- const sal_uInt32 nCount(aLocalPolyPolygon.count());
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- mpOutputDevice->DrawPolyLine(aLocalPolyPolygon.getB2DPolygon(a), 0.0);
- }
- }
- }
- }
-
// mask group. Force output to VDev and create mask from given mask
void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate)
{
Modified: openoffice/branches/rejuvenate01/main/editeng/Library_editeng.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/Library_editeng.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/Library_editeng.mk (original)
+++ openoffice/branches/rejuvenate01/main/editeng/Library_editeng.mk Fri May 31 13:55:58 2013
@@ -140,7 +140,7 @@ $(eval $(call gb_Library_add_linked_libs
basegfx \
lng \
svt \
- tk \
+ ootk \
vcl \
svl \
stl \
Modified: openoffice/branches/rejuvenate01/main/editeng/inc/editeng/outliner.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/inc/editeng/outliner.hxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/inc/editeng/outliner.hxx (original)
+++ openoffice/branches/rejuvenate01/main/editeng/inc/editeng/outliner.hxx Fri May 31 13:55:58 2013
@@ -368,15 +368,47 @@ public:
const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const;
const SvxFieldItem* GetFieldAtSelection() const;
- /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off
- or disables numbering for the selected paragraphs if the numbering of the first paragraph is on
- */
- void ToggleBullets();
- sal_Bool ToggleBullets(sal_Bool bBulletOnOff, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL, sal_Bool bForceBulletOnOff = false);
- sal_Bool ToggleAllParagraphsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bToggleOn, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL);
- /** enables numbering for the selected paragraphs that are not enabled and ignore all selected
- paragraphs that already have numbering enabled.
- */
+ /** enables bullets for the selected paragraphs if the bullets/numbering of the first paragraph is off
+ or disables bullets/numbering for the selected paragraphs if the bullets/numbering of the first paragraph is on
+ */
+ void ToggleBullets();
+
+ void ToggleBulletsNumbering(
+ const bool bToggle,
+ const bool bHandleBullets,
+ const SvxNumRule* pNumRule = NULL );
+
+ /** apply bullets/numbering for paragraphs
+
+ @param boolean bHandleBullets
+ true: handle bullets
+ false: handle numbering
+
+ @param pNewNumRule
+ numbering rule which needs to be applied. can be 0.
+
+ @param boolean bAtSelection
+ true: apply bullets/numbering at selected paragraphs
+ false: apply bullets/numbering at all paragraphs
+ */
+ void ApplyBulletsNumbering(
+ const bool bHandleBullets,
+ const SvxNumRule* pNewNumRule,
+ const bool bCheckCurrentNumRuleBeforeApplyingNewNumRule,
+ const bool bAtSelection = false );
+
+ /** switch off bullets/numbering for paragraphs
+
+ @param boolean bAtSelection
+ true: switch off bullets/numbering at selected paragraphs
+ false: switch off bullets/numbering at all paragraphs
+ */
+ void SwitchOffBulletsNumbering(
+ const bool bAtSelection = false );
+
+ /** enables numbering for the selected paragraphs that are not enabled and ignore all selected
+ paragraphs that already have numbering enabled.
+ */
void EnableBullets();
sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False );
@@ -648,15 +680,16 @@ class EDITENG_DLLPUBLIC Outliner : publi
DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EditEngineNotifyHdl, EENotify* );
- void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd );
- sal_Bool ImplHasBullet( sal_uInt16 nPara ) const;
- Size ImplGetBulletSize( sal_uInt16 nPara );
- sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt );
- void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds );
- String ImplGetBulletText( sal_uInt16 nPara );
- void ImplCheckNumBulletItem( sal_uInt16 nPara );
- void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
- void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL );
+
+ void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd );
+ bool ImplHasNumberFormat( sal_uInt16 nPara ) const;
+ Size ImplGetBulletSize( sal_uInt16 nPara );
+ sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt );
+ void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds );
+ String ImplGetBulletText( sal_uInt16 nPara );
+ void ImplCheckNumBulletItem( sal_uInt16 nPara );
+ void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
+ void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL );
void ImplBlockInsertionCallbacks( sal_Bool b );
@@ -1051,7 +1084,25 @@ public:
virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
- sal_Int16 GetBulletsNumberingStatus();
+ /** determine the bullets/numbering status of the given paragraphs
+
+ @param nParaStart
+ index of paragraph at which the check starts
+
+ @param nParaEnd
+ index of paragraph at which the check ends
+
+ @returns
+ 0 : all paragraphs have bullets
+ 1 : all paragraphs have numbering
+ 2 : otherwise
+ */
+ sal_Int16 GetBulletsNumberingStatus(
+ const sal_uInt16 nParaStart,
+ const sal_uInt16 nParaEnd ) const;
+
+ // convenient method to determine the bullets/numbering status for all paragraphs
+ sal_Int16 GetBulletsNumberingStatus() const;
};
#endif
Modified: openoffice/branches/rejuvenate01/main/editeng/source/outliner/outleeng.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/source/outliner/outleeng.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/source/outliner/outleeng.cxx (original)
+++ openoffice/branches/rejuvenate01/main/editeng/source/outliner/outleeng.cxx Fri May 31 13:55:58 2013
@@ -76,7 +76,7 @@ Rectangle OutlinerEditEng::GetBulletArea
Rectangle aBulletArea = Rectangle( Point(), Point() );
if ( nPara < pOwner->pParaList->GetParagraphCount() )
{
- if ( pOwner->ImplHasBullet( nPara ) )
+ if ( pOwner->ImplHasNumberFormat( nPara ) )
aBulletArea = pOwner->ImpCalcBulletArea( nPara, sal_False, sal_False );
}
return aBulletArea;
Modified: openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlin2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlin2.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlin2.cxx (original)
+++ openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlin2.cxx Fri May 31 13:55:58 2013
@@ -599,7 +599,7 @@ sal_Bool Outliner::IsTextPos( const Poin
{
Point aDocPos = GetDocPos( rPaperPos );
sal_uInt16 nPara = pEditEngine->FindParagraph( aDocPos.Y() );
- if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) )
+ if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasNumberFormat( nPara ) )
{
Rectangle aBulArea = ImpCalcBulletArea( nPara, sal_True, sal_True );
if ( aBulArea.IsInside( rPaperPos ) )
Modified: openoffice/branches/rejuvenate01/main/editeng/source/outliner/outliner.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/source/outliner/outliner.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/source/outliner/outliner.cxx (original)
+++ openoffice/branches/rejuvenate01/main/editeng/source/outliner/outliner.cxx Fri May 31 13:55:58 2013
@@ -370,51 +370,60 @@ void Outliner::SetParaIsNumberingRestart
}
}
-sal_Int16 Outliner::GetBulletsNumberingStatus()
+sal_Int16 Outliner::GetBulletsNumberingStatus(
+ const sal_uInt16 nParaStart,
+ const sal_uInt16 nParaEnd ) const
{
- sal_Bool bHasBulletsNumbering = FALSE;
- sal_uInt16 nParaCount = (sal_uInt16)(pParaList->GetParagraphCount());
- for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
- {
- if ((bHasBulletsNumbering = ImplHasBullet(nPara)))
- {
- break;
- }
- }
- sal_uInt16 nBulletsCount = 0;
- sal_uInt16 nNumberingCount = 0;
- if (bHasBulletsNumbering)
- {
- // At least have one paragraph that having bullets or numbering.
- for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
- {
- Paragraph* pPara = pParaList->GetParagraph(nPara);
- // const SfxItemSet& rAttrs = GetParaAttribs(nPara);
- if (!pPara)
- {
- continue;
- }
- const SvxNumberFormat* pFmt = GetNumberFormat(nPara);
- if (!pFmt)
- {
- // At least, exists one paragraph that has no Bullets/Numbering.
- break;
- }
- else if ((pFmt->GetNumberingType() == SVX_NUM_BITMAP) || (pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL))
- {
- // Having Bullets in this paragraph.
- nBulletsCount++;
- }
- else
- {
- // Having Numbering in this paragraph.
- nNumberingCount++;
- }
- }
- }
- sal_Int16 nValue = (nBulletsCount == nParaCount) ? 0 : 2;
- nValue = (nNumberingCount == nParaCount) ? 1 : nValue;
- return nValue;
+ if ( nParaStart > nParaEnd
+ || nParaEnd >= pParaList->GetParagraphCount() )
+ {
+ DBG_ASSERT( false,"<Outliner::GetBulletsNumberingStatus> - unexpected parameter values" );
+ return 2;
+ }
+
+ sal_uInt16 nBulletsCount = 0;
+ sal_uInt16 nNumberingCount = 0;
+ for (sal_uInt16 nPara = nParaStart; nPara <= nParaEnd; nPara++)
+ {
+ if ( !pParaList->GetParagraph(nPara) )
+ {
+ break;
+ }
+ const SvxNumberFormat* pFmt = GetNumberFormat(nPara);
+ if (!pFmt)
+ {
+ // At least, exists one paragraph that has no Bullets/Numbering.
+ break;
+ }
+ else if ((pFmt->GetNumberingType() == SVX_NUM_BITMAP) || (pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL))
+ {
+ // Having Bullets in this paragraph.
+ nBulletsCount++;
+ }
+ else
+ {
+ // Having Numbering in this paragraph.
+ nNumberingCount++;
+ }
+ }
+
+ const sal_uInt16 nParaCount = nParaEnd - nParaStart + 1;
+ if ( nBulletsCount == nParaCount )
+ {
+ return 0;
+ }
+ else if ( nNumberingCount == nParaCount )
+ {
+ return 1;
+ }
+ return 2;
+}
+
+sal_Int16 Outliner::GetBulletsNumberingStatus() const
+{
+ return pParaList->GetParagraphCount() > 0
+ ? GetBulletsNumberingStatus( 0, pParaList->GetParagraphCount()-1 )
+ : 2;
}
OutlinerParaObject* Outliner::CreateParaObject( sal_uInt16 nStartPara, sal_uInt16 nCount ) const
@@ -1006,7 +1015,7 @@ void Outliner::PaintBullet( sal_uInt16 n
bDrawBullet = rBulletState.GetValue() ? true : false;
}
- if ( ImplHasBullet( nPara ) && bDrawBullet)
+ if ( ImplHasNumberFormat( nPara ) && bDrawBullet)
{
sal_Bool bVertical = IsVertical();
@@ -1507,7 +1516,7 @@ sal_Bool Outliner::HasChilds( Paragraph*
return pParaList->HasChilds( pParagraph );
}
-sal_Bool Outliner::ImplHasBullet( sal_uInt16 nPara ) const
+bool Outliner::ImplHasNumberFormat( sal_uInt16 nPara ) const
{
return GetNumberFormat(nPara) != 0;
}
@@ -1756,7 +1765,7 @@ EBulletInfo Outliner::GetBulletInfo( sal
EBulletInfo aInfo;
aInfo.nParagraph = nPara;
- aInfo.bVisible = ImplHasBullet( nPara );
+ aInfo.bVisible = ImplHasNumberFormat( nPara ) ? sal_True : sal_False;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0;
Modified: openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlvw.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlvw.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlvw.cxx (original)
+++ openoffice/branches/rejuvenate01/main/editeng/source/outliner/outlvw.cxx Fri May 31 13:55:58 2013
@@ -52,7 +52,7 @@
#include <svl/itemset.hxx>
#include <svl/eitem.hxx>
#include <editeng/editstat.hxx>
-
+#include <svl/itempool.hxx>
// Breite der Randzonen innerhalb derer beim D&D gescrollt wird
#define OL_SCROLL_LRBORDERWIDTHPIX 10
@@ -188,7 +188,7 @@ sal_Bool OutlinerView::PostKeyEvent( con
bKeyProcessed = sal_True;
}
else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) &&
- !bSelection && !aSel.nEndPos && pOwner->ImplHasBullet( aSel.nEndPara ) )
+ !bSelection && !aSel.nEndPos && pOwner->ImplHasNumberFormat( aSel.nEndPara ) )
{
Indent( aKeyCode.IsShift() ? (-1) : (+1) );
bKeyProcessed = sal_True;
@@ -1185,408 +1185,334 @@ sal_uInt16 OutlinerView::ImpCalcSelected
void OutlinerView::ToggleBullets()
{
- pOwner->UndoActionStart( OLUNDO_DEPTH );
+ pOwner->UndoActionStart( OLUNDO_DEPTH );
- ESelection aSel( pEditView->GetSelection() );
- aSel.Adjust();
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
- const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( sal_False );
+ const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
- sal_Int16 nDepth = -2;
+ sal_Int16 nNewDepth = -2;
+ const SvxNumRule* pDefaultBulletNumRule = 0;
- for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
- {
- Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
+ for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
- if( pPara )
- {
- if( nDepth == -2 )
- nDepth = (pOwner->GetDepth(nPara) == -1) ? 0 : -1;
+ if( pPara )
+ {
+ if( nNewDepth == -2 )
+ {
+ nNewDepth = (pOwner->GetDepth(nPara) == -1) ? 0 : -1;
+ if ( nNewDepth == 0 )
+ {
+ // determine default numbering rule for bullets
+ const ESelection aSelection(nPara, 0);
+ const SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection));
+ const SfxPoolItem& rPoolItem = aTmpSet.GetPool()->GetDefaultItem( EE_PARA_NUMBULLET );
+ const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(&rPoolItem);
+ pDefaultBulletNumRule = pNumBulletItem ? pNumBulletItem->GetNumRule() : 0;
+ }
+ }
- pOwner->SetDepth( pPara, nDepth );
+ pOwner->SetDepth( pPara, nNewDepth );
- if( nDepth == -1 )
+ if( nNewDepth == -1 )
{
- const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
- if(rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET)
+ const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
+ if ( rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET )
{
SfxItemSet aAttrs(rAttrs);
aAttrs.ClearItem( EE_PARA_BULLETSTATE );
pOwner->SetParaAttribs( nPara, aAttrs );
}
}
- }
- }
+ else
+ {
+ if ( pDefaultBulletNumRule )
+ {
+ const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat( nPara );
+ if ( !pFmt
+ || ( pFmt->GetNumberingType() != SVX_NUM_BITMAP
+ && pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) )
+ {
+ SfxItemSet aAttrs( pOwner->GetParaAttribs( nPara ) );
+ SvxNumRule aNewNumRule( *pDefaultBulletNumRule );
+ aAttrs.Put( SvxNumBulletItem( aNewNumRule ), EE_PARA_NUMBULLET );
+ pOwner->SetParaAttribs( nPara, aAttrs );
+ }
+ }
+ }
+ }
+ }
- // --> OD 2009-03-10 #i100014#
- // It is not a good idea to substract 1 from a count and cast the result
- // to sal_uInt16 without check, if the count is 0.
- sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
- // <--
+ const sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
- pOwner->pEditEngine->SetUpdateMode( bUpdate );
+ pOwner->pEditEngine->SetUpdateMode( bUpdate );
- pOwner->UndoActionEnd( OLUNDO_DEPTH );
+ pOwner->UndoActionEnd( OLUNDO_DEPTH );
}
-sal_Bool OutlinerView::ToggleBullets(sal_Bool bBulletOnOff, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule, sal_Bool bForceBulletOnOff)
-{
- pOwner->UndoActionStart( OLUNDO_DEPTH );
-
- ESelection aSel( pEditView->GetSelection() );
- aSel.Adjust();
-
- const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( sal_False );
-
- sal_Int16 nDepth = -2;
- sal_Bool bRet = sal_False;
-
- //Modified by xuezhiy for bullet enhancement
- bool bBulletOn = sal_True;
-
- if( bBulletOnOff )
- {
- bool bHasBullet = sal_False;
- for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
- {
- bHasBullet = pOwner->ImplHasBullet(nPara);
- if(bHasBullet)
- break;
- }
-
- if( bHasBullet )
- {
- bBulletOn = sal_False;
-
- for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
- {
- Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
-
- // const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
- if( pPara )
- {
- const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);
-
- if( !pFmt )
- {
- // Has no Bullet paragraph
- bBulletOn = sal_True;
- break;
- }
- else if( ( pFmt->GetNumberingType() == SVX_NUM_BITMAP ) || ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL ) )
- {
- // Normal ==>> Numbering
- if( !bNormalBullet )
- {
- bBulletOn = sal_True;
- break;
- }
- }
- else
- {
- // Numbering ==>> Normal
- if( bNormalBullet )
- {
- bBulletOn = sal_True;
- break;
- }
- }
- }
- }
- }
-
- }
- if (bForceBulletOnOff) {
- bBulletOn = bBulletOnOff;
- }
- for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
- {
- Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
-
- if( pPara )
- {
- bRet = sal_True;
- nDepth = pOwner->GetDepth(nPara);
-
- if( bBulletOn && nDepth == -1 )
- {
- // Off ==>> On
- nDepth = 0;
- }
- else if( !bBulletOn && nDepth == 0 )
- {
- // On ==>> Off
- nDepth = -1;
- }
- pOwner->SetDepth( pPara, nDepth );
-
- const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
-// bool bBulletState = ((const SfxBoolItem&) rAttrs.Get( EE_PARA_BULLETSTATE ) ).GetValue();
-
- SfxItemSet aAttrs(rAttrs);
- aAttrs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, bBulletOn ) );
-
- // Change bullet types
- if( bBulletOn && pNumRule)
- {
- bool bSetBulletType = false;
- if( !bBulletOnOff )
- {
- // Not bullet on/off button
- bSetBulletType = true;
- }
- else
- {
- const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);
-
- if( !pFmt )
- {
- // Has no bullet
- bSetBulletType = true;
- }
- else
- {
- sal_Int16 nNumType = pFmt->GetNumberingType();
- if( bNormalBullet && nNumType != SVX_NUM_BITMAP && nNumType != SVX_NUM_CHAR_SPECIAL )
- {
- // Set to Normal bullet, old bullet type is Numbering bullet
- bSetBulletType = true;
- }
- else if( !bNormalBullet && (nNumType == SVX_NUM_BITMAP || nNumType == SVX_NUM_CHAR_SPECIAL) )
- {
- // Set to Numbering bullet, old bullet type is Normal bullet
- bSetBulletType = true;
- }
- }
- }
+void OutlinerView::ToggleBulletsNumbering(
+ const bool bToggle,
+ const bool bHandleBullets,
+ const SvxNumRule* pNumRule )
+{
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
- // Get old bullet space
- SvxNumRule aNewRule( *pNumRule );
+ bool bToggleOn = true;
+ if ( bToggle )
+ {
+ bToggleOn = false;
+ const sal_Int16 nBulletNumberingStatus( pOwner->GetBulletsNumberingStatus( aSel.nStartPara, aSel.nEndPara ) );
+ if ( nBulletNumberingStatus != 0 && bHandleBullets )
+ {
+ // not all paragraphs have bullets and method called to toggle bullets --> bullets on
+ bToggleOn = true;
+ }
+ else if ( nBulletNumberingStatus != 1 && !bHandleBullets )
+ {
+ // not all paragraphs have numbering and method called to toggle numberings --> numberings on
+ bToggleOn = true;
+ }
+ }
+ if ( bToggleOn )
+ {
+ // apply bullets/numbering for selected paragraphs
+ ApplyBulletsNumbering( bHandleBullets, pNumRule, bToggle, true );
+ }
+ else
+ {
+ // switch off bullets/numbering for selected paragraphs
+ SwitchOffBulletsNumbering( true );
+ }
- const SfxPoolItem* pPoolItem=NULL;
- SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, sal_False, &pPoolItem);
- if (eState != SFX_ITEM_SET)
- {
- // Use default value when has not contain bullet item
- ESelection aSelection(nPara, 0);
- SfxItemSet aTmpSet( pOwner->pEditEngine->GetAttribs( aSelection ) );
- pPoolItem = aTmpSet.GetItem( EE_PARA_NUMBULLET );
- }
+ return;
+}
- const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >( pPoolItem );
- //const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) rAttrs.Get( EE_PARA_NUMBULLET );
- if( pNumBulletItem )
- {
- sal_uInt16 nLevelCnt = pNumBulletItem->GetNumRule()->GetLevelCount();
- nLevelCnt = Min( nLevelCnt, pNumRule->GetLevelCount() );
- for( sal_uInt16 nLevel = 0; nLevel < nLevelCnt; ++nLevel )
- {
- const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule()->Get( nLevel );
- const SvxNumberFormat* pNewFmt = pNumRule->Get( nLevel );
+void OutlinerView::EnableBullets()
+{
+ pOwner->UndoActionStart( OLUNDO_DEPTH );
- if( pOldFmt && pNewFmt && (pOldFmt->GetFirstLineOffset() != pNewFmt->GetFirstLineOffset()
- || pOldFmt->GetAbsLSpace() != pNewFmt->GetAbsLSpace() ) )
- {
- SvxNumberFormat* pNewFmtClone = new SvxNumberFormat( *pNewFmt );
- pNewFmtClone->SetFirstLineOffset( pOldFmt->GetFirstLineOffset() );
- pNewFmtClone->SetAbsLSpace( pOldFmt->GetAbsLSpace() );
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
- aNewRule.SetLevel( nLevel, pNewFmtClone );
- delete pNewFmtClone;
- }
- }
- }
+ const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
- // Don't set bullet attribute to paragraph in Master view
- // Because it will be set into style sheet
- if( bSetBulletType && !bMasterView )
- aAttrs.Put(SvxNumBulletItem( aNewRule ), EE_PARA_NUMBULLET);
- }
+ for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ DBG_ASSERT(pPara, "OutlinerView::EnableBullets(), illegal selection?");
- pOwner->SetParaAttribs( nPara, aAttrs );
-
- }
- }
+ if( pPara && (pOwner->GetDepth(nPara) == -1) )
+ {
+ pOwner->SetDepth( pPara, 0 );
+ }
+ }
- // --> OD 2009-03-10 #i100014#
- // It is not a good idea to substract 1 from a count and cast the result
- // to sal_uInt16 without check, if the count is 0.
sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
- // <--
pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
- pOwner->pEditEngine->SetUpdateMode( bUpdate );
-
- pOwner->UndoActionEnd( OLUNDO_DEPTH );
+ pOwner->pEditEngine->SetUpdateMode( bUpdate );
- return bRet;
+ pOwner->UndoActionEnd( OLUNDO_DEPTH );
}
-void OutlinerView::EnableBullets()
+
+void OutlinerView::ApplyBulletsNumbering(
+ const bool bHandleBullets,
+ const SvxNumRule* pNewNumRule,
+ const bool bCheckCurrentNumRuleBeforeApplyingNewNumRule,
+ const bool bAtSelection )
{
- pOwner->UndoActionStart( OLUNDO_DEPTH );
+ if (!pOwner || !pOwner->pEditEngine || !pOwner->pParaList)
+ {
+ return;
+ }
- ESelection aSel( pEditView->GetSelection() );
- aSel.Adjust();
+ pOwner->UndoActionStart(OLUNDO_DEPTH);
+ const sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode(sal_False);
+
+ sal_uInt16 nStartPara = 0;
+ sal_uInt16 nEndPara = 0;
+ if ( bAtSelection )
+ {
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
+ nStartPara = aSel.nStartPara;
+ nEndPara = aSel.nEndPara;
+ }
+ else
+ {
+ nStartPara = 0;
+ nEndPara = pOwner->pParaList->GetParagraphCount() - 1;
+ }
- const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( sal_False );
+ for (sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++)
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph(nPara);
+ DBG_ASSERT(pPara, "OutlinerView::ApplyBulletsNumbering(..), illegal selection?");
- for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
- {
- Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
+ if (pPara)
+ {
+ const sal_Int16 nDepth = pOwner->GetDepth(nPara);
+ if ( nDepth == -1 )
+ {
+ pOwner->SetDepth( pPara, 0 );
+ }
- if( pPara && (pOwner->GetDepth(nPara) == -1) )
- {
- pOwner->SetDepth( pPara, 0 );
- }
- }
+ const SfxItemSet& rAttrs = pOwner->GetParaAttribs(nPara);
+ SfxItemSet aAttrs(rAttrs);
+ aAttrs.Put(SfxBoolItem(EE_PARA_BULLETSTATE, true));
- // --> OD 2009-03-10 #i100014#
- // It is not a good idea to substract 1 from a count and cast the result
- // to sal_uInt16 without check, if the count is 0.
- sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
- // <--
- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
- pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
+ // apply new numbering rule
+ if ( pNewNumRule )
+ {
+ bool bApplyNumRule = false;
+ if ( !bCheckCurrentNumRuleBeforeApplyingNewNumRule )
+ {
+ bApplyNumRule = true;
+ }
+ else
+ {
+ const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);
+ if (!pFmt)
+ {
+ bApplyNumRule = true;
+ }
+ else
+ {
+ sal_Int16 nNumType = pFmt->GetNumberingType();
+ if ( bHandleBullets
+ && nNumType != SVX_NUM_BITMAP && nNumType != SVX_NUM_CHAR_SPECIAL)
+ {
+ // Set to Normal bullet, old bullet type is Numbering bullet.
+ bApplyNumRule = true;
+ }
+ else if ( !bHandleBullets
+ && (nNumType == SVX_NUM_BITMAP || nNumType == SVX_NUM_CHAR_SPECIAL))
+ {
+ // Set to Numbering bullet, old bullet type is Normal bullet.
+ bApplyNumRule = true;
+ }
+ }
+ }
- pOwner->pEditEngine->SetUpdateMode( bUpdate );
+ if ( bApplyNumRule )
+ {
+ SvxNumRule aNewRule(*pNewNumRule);
- pOwner->UndoActionEnd( OLUNDO_DEPTH );
-}
+ // Get old bullet space.
+ {
+ const SfxPoolItem* pPoolItem=NULL;
+ SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, sal_False, &pPoolItem);
+ if (eState != SFX_ITEM_SET)
+ {
+ // Use default value when has not contain bullet item.
+ ESelection aSelection(nPara, 0);
+ SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection));
+ pPoolItem = aTmpSet.GetItem(EE_PARA_NUMBULLET);
+ }
+
+ const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(pPoolItem);
+ if (pNumBulletItem)
+ {
+ const sal_uInt16 nLevelCnt = Min(pNumBulletItem->GetNumRule()->GetLevelCount(), aNewRule.GetLevelCount());
+ for ( sal_uInt16 nLevel = 0; nLevel < nLevelCnt; ++nLevel )
+ {
+ const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule()->Get(nLevel);
+ const SvxNumberFormat* pNewFmt = aNewRule.Get(nLevel);
+ if (pOldFmt && pNewFmt && (pOldFmt->GetFirstLineOffset() != pNewFmt->GetFirstLineOffset() || pOldFmt->GetAbsLSpace() != pNewFmt->GetAbsLSpace()))
+ {
+ SvxNumberFormat* pNewFmtClone = new SvxNumberFormat(*pNewFmt);
+ pNewFmtClone->SetFirstLineOffset(pOldFmt->GetFirstLineOffset());
+ pNewFmtClone->SetAbsLSpace(pOldFmt->GetAbsLSpace());
+ aNewRule.SetLevel(nLevel, pNewFmtClone);
+ delete pNewFmtClone;
+ }
+ }
+ }
+ }
-sal_Bool OutlinerView::ToggleAllParagraphsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bToggleOn, sal_Bool bMasterView, SvxNumRule* pNumRule)
-{
- if (!pOwner || !pOwner->pEditEngine || !pOwner->pParaList)
- {
- return sal_False;
- }
+ aAttrs.Put(SvxNumBulletItem(aNewRule), EE_PARA_NUMBULLET);
+ }
+ }
+ pOwner->SetParaAttribs(nPara, aAttrs);
+ }
+ }
- sal_Bool bReturn = sal_False;
- pOwner->UndoActionStart(OLUNDO_DEPTH);
- const sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode(sal_False);
+ const sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
+ pOwner->ImplCheckParagraphs( nStartPara, nParaCount );
+ pOwner->pEditEngine->QuickMarkInvalid( ESelection( nStartPara, 0, nParaCount, 0 ) );
- sal_Int16 nDepth = -2;
- sal_uInt16 nParaCount = (sal_uInt16)(pOwner->pParaList->GetParagraphCount());
- for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
- {
- Paragraph* pPara = pOwner->pParaList->GetParagraph(nPara);
- DBG_ASSERT(pPara, "OutlinerView::ToggleAllParagraphsBullets(), illegal selection?");
+ pOwner->pEditEngine->SetUpdateMode( bUpdate );
- if (pPara)
- {
- bReturn = sal_True;
- nDepth = pOwner->GetDepth(nPara);
- if (bToggleOn && nDepth == -1)
- {
- // Off ==>> On
- nDepth = 0;
- }
- else if (!bToggleOn && nDepth == 0)
- {
- // On ==>> Off
- nDepth = -1;
- }
- pOwner->SetDepth(pPara, nDepth);
+ pOwner->UndoActionEnd( OLUNDO_DEPTH );
- const SfxItemSet& rAttrs = pOwner->GetParaAttribs(nPara);
- SfxItemSet aAttrs(rAttrs);
- aAttrs.Put(SfxBoolItem(EE_PARA_BULLETSTATE, bToggleOn));
+ return;
+}
- // Change bullet types.
- if (bToggleOn && pNumRule)
- {
- sal_Bool bSetBulletType = sal_False;
- if (!bBulletOnOffMode)
- {
- // Not bullet on/off button.
- bSetBulletType = sal_True;
- }
- else
- {
- const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);
- if (!pFmt)
- {
- // Has no bullet.
- bSetBulletType = sal_True;
- }
- else
- {
- sal_Int16 nNumType = pFmt->GetNumberingType();
- if (bNormalBullet && nNumType != SVX_NUM_BITMAP && nNumType != SVX_NUM_CHAR_SPECIAL)
- {
- // Set to Normal bullet, old bullet type is Numbering bullet.
- bSetBulletType = sal_True;
- }
- else if (!bNormalBullet && (nNumType == SVX_NUM_BITMAP || nNumType == SVX_NUM_CHAR_SPECIAL))
- {
- // Set to Numbering bullet, old bullet type is Normal bullet.
- bSetBulletType = sal_True;
- }
- }
- }
- // Get old bullet space.
- SvxNumRule aNewRule(*pNumRule);
- const SfxPoolItem* pPoolItem=NULL;
- SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, sal_False, &pPoolItem);
- ESelection aSelection(nPara, 0);
- SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection));
- if (eState != SFX_ITEM_SET)
- {
- // Use default value when has not contain bullet item.
- pPoolItem = aTmpSet.GetItem(EE_PARA_NUMBULLET);
- }
+void OutlinerView::SwitchOffBulletsNumbering(
+ const bool bAtSelection )
+{
+ sal_uInt16 nStartPara = 0;
+ sal_uInt16 nEndPara = 0;
+ if ( bAtSelection )
+ {
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
+ nStartPara = aSel.nStartPara;
+ nEndPara = aSel.nEndPara;
+ }
+ else
+ {
+ nStartPara = 0;
+ nEndPara = pOwner->pParaList->GetParagraphCount() - 1;
+ }
- const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(pPoolItem);
- if (pNumBulletItem)
- {
- sal_uInt16 nLevelCnt = pNumBulletItem->GetNumRule()->GetLevelCount();
- nLevelCnt = Min(nLevelCnt, pNumRule->GetLevelCount());
+ pOwner->UndoActionStart( OLUNDO_DEPTH );
+ const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
- for (sal_uInt16 nLevel = 0; nLevel < nLevelCnt; nLevel++)
- {
- const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule()->Get(nLevel);
- const SvxNumberFormat* pNewFmt = pNumRule->Get(nLevel);
- if (pOldFmt && pNewFmt && (pOldFmt->GetFirstLineOffset() != pNewFmt->GetFirstLineOffset() || pOldFmt->GetAbsLSpace() != pNewFmt->GetAbsLSpace()))
- {
- SvxNumberFormat* pNewFmtClone = new SvxNumberFormat(*pNewFmt);
- pNewFmtClone->SetFirstLineOffset(pOldFmt->GetFirstLineOffset());
- pNewFmtClone->SetAbsLSpace(pOldFmt->GetAbsLSpace());
- aNewRule.SetLevel(nLevel, pNewFmtClone);
- delete pNewFmtClone;
- }
- }
- }
+ for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; ++nPara )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ DBG_ASSERT(pPara, "OutlinerView::SwitchOffBulletsNumbering(...), illegal paragraph index?");
- // Don't set bullet attribute to paragraph in Master view, because it will be set into style sheet.
- if (bSetBulletType && !bMasterView)
- aAttrs.Put(SvxNumBulletItem(aNewRule), EE_PARA_NUMBULLET);
- }
- pOwner->SetParaAttribs(nPara, aAttrs);
- }
- }
+ if( pPara )
+ {
+ pOwner->SetDepth( pPara, -1 );
- pOwner->ImplCheckParagraphs(0, nParaCount);
- pOwner->pEditEngine->QuickMarkInvalid(ESelection(0, 0, nParaCount, 0));
- pOwner->pEditEngine->SetUpdateMode(bUpdate);
- pOwner->UndoActionEnd(OLUNDO_DEPTH);
+ const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
+ if (rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET)
+ {
+ SfxItemSet aAttrs(rAttrs);
+ aAttrs.ClearItem( EE_PARA_BULLETSTATE );
+ pOwner->SetParaAttribs( nPara, aAttrs );
+ }
+ }
+ }
+
+ const sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
+ pOwner->ImplCheckParagraphs( nStartPara, nParaCount );
+ pOwner->pEditEngine->QuickMarkInvalid( ESelection( nStartPara, 0, nParaCount, 0 ) );
- return bReturn;
+ pOwner->pEditEngine->SetUpdateMode( bUpdate );
+ pOwner->UndoActionEnd( OLUNDO_DEPTH );
}
+
void OutlinerView::RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs )
{
RemoveAttribs( bRemoveParaAttribs, 0, sal_True /*keep language attribs*/ );
Modified: openoffice/branches/rejuvenate01/main/editeng/source/uno/unoipset.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/editeng/source/uno/unoipset.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/editeng/source/uno/unoipset.cxx (original)
+++ openoffice/branches/rejuvenate01/main/editeng/source/uno/unoipset.cxx Fri May 31 13:55:58 2013
@@ -27,8 +27,6 @@
#include <svl/eitem.hxx>
#include <tools/list.hxx>
-#include <hash_map>
-#include <vector>
#include <svl/itemprop.hxx>
#include <editeng/unoipset.hxx>
Modified: openoffice/branches/rejuvenate01/main/extensions.lst
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/extensions.lst?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/extensions.lst (original)
+++ openoffice/branches/rejuvenate01/main/extensions.lst Fri May 31 13:55:58 2013
@@ -117,7 +117,7 @@
# Swedish.
[ language=sv ]
- 249b3bd3d9de4928ab8c809623dc9c4f http://sourceforge.net/projects/aoo-extensions/files/5959/0/dict-sv.oxt/download "dict-sv.oxt"
+ 32ab4edf1496a7cf5469ee1643eb0128 http://sourceforge.net/projects/aoo-extensions/files/5959/1/dict-sv.oxt/download "dict-sv.oxt"
# Korean.
[ language=ko ]
Modified: openoffice/branches/rejuvenate01/main/extensions/source/preload/preload.src
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/extensions/source/preload/preload.src?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/extensions/source/preload/preload.src (original)
+++ openoffice/branches/rejuvenate01/main/extensions/source/preload/preload.src Fri May 31 13:55:58 2013
@@ -86,8 +86,8 @@ TabPage RID_TP_WELCOME
Text [ en-US ] = "Welcome to %PRODUCTNAME %PRODUCTVERSION OEM\n\nTo start the %PRODUCTNAME %PRODUCTVERSION OEM, "
"please enter your personal data in the dialog following the license text. Important information is contained "
"in the readme files which are located in the %PRODUCTNAME product directory. Please read these files carefully. "
- "You can also find detailed information at the Oracle website \n\n"
- "http://www.oracle.com/us/products/applications/open-office.";
+ "You can also find detailed information at the OpenOffice website \n\n"
+ "http://www.openoffice.org.";
};
};
Modified: openoffice/branches/rejuvenate01/main/external_deps.lst
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/external_deps.lst?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/external_deps.lst (original)
+++ openoffice/branches/rejuvenate01/main/external_deps.lst Fri May 31 13:55:58 2013
@@ -168,20 +168,20 @@ if ( true )
URL1 = http://archive.apache.org/dist/apr/$(name)
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( true )
+if ( USE_SYSTEM_STL != YES )
MD5 = c441926f3a552ed3e5b274b62e86af16
name = STLport-4.0.tar.gz
# This seems to be the original host, but the MD5 sum does not match.
# URL1 = http://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.0.tar.gz/download
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( true )
+if ( USE_SYSTEM_STL != YES )
MD5 = 18f577b374d60b3c760a3a3350407632
name = STLport-4.5.tar.gz
URL1 = http://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.5.tar.gz/download
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( true )
+if ( USE_SYSTEM_STL != YES )
MD5 = 7376930b0d3f3d77a685d94c4a3acda8
name = STLport-4.5-0119.tar.gz
URL1 = $(OOO_EXTRAS)$(MD5)-$(name)
Modified: openoffice/branches/rejuvenate01/main/extras/source/palettes/standard.soc
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/extras/source/palettes/standard.soc?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/extras/source/palettes/standard.soc (original)
+++ openoffice/branches/rejuvenate01/main/extras/source/palettes/standard.soc Fri May 31 13:55:58 2013
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
- <!-- #121520# use Symphony palette as base, it is organized as groups of twelve entries -->
+ <!-- use Symphony palette as base, it is organized as groups of twelve entries -->
+ <!-- Gray palette from white to black -->
<draw:color draw:name="White" draw:color="#ffffff"/>
<draw:color draw:name="Gray 1" draw:color="#eeeeee"/>
<draw:color draw:name="Gray 2" draw:color="#dddddd"/>
@@ -13,6 +14,8 @@
<draw:color draw:name="Gray 9" draw:color="#1c1c1c"/>
<draw:color draw:name="Gray 10" draw:color="#111111"/>
<draw:color draw:name="Black" draw:color="#000000"/>
+
+ <!-- Base colors step 0 -->
<draw:color draw:name="Yellow" draw:color="#ffff99"/>
<draw:color draw:name="Orange" draw:color="#ff6600"/>
<draw:color draw:name="Red" draw:color="#ff3333"/>
@@ -20,11 +23,13 @@
<draw:color draw:name="Magenta" draw:color="#ff33ff"/>
<draw:color draw:name="Purple" draw:color="#9900ff"/>
<draw:color draw:name="Blue" draw:color="#6666ff"/>
- <draw:color draw:name="Sky Blue" draw:color="#00ccff"/>
+ <draw:color draw:name="Sky blue" draw:color="#00ccff"/>
<draw:color draw:name="Cyan" draw:color="#66ffff"/>
<draw:color draw:name="Turquoise" draw:color="#33ff99"/>
<draw:color draw:name="Green" draw:color="#99ff66"/>
- <draw:color draw:name="Yellow Green" draw:color="#ccff00"/>
+ <draw:color draw:name="Yellow green" draw:color="#ccff00"/>
+
+ <!-- Base colors step 1 -->
<draw:color draw:name="Yellow 1" draw:color="#ffff66"/>
<draw:color draw:name="Orange 1" draw:color="#ffcc00"/>
<draw:color draw:name="Red 1" draw:color="#ff9999"/>
@@ -32,11 +37,13 @@
<draw:color draw:name="Magenta 1" draw:color="#ff99ff"/>
<draw:color draw:name="Purple 1" draw:color="#cc66ff"/>
<draw:color draw:name="Blue 1" draw:color="#9999ff"/>
- <draw:color draw:name="Sky Blue 1" draw:color="#9999ff"/>
+ <draw:color draw:name="Sky blue 1" draw:color="#9999ff"/>
<draw:color draw:name="Cyan 1" draw:color="#99ffff"/>
<draw:color draw:name="Turquoise 1" draw:color="#66ff99"/>
<draw:color draw:name="Green 1" draw:color="#99ff99"/>
- <draw:color draw:name="Yellow Green 1" draw:color="#ccff66"/>
+ <draw:color draw:name="Yellow green 1" draw:color="#ccff66"/>
+
+ <!-- Base colors step 2 -->
<draw:color draw:name="Yellow 2" draw:color="#ffff00"/>
<draw:color draw:name="Orange 2" draw:color="#ff9900"/>
<draw:color draw:name="Red 2" draw:color="#ff6666"/>
@@ -44,11 +51,13 @@
<draw:color draw:name="Magenta 2" draw:color="#ff66ff"/>
<draw:color draw:name="Purple 2" draw:color="#9933ff"/>
<draw:color draw:name="Blue 2" draw:color="#3333ff"/>
- <draw:color draw:name="Sky Blue 2" draw:color="#3399ff"/>
+ <draw:color draw:name="Sky blue 2" draw:color="#3399ff"/>
<draw:color draw:name="Cyan 2" draw:color="#00ffff"/>
<draw:color draw:name="Turquoise 2" draw:color="#00ff66"/>
<draw:color draw:name="Green 2" draw:color="#66ff66"/>
- <draw:color draw:name="Yellow Green 2" draw:color="#99ff33"/>
+ <draw:color draw:name="Yellow green 2" draw:color="#99ff33"/>
+
+ <!-- Base colors step 3 -->
<draw:color draw:name="Yellow 3" draw:color="#cc9900"/>
<draw:color draw:name="Orange 3" draw:color="#ff3300"/>
<draw:color draw:name="Red 3" draw:color="#ff0000"/>
@@ -56,11 +65,13 @@
<draw:color draw:name="Magenta 3" draw:color="#ff00ff"/>
<draw:color draw:name="Purple 3" draw:color="#6600ff"/>
<draw:color draw:name="Blue 3" draw:color="#0000ff"/>
- <draw:color draw:name="Sky Blue 3" draw:color="#0066ff"/>
+ <draw:color draw:name="Sky blue 3" draw:color="#0066ff"/>
<draw:color draw:name="Cyan 3" draw:color="#00cccc"/>
<draw:color draw:name="Turquoise 3" draw:color="#00cc33"/>
<draw:color draw:name="Green 3" draw:color="#00cc00"/>
- <draw:color draw:name="Yellow Green 3" draw:color="#66ff00"/>
+ <draw:color draw:name="Yellow green 3" draw:color="#66ff00"/>
+
+ <!-- Base colors step 4 -->
<draw:color draw:name="Yellow 4" draw:color="#996600"/>
<draw:color draw:name="Orange 4" draw:color="#cc3300"/>
<draw:color draw:name="Red 4" draw:color="#cc0000"/>
@@ -68,11 +79,13 @@
<draw:color draw:name="Magenta 4" draw:color="#cc00cc"/>
<draw:color draw:name="Purple 4" draw:color="#6600cc"/>
<draw:color draw:name="Blue 4" draw:color="#0000cc"/>
- <draw:color draw:name="Sky Blue 4" draw:color="#0066cc"/>
+ <draw:color draw:name="Sky blue 4" draw:color="#0066cc"/>
<draw:color draw:name="Cyan 4" draw:color="#009999"/>
<draw:color draw:name="Turquoise 4" draw:color="#009933"/>
<draw:color draw:name="Green 4" draw:color="#009900"/>
- <draw:color draw:name="Yellow Green 4" draw:color="#66cc00"/>
+ <draw:color draw:name="Yellow green 4" draw:color="#66cc00"/>
+
+ <!-- Base colors step 5 -->
<draw:color draw:name="Yellow 5" draw:color="#663300"/>
<draw:color draw:name="Orange 5" draw:color="#801900"/>
<draw:color draw:name="Red 5" draw:color="#990000"/>
@@ -80,11 +93,13 @@
<draw:color draw:name="Magenta 5" draw:color="#990099"/>
<draw:color draw:name="Purple 5" draw:color="#330099"/>
<draw:color draw:name="Blue 5" draw:color="#000099"/>
- <draw:color draw:name="Sky Blue 5" draw:color="#006699"/>
+ <draw:color draw:name="Sky blue 5" draw:color="#006699"/>
<draw:color draw:name="Cyan 5" draw:color="#006666"/>
<draw:color draw:name="Turquoise 5" draw:color="#007826"/>
<draw:color draw:name="Green 5" draw:color="#006600"/>
- <draw:color draw:name="Yellow Green 5" draw:color="#669900"/>
+ <draw:color draw:name="Yellow green 5" draw:color="#669900"/>
+
+ <!-- Base colors step 6 -->
<draw:color draw:name="Yellow 6" draw:color="#333300"/>
<draw:color draw:name="Orange 6" draw:color="#461900"/>
<draw:color draw:name="Red 6" draw:color="#330000"/>
@@ -92,11 +107,13 @@
<draw:color draw:name="Magenta 6" draw:color="#660066"/>
<draw:color draw:name="Purple 6" draw:color="#000033"/>
<draw:color draw:name="Blue 6" draw:color="#000066"/>
- <draw:color draw:name="Sky Blue 6" draw:color="#000080"/>
+ <draw:color draw:name="Sky blue 6" draw:color="#000080"/>
<draw:color draw:name="Cyan 6" draw:color="#003333"/>
<draw:color draw:name="Turquoise 6" draw:color="#00331a"/>
<draw:color draw:name="Green 6" draw:color="#003300"/>
- <draw:color draw:name="Yellow Green 6" draw:color="#193300"/>
+ <draw:color draw:name="Yellow green 6" draw:color="#193300"/>
+
+ <!-- Base colors step 7 -->
<draw:color draw:name="Yellow 7" draw:color="#666633"/>
<draw:color draw:name="Orange 7" draw:color="#661900"/>
<draw:color draw:name="Red 7" draw:color="#663333"/>
@@ -104,11 +121,13 @@
<draw:color draw:name="Magenta 7" draw:color="#663366"/>
<draw:color draw:name="Purple 7" draw:color="#330066"/>
<draw:color draw:name="Blue 7" draw:color="#333366"/>
- <draw:color draw:name="Sky Blue 7" draw:color="#003366"/>
+ <draw:color draw:name="Sky blue 7" draw:color="#003366"/>
<draw:color draw:name="Cyan 7" draw:color="#336666"/>
<draw:color draw:name="Turquoise 7" draw:color="#006633"/>
<draw:color draw:name="Green 7" draw:color="#336633"/>
- <draw:color draw:name="Yellow Green 7" draw:color="#336600"/>
+ <draw:color draw:name="Yellow green 7" draw:color="#336600"/>
+
+ <!-- Base colors step 8 -->
<draw:color draw:name="Yellow 8" draw:color="#999966"/>
<draw:color draw:name="Orange 8" draw:color="#996633"/>
<draw:color draw:name="Red 8" draw:color="#996666"/>
@@ -116,23 +135,27 @@
<draw:color draw:name="Magenta 8" draw:color="#996699"/>
<draw:color draw:name="Purple 8" draw:color="#663399"/>
<draw:color draw:name="Blue 8" draw:color="#666699"/>
- <draw:color draw:name="Sky Blue 8" draw:color="#336699"/>
+ <draw:color draw:name="Sky blue 8" draw:color="#336699"/>
<draw:color draw:name="Cyan 8" draw:color="#669999"/>
<draw:color draw:name="Turquoise 8" draw:color="#339966"/>
<draw:color draw:name="Green 8" draw:color="#669966"/>
- <draw:color draw:name="Yellow Green 8" draw:color="#669933"/>
+ <draw:color draw:name="Yellow green 8" draw:color="#669933"/>
<draw:color draw:name="Yellow 9" draw:color="#cccc99"/>
+
+ <!-- Base colors step 9 -->
<draw:color draw:name="Orange 9" draw:color="#cc9966"/>
<draw:color draw:name="Red 9" draw:color="#cc9999"/>
<draw:color draw:name="Pink 9" draw:color="#cc6699"/>
<draw:color draw:name="Magenta 9" draw:color="#cc99cc"/>
<draw:color draw:name="Purple 9" draw:color="#9966cc"/>
<draw:color draw:name="Blue 9" draw:color="#9999cc"/>
- <draw:color draw:name="Sky Blue 9" draw:color="#6699cc"/>
+ <draw:color draw:name="Sky blue 9" draw:color="#6699cc"/>
<draw:color draw:name="Cyan 9" draw:color="#99cccc"/>
<draw:color draw:name="Turquoise 9" draw:color="#66cc99"/>
<draw:color draw:name="Green 9" draw:color="#99cc99"/>
- <draw:color draw:name="Yellow Green 9" draw:color="#99cc66"/>
+ <draw:color draw:name="Yellow green 9" draw:color="#99cc66"/>
+
+ <!-- Base colors step 10 -->
<draw:color draw:name="Yellow 10" draw:color="#ffffcc"/>
<draw:color draw:name="Orange 10" draw:color="#ffcc99"/>
<draw:color draw:name="Red 10" draw:color="#ffcccc"/>
@@ -140,17 +163,17 @@
<draw:color draw:name="Magenta 10" draw:color="#ffccff"/>
<draw:color draw:name="Purple 10" draw:color="#cc99ff"/>
<draw:color draw:name="Blue 10" draw:color="#ccccff"/>
- <draw:color draw:name="Sky Blue 10" draw:color="#99ccff"/>
+ <draw:color draw:name="Sky blue 10" draw:color="#99ccff"/>
<draw:color draw:name="Cyan 10" draw:color="#ccffff"/>
<draw:color draw:name="Turquoise 10" draw:color="#99ffcc"/>
<draw:color draw:name="Green 10" draw:color="#ccffcc"/>
- <draw:color draw:name="Yellow Green 10" draw:color="#ccff99"/>
+ <draw:color draw:name="Yellow green 10" draw:color="#ccff99"/>
- <!-- #121520# use some 'nice' colors from original palette -->
+ <!-- use some 'nice' colors from original palette -->
<draw:color draw:name="Blue gray" draw:color="#e6e6ff"/>
- <draw:color draw:name="Blue nine" draw:color="#CFE7F5"/>
+ <draw:color draw:name="Blue classic" draw:color="#CFE7F5"/>
- <!-- #121520# add 'pale' colors from original palette -->
+ <!-- add 'pale' colors from original palette -->
<draw:color draw:name="Violet" draw:color="#9999ff"/>
<draw:color draw:name="Bordeaux" draw:color="#993366"/>
<draw:color draw:name="Pale yellow" draw:color="#ffffcc"/>
@@ -159,7 +182,7 @@
<draw:color draw:name="Salmon" draw:color="#ff8080"/>
<draw:color draw:name="Sea blue" draw:color="#0066cc"/>
- <!-- #121520# add Chart colors from original palette -->
+ <!-- add Chart colors from original palette (also 12, coincidence?) -->
<draw:color draw:name="Chart 1" draw:color="#004586"/>
<draw:color draw:name="Chart 2" draw:color="#ff420e"/>
<draw:color draw:name="Chart 3" draw:color="#ffd320"/>
Modified: openoffice/branches/rejuvenate01/main/forms/source/component/ImageControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/forms/source/component/ImageControl.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/forms/source/component/ImageControl.cxx (original)
+++ openoffice/branches/rejuvenate01/main/forms/source/component/ImageControl.cxx Fri May 31 13:55:58 2013
@@ -925,7 +925,7 @@ void OImageControlControl::mousePressed(
if ( impl_isEmptyGraphics_nothrow() )
xMenu->enableItem( ID_CLEAR_GRAPHICS, sal_False );
- awt::Point aPos( e.X, e.Y );
+ awt::Rectangle aRect( e.X, e.Y, 0, 0 );
if ( ( e.X < 0 ) || ( e.Y < 0 ) )
{ // context menu triggered by keyboard
// position it in the center of the control
@@ -935,12 +935,12 @@ void OImageControlControl::mousePressed(
if ( xWindow.is() )
{
awt::Rectangle aPosSize = xWindow->getPosSize();
- aPos.X = aPosSize.Width / 2;
- aPos.Y = aPosSize.Height / 2;
+ aRect.X = aPosSize.Width / 2;
+ aRect.Y = aPosSize.Height / 2;
}
}
- const sal_Int16 nResult = xMenu->execute( xWindowPeer, aPos, PopupMenuDirection::EXECUTE_DEFAULT );
+ const sal_Int16 nResult = xMenu->execute( xWindowPeer, aRect, PopupMenuDirection::EXECUTE_DEFAULT );
switch ( nResult )
{
Modified: openoffice/branches/rejuvenate01/main/framework/Library_fwi.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/Library_fwi.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/Library_fwi.mk (original)
+++ openoffice/branches/rejuvenate01/main/framework/Library_fwi.mk Fri May 31 13:55:58 2013
@@ -49,7 +49,7 @@ $(eval $(call gb_Library_add_linked_libs
stl \
svl \
svt \
- tk \
+ ootk \
tl \
utl \
vcl \
Modified: openoffice/branches/rejuvenate01/main/framework/Library_fwk.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/Library_fwk.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/Library_fwk.mk (original)
+++ openoffice/branches/rejuvenate01/main/framework/Library_fwk.mk Fri May 31 13:55:58 2013
@@ -49,7 +49,7 @@ $(eval $(call gb_Library_add_linked_libs
stl \
svl \
svt \
- tk \
+ ootk \
tl \
ucbhelper \
utl \
@@ -112,11 +112,11 @@ $(eval $(call gb_Library_add_exception_o
framework/source/loadenv/loadenv \
framework/source/loadenv/targethelper \
framework/source/register/registerservices \
+ framework/source/services/ContextChangeEventMultiplexer \
framework/source/services/autorecovery \
framework/source/services/backingcomp \
framework/source/services/backingwindow \
framework/source/services/desktop \
- framework/source/services/ContextChangeEventMultiplexer \
framework/source/services/frame \
framework/source/services/modelwinservice \
framework/source/services/modulemanager \
@@ -154,6 +154,7 @@ $(eval $(call gb_Library_add_exception_o
framework/source/uielement/menubarmerger \
framework/source/uielement/menubarwrapper \
framework/source/uielement/objectmenucontroller \
+ framework/source/uielement/popuptoolbarcontroller \
framework/source/uielement/panelwindow \
framework/source/uielement/panelwrapper \
framework/source/uielement/progressbarwrapper \
@@ -175,8 +176,8 @@ $(eval $(call gb_Library_add_exception_o
framework/source/uifactory/factoryconfiguration \
framework/source/uifactory/menubarfactory \
framework/source/uifactory/statusbarfactory \
- framework/source/uifactory/uicontrollerfactory \
framework/source/uifactory/toolboxfactory \
+ framework/source/uifactory/uicontrollerfactory \
framework/source/uifactory/uielementfactorymanager \
framework/source/uifactory/windowcontentfactorymanager \
framework/source/xml/acceleratorconfigurationreader \
Modified: openoffice/branches/rejuvenate01/main/framework/Library_fwl.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/Library_fwl.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/Library_fwl.mk (original)
+++ openoffice/branches/rejuvenate01/main/framework/Library_fwl.mk Fri May 31 13:55:58 2013
@@ -46,7 +46,7 @@ $(eval $(call gb_Library_add_linked_libs
stl \
svl \
svt \
- tk \
+ ootk \
tl \
utl \
vcl \
@@ -73,7 +73,6 @@ $(eval $(call gb_Library_add_exception_o
framework/source/uielement/langselectionmenucontroller \
framework/source/uielement/macrosmenucontroller \
framework/source/uielement/newmenucontroller \
- framework/source/uielement/popupmenucontroller \
framework/source/uielement/toolbarsmenucontroller \
))
Modified: openoffice/branches/rejuvenate01/main/framework/Library_fwm.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/Library_fwm.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/Library_fwm.mk (original)
+++ openoffice/branches/rejuvenate01/main/framework/Library_fwm.mk Fri May 31 13:55:58 2013
@@ -44,7 +44,7 @@ $(eval $(call gb_Library_add_linked_libs
stl \
svl \
svt \
- tk \
+ ootk \
tl \
utl \
vcl \
Modified: openoffice/branches/rejuvenate01/main/framework/inc/uielement/statusbarmanager.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/inc/uielement/statusbarmanager.hxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/inc/uielement/statusbarmanager.hxx (original)
+++ openoffice/branches/rejuvenate01/main/framework/inc/uielement/statusbarmanager.hxx Fri May 31 13:55:58 2013
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,38 +7,28 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
#ifndef __FRAMEWORK_UIELEMENT_STATUSBARMANAGER_HXX_
#define __FRAMEWORK_UIELEMENT_STATUSBARMANAGER_HXX_
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <stdtypes.h>
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XStatusbarController.hpp>
#include <com/sun/star/frame/XUIControllerFactory.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
@@ -46,9 +36,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -118,7 +105,7 @@ class StatusBarManager : public ::com::s
void MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL ::com::sun::star::frame::XStatusbarController::*_pMethod )(const ::com::sun::star::awt::MouseEvent&));
protected:
- typedef std::map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > StatusBarControllerMap;
+ typedef std::map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusbarController > > StatusBarControllerMap;
sal_Bool m_bDisposed : 1,
m_bFrameActionRegistered : 1,
Modified: openoffice/branches/rejuvenate01/main/framework/source/register/registerservices.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/source/register/registerservices.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/source/register/registerservices.cxx (original)
+++ openoffice/branches/rejuvenate01/main/framework/source/register/registerservices.cxx Fri May 31 13:55:58 2013
@@ -85,6 +85,7 @@
#include <services/substitutepathvars.hxx>
#include <services/pathsettings.hxx>
#include <services/ContextChangeEventMultiplexer.hxx>
+#include <uielement/popuptoolbarcontroller.hxx>
COMPONENTGETIMPLEMENTATIONENVIRONMENT
@@ -127,6 +128,9 @@ COMPONENTGETFACTORY ( IFFACTORY( ::frame
IFFACTORY( ::framework::TabWindowService ) else
IFFACTORY( ::framework::SubstitutePathVariables ) else
IFFACTORY( ::framework::PathSettings ) else
- IFFACTORY( ::framework::ContextChangeEventMultiplexer )
+ IFFACTORY( ::framework::ContextChangeEventMultiplexer ) else
+ IFFACTORY( ::framework::OpenToolbarController ) else
+ IFFACTORY( ::framework::NewToolbarController ) else
+ IFFACTORY( ::framework::WizardsToolbarController )
)
Modified: openoffice/branches/rejuvenate01/main/framework/source/register/registertemp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/framework/source/register/registertemp.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/framework/source/register/registertemp.cxx (original)
+++ openoffice/branches/rejuvenate01/main/framework/source/register/registertemp.cxx Fri May 31 13:55:58 2013
@@ -66,7 +66,6 @@
#include <uielement/macrosmenucontroller.hxx>
#include <uielement/newmenucontroller.hxx>
#include <uielement/toolbarsmenucontroller.hxx>
-#include <uielement/popupmenucontroller.hxx>
COMPONENTGETIMPLEMENTATIONENVIRONMENT
@@ -87,6 +86,5 @@ COMPONENTGETFACTORY ( IFFACTORY( ::frame
IFFACTORY( ::framework::FooterMenuController ) else
IFFACTORY( ::framework::HeaderMenuController ) else
IFFACTORY( ::framework::LanguageSelectionMenuController ) else
- IFFACTORY( ::framework::Oxt_Handler ) else
- IFFACTORY( ::framework::PopupMenuController )
+ IFFACTORY( ::framework::Oxt_Handler )
)