[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 16 commits - bridges/prj bridges/source cppu/source extensions.lst officecfg/registry sc/source sfx2/inc sfx2/Package_inc.mk sfx2/source svx/inc svx/source sw/source vcl/inc vcl/source
Andrea Pescetti
pescetti at apache.org
Tue Apr 30 16:47:10 PDT 2013
bridges/prj/build.lst | 1
bridges/source/cpp_uno/cxx_macosx_x86-64/cpp2uno.cxx | 2
bridges/source/cpp_uno/cxx_macosx_x86-64/except.cxx | 2
bridges/source/cpp_uno/cxx_macosx_x86-64/share.hxx | 2
bridges/source/cpp_uno/cxx_macosx_x86-64/uno2cpp.cxx | 11
bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx | 7
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 7
cppu/source/uno/data.cxx | 2
extensions.lst | 4
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 2
officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs | 1
sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 2
sc/source/ui/sidebar/AlignmentPropertyPanel.src | 2
sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx | 2
sc/source/ui/sidebar/CellAppearancePropertyPanel.src | 2
sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 2
sc/source/ui/sidebar/NumberFormatPropertyPanel.src | 2
sfx2/Package_inc.mk | 2
sfx2/inc/sfx2/sidebar/EnumContext.hxx | 1
sfx2/source/control/ctrlitem.cxx | 5
sfx2/source/sidebar/EnumContext.cxx | 1
sfx2/source/sidebar/ResourceManager.cxx | 1
sfx2/source/sidebar/SidebarChildWindow.cxx | 2
svx/inc/svx/svdmodel.hxx | 12
svx/inc/svx/xtable.hxx | 47 --
svx/source/dialog/dlgctrl.cxx | 20 -
svx/source/gallery2/galctrl.cxx | 27 +
svx/source/sidebar/area/AreaPropertyPanel.cxx | 2
svx/source/sidebar/area/AreaPropertyPanel.src | 2
svx/source/sidebar/area/AreaTransparencyGradientControl.cxx | 2
svx/source/sidebar/graphic/GraphicPropertyPanel.cxx | 63 ++-
svx/source/sidebar/graphic/GraphicPropertyPanel.hrc | 41 --
svx/source/sidebar/graphic/GraphicPropertyPanel.src | 82 +---
svx/source/sidebar/line/LinePropertyPanel.cxx | 2
svx/source/sidebar/line/LinePropertyPanel.src | 2
svx/source/sidebar/line/LineWidthControl.cxx | 2
svx/source/sidebar/paragraph/ParaBulletsControl.cxx | 2
svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 2
svx/source/sidebar/paragraph/ParaNumberingControl.cxx | 2
svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 2
svx/source/sidebar/paragraph/ParaPropertyPanel.src | 2
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 3
svx/source/sidebar/possize/PosSizePropertyPanel.src | 2
svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 2
svx/source/sidebar/text/TextPropertyPanel.cxx | 31 -
svx/source/sidebar/text/TextPropertyPanel.hxx | 13
svx/source/sidebar/text/TextPropertyPanel.src | 2
svx/source/sidebar/text/TextUnderlineControl.cxx | 50 --
svx/source/svdraw/svdmodel.cxx | 14
svx/source/tbxctrls/fontworkgallery.cxx | 22 -
svx/source/xoutdev/xtabbtmp.cxx | 2
svx/source/xoutdev/xtabcolr.cxx | 13
svx/source/xoutdev/xtabdash.cxx | 188 ++++------
svx/source/xoutdev/xtabgrdt.cxx | 164 +++++---
svx/source/xoutdev/xtabhtch.cxx | 160 ++++----
svx/source/xoutdev/xtable.cxx | 74 ---
svx/source/xoutdev/xtablend.cxx | 155 +++-----
sw/source/ui/shells/drwtxtex.cxx | 1
sw/source/ui/shells/drwtxtsh.cxx | 13
sw/source/ui/sidebar/PagePropertyPanel.src | 2
sw/source/ui/sidebar/WrapPropertyPanel.src | 2
vcl/inc/vcl/outdev.hxx | 4
vcl/inc/vcl/settings.hxx | 6
vcl/source/app/settings.cxx | 5
vcl/source/gdi/outmap.cxx | 81 +---
65 files changed, 618 insertions(+), 770 deletions(-)
New commits:
commit f42ce34b26c988821c5c3a51a2ba552c685c94ca
Author: Andrea Pescetti <pescetti at apache.org>
Date: Tue Apr 30 20:21:35 2013 +0000
Update Scottish Gaelic dictionary.
diff --git a/extensions.lst b/extensions.lst
index 8f12d17..905169d 100644
--- a/extensions.lst
+++ b/extensions.lst
@@ -96,7 +96,7 @@
# Scottish Gaelic.
[ language=gd ]
- d645b36c5d4fc52c18ac180453b48b5c http://sourceforge.net/projects/aoo-extensions/files/4587/7/hunspell-gd-2.5.oxt/download "hunspell-gd-2.5.oxt"
+ 867d5509958a867fec1096b445fe4cec http://sourceforge.net/projects/aoo-extensions/files/4587/8/hunspell-gd-2.6.oxt/download "hunspell-gd-2.6.oxt"
# Basque.
[ language=eu ]
commit 0960b68d35a17b9ec8113d98bfcff9df23d694a2
Author: Andrea Pescetti <pescetti at apache.org>
Date: Tue Apr 30 20:03:08 2013 +0000
Update Norwegian dictionary.
diff --git a/extensions.lst b/extensions.lst
index a62f4f3..8f12d17 100644
--- a/extensions.lst
+++ b/extensions.lst
@@ -113,7 +113,7 @@
# Norwegian.
[ language=nb ]
- 18bbb57caee07d276ef21a0e88859664 http://sourceforge.net/projects/aoo-extensions/files/5955/0/dict-no-ooo330.oxt/download "dict-no-ooo330.oxt"
+ e6ca009bc6aa3d70d8b7d66138b1c28d http://sourceforge.net/projects/aoo-extensions/files/1216/6/dictionary-no-NO-2.1.oxt/download "dictionary-no-NO-2.1.oxt"
# Swedish.
[ language=sv ]
commit bb8dd56dd91fb1b3b9f2033ed339fdd4ac4ee19a
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Apr 30 14:02:37 2013 +0000
fix BINTEST_VERIFYSIZE for non-debug builds
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index b9a78dc..d23f61e 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -368,10 +368,8 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData(
#define BINTEST_VERIFYOFFSET( s, m, n ) \
if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %" SAL_PRI_SIZET "u instead of expected %d!!!\n", OFFSET_OF(s, m), static_cast<int>(n) ); abort(); }
-#if OSL_DEBUG_LEVEL > 1
#define BINTEST_VERIFYSIZE( s, n ) \
if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", (int)sizeof(s), n ); abort(); }
-#endif
struct C1
{
commit 8a10735b8ee3926a592d6919f4dbb823771bed9f
Author: Armin Le Grand <alg at apache.org>
Date: Tue Apr 30 13:26:29 2013 +0000
corrected unwanted change
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 540b7d1..8161fc6 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -905,7 +905,7 @@ public:
void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
- void Fdrawrect;
+ void SetLineColor();
void SetLineColor( const Color& rColor );
const Color& GetLineColor() const { return maLineColor; }
sal_Bool IsLineColor() const { return mbLineColor; }
commit a1111d73afe974a9d466a2b1678bfe5ddb5e7f34
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Tue Apr 30 13:04:43 2013 +0000
122182: TextPropertyPanel:
- add missing <break> in handling click to character attribute controls
- remove superfluous code and comments
- adapt code formatting
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 5353864..b91ff5d 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -82,10 +82,8 @@ namespace svx { namespace sidebar {
#define TEXT_SECTIONPAGE_HEIGHT_S SECTIONPAGE_MARGIN_VERTICAL_TOP + CBOX_HEIGHT + ( TOOLBOX_ITEM_HEIGHT + 2 ) + CONTROL_SPACING_VERTICAL * 1 + SECTIONPAGE_MARGIN_VERTICAL_BOT
#define TEXT_SECTIONPAGE_HEIGHT SECTIONPAGE_MARGIN_VERTICAL_TOP + CBOX_HEIGHT + ( TOOLBOX_ITEM_HEIGHT + 2 ) * 2 + CONTROL_SPACING_VERTICAL * 2 + SECTIONPAGE_MARGIN_VERTICAL_BOT
-//
-//end
-PopupControl* TextPropertyPanel::CreateCharacterSpacingControl (PopupContainer* pParent)
+ PopupControl* TextPropertyPanel::CreateCharacterSpacingControl (PopupContainer* pParent)
{
return new TextCharacterSpacingControl(pParent, *this, mpBindings);
}
@@ -404,7 +402,6 @@ void TextPropertyPanel::Initialize (void)
mbColorAvailable = true;
maBackColor = COL_AUTO;
mbBackColorAvailable = true;
- meColorType = FONT_COLOR;
meEscape = SVX_ESCAPEMENT_OFF;
mbSuper = false;
mbSub = false;
@@ -424,17 +421,12 @@ void TextPropertyPanel::Initialize (void)
//set handler
mpFontNameBox->SetBindings(mpBindings);
- //add
Link aLink = LINK(this, TextPropertyPanel, FontSelHdl);
mpFontNameBox->SetSelectHdl(aLink);
- //add end
-
aLink = LINK(this, TextPropertyPanel, FontSizeModifyHdl);
maFontSizeBox.SetModifyHdl(aLink);
- //add
aLink = LINK(this, TextPropertyPanel, FontSizeSelHdl);
maFontSizeBox.SetSelectHdl(aLink);
- //add end
aLink = LINK(this, TextPropertyPanel, FontSizeLoseFocus);
maFontSizeBox.SetLoseFocusHdl(aLink);
@@ -572,7 +564,7 @@ IMPL_LINK( TextPropertyPanel, FontSelHdl, FontNameBox*, pBox )
}
return 0;
}
-//add end
+
IMPL_LINK( TextPropertyPanel, FontSizeModifyHdl, FontSizeBox*, pSizeBox )
{
if (pSizeBox == &maFontSizeBox)
@@ -589,7 +581,7 @@ IMPL_LINK( TextPropertyPanel, FontSizeModifyHdl, FontSizeBox*, pSizeBox )
}
return 0;
}
-//add
+
IMPL_LINK( TextPropertyPanel, FontSizeSelHdl, FontSizeBox*, pSizeBox )
{
if ( !pSizeBox->IsTravelSelect() )
@@ -605,7 +597,7 @@ IMPL_LINK( TextPropertyPanel, FontSizeSelHdl, FontSizeBox*, pSizeBox )
return 0;
}
-//add end
+
IMPL_LINK(TextPropertyPanel, FontSizeLoseFocus, FontSizeBox*, pSizeBox)
{
if(pSizeBox == &maFontSizeBox)
@@ -662,6 +654,7 @@ IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_UNDERLINE, SFX_CALLMODE_RECORD, &aLineItem, 0L);
}
UpdateItem(SID_ATTR_CHAR_UNDERLINE);
+ break;
}
case TBI_STRIKEOUT:
{
@@ -820,8 +813,6 @@ IMPL_LINK(TextPropertyPanel, ToolBoxFontColorDropHdl,ToolBox*, pToolBox)
const sal_uInt16 nId = pToolBox->GetCurItemId();
if(nId == TBI_FONTCOLOR)
{
- meColorType = FONT_COLOR;
-
pToolBox->SetItemDown( nId, true );
maFontColorPopup.Show(*pToolBox);
@@ -903,8 +894,6 @@ IMPL_LINK(TextPropertyPanel, ToolBoxHighlightDropHdl, ToolBox*, pToolBox)
const sal_uInt16 nId = pToolBox->GetCurItemId();
if(nId == TBI_HIGHLIGHT)
{
- meColorType = BACK_COLOR;
-
pToolBox->SetItemDown( nId, true );
maBrushColorPopup.Show(*pToolBox);
maBrushColorPopup.SetCurrentColor(maBackColor, mbBackColorAvailable);
@@ -932,14 +921,6 @@ IMPL_LINK(TextPropertyPanel, SpacingClickHdl, ToolBox*, pToolBox)
-IMPL_LINK( TextPropertyPanel, ImplPopupModeEndHdl, FloatingWindow*, EMPTYARG )
-{
- return 0;
-}
-
-
-
-
void TextPropertyPanel::NotifyItemUpdate (
const sal_uInt16 nSID,
const SfxItemState eState,
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index b659c83..f476449 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -32,7 +32,6 @@
#include <editeng/svxenum.hxx>
#include <editeng/fhgtitem.hxx>
-//#include <com/sun/star/ui/XUIElement.hpp>
#include <com/sun/star/ui/XSidebar.hpp>
#include <boost/scoped_ptr.hpp>
@@ -74,18 +73,10 @@ public:
void SetDefaultUnderline(FontUnderline eUnderline);
- enum ColorType
- {
- FONT_COLOR = 1,
- BACK_COLOR = 2
- };
-
virtual void HandleContextChange (
const ::sfx2::sidebar::EnumContext aContext);
- // ControllerItem::ItemUpdateReceiverInterface
-
virtual void NotifyItemUpdate(
const sal_uInt16 nSId,
const SfxItemState eState,
@@ -133,7 +124,7 @@ private:
FontWeight meWeight;
FontItalic meItalic;
FontUnderline meUnderline;
- Color meUnderlineColor; //
+ Color meUnderlineColor;
bool mbShadow;
FontStrikeout meStrike;
bool mbWeightAvailable;
@@ -142,7 +133,6 @@ private:
bool mbColorAvailable;
Color maBackColor;
bool mbBackColorAvailable;
- ColorType meColorType;
SvxEscapement meEscape; //for sw
bool mbSuper;
bool mbSub;
@@ -194,7 +184,6 @@ private:
DECL_LINK(FontSizeLoseFocus, FontSizeBox *);
DECL_LINK(ToolboxFontSelectHandler, ToolBox *);
DECL_LINK(ToolboxIncDecSelectHdl, ToolBox *);
- DECL_LINK(ImplPopupModeEndHdl, FloatingWindow* );
DECL_LINK(ToolBoxSwScriptSelectHdl, ToolBox *);
DECL_LINK(ToolBoxScriptSelectHdl, ToolBox *);
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index c11a384..ac1f66d 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -85,14 +85,6 @@ TextUnderlineControl::TextUnderlineControl (
void TextUnderlineControl::initial()
{
- /*maPBOptions.SetDefBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
- GetSettings().GetStyleSettings().GetMenuColor():
- sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_DropDownBackground ));//Color(244,245,249)//for high contract
- maPBOptions.SetHoverBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
- GetSettings().GetStyleSettings().GetMenuColor():
- sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );//Color( 93, 120, 163 )
- maPBOptions.SetHoverTxtColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_PanelTitleFont ) );//Color( 255, 255, 255 )
- maPBOptions.SetIcoPosX( 2);*/
maVSUnderline.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
@@ -160,74 +152,66 @@ void TextUnderlineControl::Rearrange(FontUnderline eLine)
maVSUnderline.SetItemImage(8, GetDisplayBackground().GetColor().IsDark()? maIMGDashDotH : maIMGDashDot);
maVSUnderline.SetItemImage(9, GetDisplayBackground().GetColor().IsDark()? maIMGDashDotDotH : maIMGDashDotDot);
maVSUnderline.SetItemImage(10, GetDisplayBackground().GetColor().IsDark()? maIMGWaveH : maIMGWave);
-// maVSUnderline.SelectItem(0); //delete
-// maVSUnderline.SetNoSelection();
switch(eLine)
{
case UNDERLINE_SINGLE:
maVSUnderline.SetItemImage(1, maIMGSingleSel);
- maVSUnderline.SelectItem(1); //add
+ maVSUnderline.SelectItem(1);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_DOUBLE:
maVSUnderline.SetItemImage(2, maIMGDoubleSel);
- maVSUnderline.SelectItem(2); //add
+ maVSUnderline.SelectItem(2);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_BOLD:
maVSUnderline.SetItemImage(3, maIMGBoldSel);
- maVSUnderline.SelectItem(3); //add
+ maVSUnderline.SelectItem(3);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_DOTTED:
maVSUnderline.SetItemImage(4, maIMGDotSel);
- maVSUnderline.SelectItem(4); //add
+ maVSUnderline.SelectItem(4);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_BOLDDOTTED:
maVSUnderline.SetItemImage(5, maIMGDotBoldSel);
- maVSUnderline.SelectItem(5); //add
+ maVSUnderline.SelectItem(5);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_DASH:
maVSUnderline.SetItemImage(6, maIMGDashSel);
- maVSUnderline.SelectItem(6); //add
+ maVSUnderline.SelectItem(6);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_LONGDASH:
maVSUnderline.SetItemImage(7, maIMGDashLongSel);
- maVSUnderline.SelectItem(7); //add
+ maVSUnderline.SelectItem(7);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_DASHDOT:
maVSUnderline.SetItemImage(8, maIMGDashDotSel);
- maVSUnderline.SelectItem(8); //add
+ maVSUnderline.SelectItem(8);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_DASHDOTDOT:
maVSUnderline.SetItemImage(9, maIMGDashDotDotSel);
- maVSUnderline.SelectItem(9); //add
+ maVSUnderline.SelectItem(9);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_WAVE:
maVSUnderline.SetItemImage(10, maIMGWaveSel);
- maVSUnderline.SelectItem(10); //add
+ maVSUnderline.SelectItem(10);
maVSUnderline.GrabFocus();
break;
case UNDERLINE_NONE:
default:
maVSUnderline.SelectItem(1);
- maVSUnderline.SetNoSelection();//add
+ maVSUnderline.SetNoSelection();
maPBOptions.GrabFocus();
}
maVSUnderline.StartSelection();
- //removed
- //if(mpPage->meContextType == PROPERTY_CONTEXT_SC_CELL)
- // maPBOptions.Disable();
- //else
- // maPBOptions.Enable();
- //removed end
}
ValueSet& TextUnderlineControl::GetValueSet()
{
@@ -244,20 +228,12 @@ IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
FontUnderline eUnderline = (FontUnderline)(sal_uInt64)maVSUnderline.GetItemData( iPos );
- //<<modified
- //SvxTextLineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
- //modify end>>
- //<<add , this line of code will keep the new underline use pre-color
aLineItem.SetColor(mrTextPropertyPanel.GetUnderlineColor());
- //add end>>
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_UNDERLINE, SFX_CALLMODE_RECORD, &aLineItem, 0L);
- //add , for the popup page not update immediately
mrTextPropertyPanel.SetUnderline(eUnderline);
- //add end
- //mrTextPropertyPanel.SetDefaultUnderline(eUnderline);
mrTextPropertyPanel.EndUnderlinePopupMode();
}
@@ -273,9 +249,7 @@ IMPL_LINK(TextUnderlineControl, PBClickHdl, PushButton *, pPBtn)
SfxDispatcher* pDisp = mpBindings->GetDispatcher();
pDisp->Execute( SID_CHAR_DLG_EFFECT, SFX_CALLMODE_ASYNCHRON );
}
- //add
mrTextPropertyPanel.EndUnderlinePopupMode();
- //add end
}
return 0;
}
commit e952d1401c1adc41934118ba7f542611ef9da11b
Author: Andre Fischer <af at apache.org>
Date: Tue Apr 30 11:58:33 2013 +0000
122194: Adapted license text in propertypanel.hrc, then renamed it to ResourceDefinitions.hrc
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 167a631..4b0c9a0 100755
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -21,7 +21,7 @@
#include "precompiled_sc.hxx"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <AlignmentPropertyPanel.hxx>
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.src b/sc/source/ui/sidebar/AlignmentPropertyPanel.src
index 520cc08..9fd0779 100755
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.src
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "AlignmentPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "sc.hrc"
#include "helpids.h"
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 5e781d4..64b45b7 100755
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -21,7 +21,7 @@
#include "precompiled_sc.hxx"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <CellAppearancePropertyPanel.hxx>
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.src b/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
index a6ae7eb..536d00a 100755
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "CellAppearancePropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "sc.hrc"
#include "helpids.h"
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 80fac5f..77aedc4 100755
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -21,7 +21,7 @@
#include "precompiled_sc.hxx"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <NumberFormatPropertyPanel.hxx>
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src b/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
index c0bae51..8efbbe6 100755
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "NumberFormatPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "sc.hrc"
#include "helpids.h"
diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk
index 1d8c541..8b2ebf4 100644
--- a/sfx2/Package_inc.mk
+++ b/sfx2/Package_inc.mk
@@ -134,7 +134,7 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/SidebarChildWindow.hxx,sfx2/sidebar/SidebarChildWindow.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/SidebarPanelBase.hxx,sfx2/sidebar/SidebarPanelBase.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/ControllerItem.hxx,sfx2/sidebar/ControllerItem.hxx))
-$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/propertypanel.hrc,sfx2/sidebar/propertypanel.hrc))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/ResourceDefinitions.hrc,sfx2/sidebar/ResourceDefinitions.hrc))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/EnumContext.hxx,sfx2/sidebar/EnumContext.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/ControlFactory.hxx,sfx2/sidebar/ControlFactory.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sidebar/Theme.hxx,sfx2/sidebar/Theme.hxx))
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index 774031d..484a53a 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -27,7 +27,7 @@
#include "sfx2/sfxsids.hrc"
#include "helpid.hrc"
#include "sfx2/dockwin.hxx"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
namespace sfx2 { namespace sidebar {
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 9d95c4c..072c6ff 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -22,7 +22,7 @@
#include "svx/sidebar/PopupContainer.hxx"
#include "AreaTransparencyGradientControl.hxx"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <AreaPropertyPanel.hxx>
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.src b/svx/source/sidebar/area/AreaPropertyPanel.src
index a75c44a..7801d24 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.src
+++ b/svx/source/sidebar/area/AreaPropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "AreaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include "helpid.hrc"
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
index 6523e56..9d398bb 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
@@ -26,7 +26,7 @@
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <svx/xflftrit.hxx>
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index b672cbb..fc91398 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -19,7 +19,7 @@
*
*************************************************************/
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <GraphicPropertyPanel.hxx>
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.src b/svx/source/sidebar/graphic/GraphicPropertyPanel.src
index 3751319..fa97c6b 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.src
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "GraphicPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include "helpid.hrc"
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 7ca121e..75c7166 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -19,7 +19,7 @@
*
*************************************************************/
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <LinePropertyPanel.hxx>
diff --git a/svx/source/sidebar/line/LinePropertyPanel.src b/svx/source/sidebar/line/LinePropertyPanel.src
index 6d52cb2..5cfbbe6 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.src
+++ b/svx/source/sidebar/line/LinePropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "LinePropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include "helpid.hrc"
diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
index 01b1bbb..77e582b 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -25,7 +25,7 @@
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
#include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaBulletsControl.cxx b/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
index b1e0c20..52d6b8d 100755
--- a/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
@@ -22,7 +22,7 @@
#include "precompiled_svx.hxx"
#include "ParaBulletsControl.hxx"
#include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 8aa6328..ca64451 100755
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -22,7 +22,7 @@
#include "precompiled_svx.hxx"
#include "ParaLineSpacingControl.hxx"
#include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaNumberingControl.cxx b/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
index 7fe4d42..46c8080 100755
--- a/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
@@ -22,7 +22,7 @@
#include "precompiled_svx.hxx"
#include "ParaNumberingControl.hxx"
#include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 601cfce..876e6af 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -32,7 +32,7 @@
#include "ParaNumberingPopup.hxx"
#include "ParaNumberingControl.hxx"
#include <sfx2/sidebar/Theme.hxx>
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <svx/sidebar/PopupContainer.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src b/svx/source/sidebar/paragraph/ParaPropertyPanel.src
index 9d60c6e..d14ee47 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "helpid.hrc"
#define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 5358ada..d6bd770 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -19,7 +19,7 @@
*
*************************************************************/
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include "PosSizePropertyPanel.hxx"
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.src b/svx/source/sidebar/possize/PosSizePropertyPanel.src
index ad3b948..cf931c4 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.src
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "PosSizePropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include "helpid.hrc"
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index 14e83f2..153ae7b 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -22,7 +22,7 @@
#include "precompiled_svx.hxx"
#include "TextCharacterSpacingControl.hxx"
#include "TextPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 65c4fd5..5353864 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -42,7 +42,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <sfx2/sidebar/Theme.hxx>
#include "sfx2/imagemgr.hxx"
diff --git a/svx/source/sidebar/text/TextPropertyPanel.src b/svx/source/sidebar/text/TextPropertyPanel.src
index 3886bb0..06324cb 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.src
+++ b/svx/source/sidebar/text/TextPropertyPanel.src
@@ -20,7 +20,7 @@
*************************************************************/
#include "TextPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "helpid.hrc"
#define CONTROL_HEIGHT_FONT_NAME 250
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index e77f135..c11a384 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -22,7 +22,7 @@
#include "precompiled_svx.hxx"
#include "TextUnderlineControl.hxx"
#include "TextPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <unotools/viewoptions.hxx>
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.src b/sw/source/ui/sidebar/PagePropertyPanel.src
index c9e3ade..d09c4d2 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.src
+++ b/sw/source/ui/sidebar/PagePropertyPanel.src
@@ -19,7 +19,7 @@
*
*************************************************************/
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "PropertyPanel.hrc"
#include "PagePropertyPanel.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.src b/sw/source/ui/sidebar/WrapPropertyPanel.src
index ceb4157..e93ea75 100644
--- a/sw/source/ui/sidebar/WrapPropertyPanel.src
+++ b/sw/source/ui/sidebar/WrapPropertyPanel.src
@@ -19,7 +19,7 @@
*
*************************************************************/
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "PropertyPanel.hrc"
#include "WrapPropertyPanel.hrc"
#include "helpid.h"
commit 254359b9ed96152091b8f7a74a3442cf6c553e04
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Apr 30 11:57:36 2013 +0000
adapt the optimization fix to UNO bridge's callVirtualMethod() for FreeBSD and Linux
adapted from the the fix to OSX 64bit's UNO bridge (in r1477588):
if the pCallStack variable is optimized out then any assumptions of the
method's inlined assembler about stack layout collapse. Adding a pseudo
dependency to the pCallStack variable solves that problem.
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
index aab7433..8aa9e32 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
@@ -98,11 +98,12 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
pMethod = *((sal_uInt64 *)pMethod);
// Load parameters to stack, if necessary
+ sal_uInt64* pCallStack = NULL;
if ( nStack )
{
// 16-bytes aligned
sal_uInt32 nStackBytes = ( ( nStack + 1 ) >> 1 ) * 16;
- sal_uInt64 *pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes );
+ pCallStack = (sal_uInt64*) __builtin_alloca( nStackBytes );
memcpy( pCallStack, pStack, nStackBytes );
}
@@ -113,7 +114,6 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
double xmm1;
asm volatile (
-
// Fill the xmm registers
"movq %2, %%rax\n\t"
@@ -148,7 +148,8 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
"movsd %%xmm1, %7\n\t"
:
: "m" ( pMethod ), "m" ( pGPR ), "m" ( pFPR ), "m" ( nFPR ),
- "m" ( rax ), "m" ( rdx ), "m" ( xmm0 ), "m" ( xmm1 )
+ "m" ( rax ), "m" ( rdx ), "m" ( xmm0 ), "m" ( xmm1 ),
+ "m" (pCallStack) // dummy input to prevent the compiler from optimizing the alloca out
: "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11"
);
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index 35d5203..a989119 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -98,11 +98,12 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
pMethod = *((sal_uInt64 *)pMethod);
// Load parameters to stack, if necessary
+ sal_uInt64* pCallStack = NULL;
if ( nStack )
{
// 16-bytes aligned
sal_uInt32 nStackBytes = ( ( nStack + 1 ) >> 1 ) * 16;
- sal_uInt64 *pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes );
+ pCallStack = (sal_uInt64*) __builtin_alloca( nStackBytes );
memcpy( pCallStack, pStack, nStackBytes );
}
@@ -113,7 +114,6 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
double xmm1;
asm volatile (
-
// Fill the xmm registers
"movq %2, %%rax\n\t"
@@ -148,7 +148,8 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
"movsd %%xmm1, %7\n\t"
:
: "m" ( pMethod ), "m" ( pGPR ), "m" ( pFPR ), "m" ( nFPR ),
- "m" ( rax ), "m" ( rdx ), "m" ( xmm0 ), "m" ( xmm1 )
+ "m" ( rax ), "m" ( rdx ), "m" ( xmm0 ), "m" ( xmm1 ),
+ "m" (pCallStack) // dummy input to prevent the compiler from optimizing the alloca out
: "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11",
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
);
commit 2ff25b11b2c9e187f3ed26daeba3b5619289ecc1
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Tue Apr 30 11:55:34 2013 +0000
<SwDrawTextShell> - remove self-destructing call to <SwView::AttrChangedNotify(..)>
- remove superfluous slot invalidation
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index c6795a7..2af0dfa 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -707,7 +707,6 @@ ASK_ADJUST:
}
else
rSet.InvalidateItem(nSlotId);
- Invalidate(SID_ATTR_PARA_ULSPACE);
nSlotId = 0;
}
break;
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 2552472be..5cecb03 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -169,18 +169,6 @@ __EXPORT SwDrawTextShell::~SwDrawTextShell()
{
if ( GetView().GetCurShell() == this )
rView.ResetSubShell();
-
- //MA 13. Nov. 96: Das kommt durchaus vor #33141#:
- //(doppel-)Klick von einem Texteditmode in ein anderes Objekt, zwischendurch
- //wird eine andere (Draw-)Shell gepusht, die alte aber noch nicht deletet.
- //Dann wird vor dem Flush wieder ein DrawTextShell gepusht und der Mode ist
- //eingeschaltet. In diesem Moment wird der Dispatcher geflusht und die alte
- //DrawTextShell zerstoert.
-// ASSERT( !pSdrView->IsTextEdit(), "TextEdit in DTor DrwTxtSh?" );
-// if (pSdrView->IsTextEdit())
-// GetShell().EndTextEdit(); // Danebengeklickt, Ende mit Edit
-
-// GetShell().Edit();
}
SwWrtShell& SwDrawTextShell::GetShell()
@@ -544,7 +532,6 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SwView& rTempView = rSh.GetView();
rTempView.ExitDraw();
rSh.Edit();
- rTempView.AttrChangedNotify(&rSh);
return;
}
break;
commit d465ec90c0626857a9c30523daba63d7b713f9e6
Author: Andre Fischer <af at apache.org>
Date: Tue Apr 30 11:52:08 2013 +0000
122131: Fixed typo in command name for cell appearance 'more' dialog.
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index de78e85..33109ed 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -740,7 +740,7 @@
<value>PropertyDeck</value>
</prop>
<prop oor:name="DefaultMenuCommand">
- <value>.uno:FormatCellDialg</value>
+ <value>.uno:FormatCellDialog</value>
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
commit 0c353433ad94786a937fa9da01d6e7382e3da942
Author: Armin Le Grand <alg at apache.org>
Date: Tue Apr 30 11:43:40 2013 +0000
i122120 Changed all UI preview creators to no longer need SdrModel/SdrObject
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 06fb0c0..3394c8d 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -217,7 +217,7 @@ protected:
sal_uInt16 nStreamNumberFormat;
sal_uInt16 nDefaultTabulator;
sal_uInt32 nMaxUndoCount;
- FASTBOOL mbAutomaticXPropertyListCreation;
+ FASTBOOL bSaveNative;
sal_Bool bStarDrawPreviewMode;
@@ -488,6 +488,13 @@ public:
FASTBOOL IsSaveCompressed() const { return bSaveCompressed; }
void SetSaveCompressed(FASTBOOL bJa=sal_True) { bSaveCompressed=bJa; }
+ // Schaltet man dieses Flag auf sal_True, so werden
+ // Grafikobjekte mit gesetztem Native-Link
+ // native gespeichert.
+ // Default=FALSE. Flag ist nicht persistent.
+ FASTBOOL IsSaveNative() const { return bSaveNative; }
+ void SetSaveNative(FASTBOOL bJa=sal_True) { bSaveNative=bJa; }
+
// Schaltet man dieses Flag auf sal_True, so werden die Grafiken
// von Grafikobjekten:
// - beim Laden eines Dokuments nicht sofort mitgeladen,
@@ -718,9 +725,6 @@ public:
This returns false if undo was disabled using EnableUndo( false ) and
also during the runtime of the Undo() and Redo() methods. */
bool IsUndoEnabled() const;
-
- void SetAutomaticXPropertyListCreation(bool bNew) { mbAutomaticXPropertyListCreation = bNew; }
- bool IsAutomaticXPropertyListCreation() const { return mbAutomaticXPropertyListCreation; }
};
typedef tools::WeakReference< SdrModel > SdrModelWeakRef;
diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx
index 24bc59b..ba71c22 100644
--- a/svx/inc/svx/xtable.hxx
+++ b/svx/inc/svx/xtable.hxx
@@ -23,25 +23,13 @@
#define _XTABLE_HXX
// include ---------------------------------------------------------------
-
#include <svx/xpoly.hxx>
#include <svx/xdash.hxx>
#include <svx/xhatch.hxx>
#include <svx/xgrad.hxx>
-#include <svx/xflasit.hxx>
-#include <svx/xlnasit.hxx>
-#include <tools/color.hxx>
-#include <tools/string.hxx>
-#include <svx/svxdllapi.h>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <svtools/grfmgr.hxx>
#include <svx/XPropertyEntry.hxx>
-
-class Color;
-class Bitmap;
-class VirtualDevice;
-class SdrModel;
-class SdrObject;
+#include <vcl/bitmap.hxx>
// Standard-Vergleichsstring
extern sal_Unicode __FAR_DATA pszStandard[]; // "standard"
@@ -180,34 +168,11 @@ public:
};
//////////////////////////////////////////////////////////////////////////////
-// helper class for UI visualization previews
-
-class sharedModelAndVDev
-{
-private:
- sal_uInt32 mnUseCount;
- VirtualDevice* mpVirtualDevice;
- SdrModel* mpSdrModel;
-
-public:
- sharedModelAndVDev();
- ~sharedModelAndVDev();
-
- void increaseUseCount();
- bool decreaseUseCount();
-
- SdrModel& getSharedSdrModel();
- VirtualDevice& getSharedVirtualDevice();
-};
-
-//////////////////////////////////////////////////////////////////////////////
// class XPropertyList
class SVX_DLLPUBLIC XPropertyList
{
protected:
- static sharedModelAndVDev* pGlobalsharedModelAndVDev;
-
String maName; // nicht persistent !
String maPath;
@@ -316,9 +281,6 @@ private:
friend class XPropertyListFactory;
XLineEndList(const String& rPath );
- SdrObject* mpBackgroundObject;
- SdrObject* mpLineObject;
-
protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
@@ -345,8 +307,6 @@ private:
friend class XPropertyListFactory;
XDashList(const String& rPath );
- SdrObject* mpBackgroundObject;
- SdrObject* mpLineObject;
Bitmap maBitmapSolidLine;
String maStringSolidLine;
String maStringNoLine;
@@ -388,9 +348,6 @@ private:
friend class XPropertyListFactory;
XHatchList(const String& rPath );
- SdrObject* mpBackgroundObject;
- SdrObject* mpHatchObject;
-
protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
@@ -417,8 +374,6 @@ private:
friend class XPropertyListFactory;
XGradientList(const String& rPath );
- SdrObject* mpBackgroundObject;
-
protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 2b36249..5615476 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1396,12 +1396,22 @@ namespace
if(rBitmapEx.IsTransparent())
{
- const Point aNull(0, 0);
- static const sal_uInt32 nLen(8);
- static const Color aW(COL_WHITE);
- static const Color aG(0xef, 0xef, 0xef);
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- aVirtualDevice.DrawCheckered(aNull, rSize, nLen, aW, aG);
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
+ {
+ const Point aNull(0, 0);
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
+
+ aVirtualDevice.DrawCheckered(aNull, rSize, nLen, aW, aG);
+ }
+ else
+ {
+ aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
+ aVirtualDevice.Erase();
+ }
}
if(rBitmapEx.GetSizePixel().Width() >= rSize.Width() && rBitmapEx.GetSizePixel().Height() >= rSize.Height())
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index ecb5432..67de645 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -300,14 +300,25 @@ void GalleryPreview::PreviewMedia( const INetURLObject& rURL )
// ------------------------------------------------------------------------
-void drawCheckered(OutputDevice& rOut, const Point& rPos, const Size& rSize)
+void drawTransparenceBackground(OutputDevice& rOut, const Point& rPos, const Size& rSize)
{
- // draw checkered background
- static const sal_uInt32 nLen(8);
- static const Color aW(COL_WHITE);
- static const Color aG(0xef, 0xef, 0xef);
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- rOut.DrawCheckered(rPos, rSize, nLen, aW, aG);
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
+ {
+ // draw checkered background
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
+
+ rOut.DrawCheckered(rPos, rSize, nLen, aW, aG);
+ }
+ else
+ {
+ rOut.SetLineColor();
+ rOut.SetFillColor(rStyleSettings.GetFieldColor());
+ rOut.DrawRect(Rectangle(rPos, rSize));
+ }
}
// -------------------
@@ -435,7 +446,7 @@ void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt )
if(bTransparent)
{
// draw checkered background
- drawCheckered(*pDev, aPos, aSize);
+ drawTransparenceBackground(*pDev, aPos, aSize);
}
aGraphic.Draw( pDev, aPos, aSize );
@@ -687,7 +698,7 @@ void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sa
if(bTransparent)
{
// draw checkered background
- drawCheckered(rDev, aPos, aSize);
+ drawTransparenceBackground(rDev, aPos, aSize);
}
aGrfObj.Draw( &rDev, aPos, aSize );
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index c946ca1..d528111 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -150,7 +150,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
bPageNotValid=sal_False;
bSavePortable=sal_False;
bSaveCompressed=sal_False;
- mbAutomaticXPropertyListCreation=true;
+ bSaveNative=sal_False;
bSwapGraphics=sal_False;
nSwapGraphicsMode=SDR_SWAPGRAPHICSMODE_DEFAULT;
bSaveOLEPreview=sal_False;
@@ -2122,7 +2122,7 @@ void SdrModel::SetColorTableAtSdrModel(XColorListSharedPtr aTable)
XColorListSharedPtr SdrModel::GetColorTableFromSdrModel() const
{
- if(IsAutomaticXPropertyListCreation() && !maColorTable.get())
+ if(!maColorTable.get())
{
const_cast< SdrModel* >(this)->maColorTable = XPropertyListFactory::CreateSharedXColorList(aTablePath);
}
@@ -2137,7 +2137,7 @@ void SdrModel::SetDashListAtSdrModel(XDashListSharedPtr aList)
XDashListSharedPtr SdrModel::GetDashListFromSdrModel() const
{
- if(IsAutomaticXPropertyListCreation() && !maDashList.get())
+ if(!maDashList.get())
{
const_cast< SdrModel* >(this)->maDashList = XPropertyListFactory::CreateSharedXDashList(aTablePath);
}
@@ -2152,7 +2152,7 @@ void SdrModel::SetLineEndListAtSdrModel(XLineEndListSharedPtr aList)
XLineEndListSharedPtr SdrModel::GetLineEndListFromSdrModel() const
{
- if(IsAutomaticXPropertyListCreation() && !maLineEndList.get())
+ if(!maLineEndList.get())
{
const_cast< SdrModel* >(this)->maLineEndList = XPropertyListFactory::CreateSharedXLineEndList(aTablePath);
}
@@ -2167,7 +2167,7 @@ void SdrModel::SetHatchListAtSdrModel(XHatchListSharedPtr aList)
XHatchListSharedPtr SdrModel::GetHatchListFromSdrModel() const
{
- if(IsAutomaticXPropertyListCreation() && !maHatchList.get())
+ if(!maHatchList.get())
{
const_cast< SdrModel* >(this)->maHatchList = XPropertyListFactory::CreateSharedXHatchList(aTablePath);
}
@@ -2182,7 +2182,7 @@ void SdrModel::SetGradientListAtSdrModel(XGradientListSharedPtr aList)
XGradientListSharedPtr SdrModel::GetGradientListFromSdrModel() const
{
- if(IsAutomaticXPropertyListCreation() && !maGradientList.get())
+ if(!maGradientList.get())
{
const_cast< SdrModel* >(this)->maGradientList = XPropertyListFactory::CreateSharedXGradientList(aTablePath);
}
@@ -2197,7 +2197,7 @@ void SdrModel::SetBitmapListAtSdrModel(XBitmapListSharedPtr aList)
XBitmapListSharedPtr SdrModel::GetBitmapListFromSdrModel() const
{
- if(IsAutomaticXPropertyListCreation() && !maBitmapList.get())
+ if(!maBitmapList.get())
{
const_cast< SdrModel* >(this)->maBitmapList = XPropertyListFactory::CreateSharedXBitmapList(aTablePath);
}
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 19faa4c..dd4a92b 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -121,6 +121,8 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
sal_uInt32 nModelPos;
FmFormModel *pModel = NULL;
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
for( nModelPos = 0; nModelPos < nFavCount; nModelPos++ )
{
BitmapEx aThumb;
@@ -129,17 +131,27 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
if(!!aThumb)
{
- static const sal_uInt32 nLen(8);
- static const Color aW(COL_WHITE);
- static const Color aG(0xef, 0xef, 0xef);
VirtualDevice aVDev;
const Point aNull(0, 0);
const Size aSize(aThumb.GetSizePixel());
aVDev.SetOutputSizePixel(aSize);
- aVDev.DrawCheckered(aNull, aSize, nLen, aW, aG);
- aVDev.DrawBitmapEx(aNull, aThumb);
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
+ {
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
+
+ aVDev.DrawCheckered(aNull, aSize, nLen, aW, aG);
+ }
+ else
+ {
+ aVDev.SetBackground(rStyleSettings.GetFieldColor());
+ aVDev.Erase();
+ }
+
+ aVDev.DrawBitmapEx(aNull, aThumb);
maFavoritesHorizontal.push_back(aVDev.GetBitmap(aNull, aSize));
}
}
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index 2b64f47..dbbccdc 100644
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index b57c3bf..de7dab6 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -19,24 +19,15 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
-
#include <unotools/pathoptions.hxx>
-
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-
-#endif
-
#include <sfx2/docfile.hxx>
#include <tools/urlobj.hxx>
#include <svx/dialogs.hrc>
@@ -107,7 +98,7 @@ sal_Bool XColorList::Load()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -130,7 +121,7 @@ sal_Bool XColorList::Save()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 9658e4a..89f7e03 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -19,46 +19,25 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
// include ---------------------------------------------------------------
-
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
-
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-
-#endif
#include <vcl/svapp.hxx>
-
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <svx/xtable.hxx>
-#include <svx/xpool.hxx>
-#include <svx/xlineit0.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/xlnwtit.hxx>
-#include <svx/xlndsit.hxx>
-#include <svx/xflclit.hxx>
-
-#include <svx/svdorect.hxx>
-#include <svx/svdopath.hxx>
-#include <svx/svdmodel.hxx>
-#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
-#include <svx/sdr/contact/displayinfo.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/attribute/lineattribute.hxx>
+#include <drawinglayer/attribute/strokeattribute.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
using namespace com::sun::star;
using namespace rtl;
@@ -75,9 +54,7 @@ sal_Unicode const pszExtDash[] = {'s','o','d'};
// ----------------
XDashList::XDashList(const String& rPath )
-: XPropertyList(rPath ),
- mpBackgroundObject(0),
- mpLineObject(0),
+: XPropertyList(rPath),
maBitmapSolidLine(),
maStringSolidLine(),
maStringNoLine()
@@ -86,8 +63,6 @@ XDashList::XDashList(const String& rPath )
XDashList::~XDashList()
{
- SdrObject::Free(mpBackgroundObject);
- SdrObject::Free(mpLineObject);
}
XDashEntry* XDashList::Replace(XDashEntry* pEntry, long nIndex )
@@ -115,7 +90,7 @@ sal_Bool XDashList::Load()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -136,7 +111,7 @@ sal_Bool XDashList::Save()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -167,87 +142,102 @@ sal_Bool XDashList::Create()
Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
{
- // to avoid rendering trouble (e.g. vcl renderer) and to get better AAed quality,
- // use double prerender size
- static bool bUseDoubleSize = true;
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+ const sal_uInt32 nFactor(2);
+ const Size aSize((rSize.Width() * 5 * 2) / 2, rSize.Height() * nFactor);
- Bitmap aRetval;
- OSL_ENSURE(pGlobalsharedModelAndVDev, "OOps, global values missing (!)");
+ // prepare polygon geometry for line
+ basegfx::B2DPolygon aLine;
- if(pGlobalsharedModelAndVDev)
+ aLine.append(basegfx::B2DPoint(0.0, aSize.Height() / 2.0));
+ aLine.append(basegfx::B2DPoint(aSize.Width(), aSize.Height() / 2.0));
+
+ // prepare LineAttribute
+ const basegfx::BColor aLineColor(rStyleSettings.GetFieldTextColor().getBColor());
+ const double fLineWidth(rStyleSettings.GetListBoxPreviewDefaultLineWidth() * (nFactor * 1.1));
+ const drawinglayer::attribute::LineAttribute aLineAttribute(
+ aLineColor,
+ fLineWidth);
+
+ // prepare StrokeAttribute
+ ::std::vector< double > aDotDashArray;
+ double fFullDotDashLen(0.0);
+
+ if(pDash && (pDash->GetDots() || pDash->GetDashes()))
{
- SdrModel& rModel = pGlobalsharedModelAndVDev->getSharedSdrModel();
- VirtualDevice& rVirDev = pGlobalsharedModelAndVDev->getSharedVirtualDevice();
- const Point aZero(0, 0);
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
- const Size aSize(rVirDev.PixelToLogic(Size(
- bUseDoubleSize ? rSize.Width() * 5 : rSize.Width() * 5 / 2,
- bUseDoubleSize ? rSize.Height() * 2 : rSize.Height())));
-
- rVirDev.SetOutputSize(aSize);
- rVirDev.SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
- rVirDev.SetBackground(rStyleSettings.GetFieldColor());
-
- if(!mpBackgroundObject)
- {
- const Rectangle aBackgroundSize(aZero, aSize);
- mpBackgroundObject = new SdrRectObj(aBackgroundSize);
- OSL_ENSURE(0 != mpBackgroundObject, "XDashList: no BackgroundObject created!" );
- mpBackgroundObject->SetModel(&rModel);
- mpBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_SOLID));
- mpBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_NONE));
- mpBackgroundObject->SetMergedItem(XFillColorItem(String(), rStyleSettings.GetFieldColor()));
- }
+ const basegfx::B2DHomMatrix aScaleMatrix(OutputDevice::LogicToLogic(MAP_100TH_MM, MAP_PIXEL));
+ const basegfx::B2DVector aScaleVector(aScaleMatrix * basegfx::B2DVector(1.0, 0.0));
+ const double fScaleValue(aScaleVector.getLength() * (nFactor * (1.4 / 2.0)));
+ const double fLineWidthInUnits(fLineWidth / fScaleValue);
- if(!mpLineObject)
- {
- const sal_uInt32 nHalfHeight(aSize.Height() / 2);
- const basegfx::B2DPoint aStart(0, nHalfHeight);
- const basegfx::B2DPoint aEnd(aSize.Width(), nHalfHeight);
- basegfx::B2DPolygon aPolygon;
- aPolygon.append(aStart);
- aPolygon.append(aEnd);
- mpLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
- OSL_ENSURE(0 != mpLineObject, "XDashList: no LineObject created!" );
- mpLineObject->SetModel(&rModel);
- mpLineObject->SetMergedItem(XLineStyleItem(XLINE_DASH));
- mpLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
- const Size aLineWidth(rVirDev.PixelToLogic(Size(rStyleSettings.GetListBoxPreviewDefaultLineWidth(), 0)));
- mpLineObject->SetMergedItem(XLineWidthItem(bUseDoubleSize ? aLineWidth.getWidth() * 2 : aLineWidth.getWidth()));
- }
+ fFullDotDashLen = pDash->CreateDotDashArray(aDotDashArray, fLineWidthInUnits);
- if(pDash)
- {
- mpLineObject->SetMergedItem(XLineStyleItem(XLINE_DASH));
- mpLineObject->SetMergedItem(XLineDashItem(String(), *pDash));
- }
- else
+ if(!aDotDashArray.empty())
{
- mpLineObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
+ for(sal_uInt32 a(0); a < aDotDashArray.size(); a++)
+ {
+ aDotDashArray[a] *= fScaleValue;
+ }
+
+ fFullDotDashLen *= fScaleValue;
}
+ }
- sdr::contact::SdrObjectVector aObjectVector;
+ const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(
+ aDotDashArray,
+ fFullDotDashLen);
- aObjectVector.push_back(mpBackgroundObject);
- aObjectVector.push_back(mpLineObject);
+ // cerate LinePrimitive
+ const drawinglayer::primitive2d::Primitive2DReference aLinePrimitive(
+ new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
+ aLine,
+ aLineAttribute,
+ aStrokeAttribute));
- sdr::contact::ObjectContactOfObjListPainter aPainter(rVirDev, aObjectVector, 0);
- sdr::contact::DisplayInfo aDisplayInfo;
+ // prepare VirtualDevice
+ VirtualDevice aVirtualDevice;
+ const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
- rVirDev.Erase();
- aPainter.ProcessDisplay(aDisplayInfo);
+ aVirtualDevice.SetOutputSizePixel(aSize);
+ aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
+ : DRAWMODE_DEFAULT);
- aRetval = rVirDev.GetBitmap(aZero, rVirDev.GetOutputSize());
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
+ {
+ const Point aNull(0, 0);
+ static const sal_uInt32 nLen(8 * nFactor);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
- if(bUseDoubleSize)
- {
- const Size aCurrentSize(aRetval.GetSizePixel());
+ aVirtualDevice.DrawCheckered(aNull, aSize, nLen, aW, aG);
+ }
+ else
+ {
+ aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
+ aVirtualDevice.Erase();
+ }
- aRetval.Scale(Size(aCurrentSize.Width() / 2, aCurrentSize.Height() / 2), BMP_SCALE_FASTESTINTERPOLATE);
- }
+ // create processor and draw primitives
+ drawinglayer::processor2d::BaseProcessor2D* pProcessor2D = drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
+ aVirtualDevice,
+ aNewViewInformation2D);
+
+ if(pProcessor2D)
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence aSequence(&aLinePrimitive, 1);
+
+ pProcessor2D->process(aSequence);
+ delete pProcessor2D;
+ }
+
+ // get result bitmap and scale
+ Bitmap aRetval(aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel()));
+
+ if(1 != nFactor)
+ {
+ aRetval.Scale(Size((rSize.Width() * 5) / 2, rSize.Height()), BMP_SCALE_FASTESTINTERPOLATE);
}
return aRetval;
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 62de407..66ec8d1 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -19,42 +19,26 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
// include ---------------------------------------------------------------
-
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
-
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-
-#endif
-
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <svx/xtable.hxx>
-#include <svx/xpool.hxx>
-#include <svx/xfillit0.hxx>
-#include <svx/xflgrit.hxx>
-
-#include <svx/svdorect.hxx>
-#include <svx/svdmodel.hxx>
-#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
-#include <svx/sdr/contact/displayinfo.hxx>
#include <vcl/svapp.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/xgrscit.hxx>
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
#define GLOBALOVERFLOW
@@ -71,14 +55,12 @@ sal_Unicode const pszExtGradient[] = {'s','o','g'};
// --------------------
XGradientList::XGradientList( const String& rPath )
-: XPropertyList(rPath ),
- mpBackgroundObject(0)
+: XPropertyList(rPath )
{
}
XGradientList::~XGradientList()
{
- SdrObject::Free(mpBackgroundObject);
}
XGradientEntry* XGradientList::Replace(XGradientEntry* pEntry, long nIndex )
@@ -163,57 +145,125 @@ sal_Bool XGradientList::Create()
return( sal_True );
}
-Bitmap XGradientList::CreateBitmapForUI( long nIndex )
+Bitmap XGradientList::CreateBitmapForUI(long nIndex)
{
Bitmap aRetval;
- OSL_ENSURE(pGlobalsharedModelAndVDev, "OOps, global values missing (!)");
- OSL_ENSURE(nIndex < Count(), "OOps, global values missing (!)");
+ OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)");
- if(pGlobalsharedModelAndVDev && nIndex < Count())
+ if(nIndex < Count())
{
- SdrModel& rModel = pGlobalsharedModelAndVDev->getSharedSdrModel();
- VirtualDevice& rVirDev = pGlobalsharedModelAndVDev->getSharedVirtualDevice();
- const Point aZero(0, 0);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
- const Size aSize(rVirDev.PixelToLogic(rSize));
- rVirDev.SetOutputSize(aSize);
- rVirDev.SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
- rVirDev.SetBackground(rStyleSettings.GetFieldColor());
+ // prepare polygon geometry for rectangle
+ const basegfx::B2DPolygon aRectangle(
+ basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRange(0.0, 0.0, rSize.Width(), rSize.Height())));
+
+ const XGradient& rGradient = GetGradient(nIndex)->GetGradient();
+ const sal_uInt16 nStartIntens(rGradient.GetStartIntens());
+ basegfx::BColor aStart(rGradient.GetStartColor().getBColor());
- if(!mpBackgroundObject)
+ if(nStartIntens != 100)
{
- const Size aSinglePixel(rVirDev.PixelToLogic(Size(1, 1)));
- const Rectangle aBackgroundSize(aZero, Size(aSize.getWidth() - aSinglePixel.getWidth(), aSize.getHeight() - aSinglePixel.getHeight()));
- mpBackgroundObject = new SdrRectObj(aBackgroundSize);
- OSL_ENSURE(0 != mpBackgroundObject, "XGradientList: no BackgroundObject created!" );
- mpBackgroundObject->SetModel(&rModel);
- mpBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_GRADIENT));
- mpBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
- mpBackgroundObject->SetMergedItem(XLineColorItem(String(), Color(COL_BLACK)));
- mpBackgroundObject->SetMergedItem(XGradientStepCountItem(sal_uInt16((rSize.Width() + rSize.Height()) / 3)));
+ const basegfx::BColor aBlack;
+ aStart = interpolate(aBlack, aStart, (double)nStartIntens * 0.01);
}
- const SfxItemSet& rItemSet = mpBackgroundObject->GetMergedItemSet();
+ const sal_uInt16 nEndIntens(rGradient.GetEndIntens());
+ basegfx::BColor aEnd(rGradient.GetEndColor().getBColor());
- mpBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_GRADIENT));
- mpBackgroundObject->SetMergedItem(XFillGradientItem(rItemSet.GetPool(), GetGradient(nIndex)->GetGradient()));
+ if(nEndIntens != 100)
+ {
+ const basegfx::BColor aBlack;
+ aEnd = interpolate(aBlack, aEnd, (double)nEndIntens * 0.01);
+ }
+
+ drawinglayer::attribute::GradientStyle aGradientStyle(drawinglayer::attribute::GRADIENTSTYLE_RECT);
+
+ switch(rGradient.GetGradientStyle())
+ {
+ case XGRAD_LINEAR :
+ {
+ aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_LINEAR;
+ break;
+ }
+ case XGRAD_AXIAL :
+ {
+ aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_AXIAL;
+ break;
+ }
+ case XGRAD_RADIAL :
+ {
+ aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RADIAL;
+ break;
+ }
+ case XGRAD_ELLIPTICAL :
+ {
+ aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_ELLIPTICAL;
+ break;
+ }
+ case XGRAD_SQUARE :
+ {
+ aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE;
+ break;
+ }
+ default :
+ {
+ aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RECT; // XGRAD_RECT
+ break;
+ }
+ }
- sdr::contact::SdrObjectVector aObjectVector;
+ const sal_uInt16 nSteps((rSize.Width() + rSize.Height()) / 3);
+ const drawinglayer::attribute::FillGradientAttribute aFillGradient(
+ aGradientStyle,
+ (double)rGradient.GetBorder() * 0.01,
+ (double)rGradient.GetXOffset() * 0.01,
+ (double)rGradient.GetYOffset() * 0.01,
+ (double)rGradient.GetAngle() * F_PI1800,
+ aStart,
+ aEnd,
+ nSteps);
+
+ const drawinglayer::primitive2d::Primitive2DReference aGradientPrimitive(
+ new drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D(
+ basegfx::B2DPolyPolygon(aRectangle),
+ aFillGradient));
+
+ const basegfx::BColor aBlack(0.0, 0.0, 0.0);
+ const drawinglayer::primitive2d::Primitive2DReference aBlackRectanglePrimitive(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+ aRectangle,
+ aBlack));
+
+ // prepare VirtualDevice
+ VirtualDevice aVirtualDevice;
+ const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
+
+ aVirtualDevice.SetOutputSizePixel(rSize);
+ aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
+ : DRAWMODE_DEFAULT);
- aObjectVector.push_back(mpBackgroundObject);
+ // create processor and draw primitives
+ drawinglayer::processor2d::BaseProcessor2D* pProcessor2D = drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
+ aVirtualDevice,
+ aNewViewInformation2D);
- sdr::contact::ObjectContactOfObjListPainter aPainter(rVirDev, aObjectVector, 0);
- sdr::contact::DisplayInfo aDisplayInfo;
+ if(pProcessor2D)
+ {
+ drawinglayer::primitive2d::Primitive2DSequence aSequence(2);
- rVirDev.Erase();
- aPainter.ProcessDisplay(aDisplayInfo);
+ aSequence[0] = aGradientPrimitive;
+ aSequence[1] = aBlackRectanglePrimitive;
- return rVirDev.GetBitmap(aZero, rVirDev.GetOutputSize());
+ pProcessor2D->process(aSequence);
+ delete pProcessor2D;
+ }
+ // get result bitmap and scale
+ aRetval = aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel());
}
return aRetval;
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 02149a5..29916b9 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -19,43 +19,26 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
// include ---------------------------------------------------------------
-
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/svapp.hxx>
-
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-
-#endif
-
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <svx/xtable.hxx>
-#include <svx/xpool.hxx>
-#include "svx/dlgutil.hxx"
-#include <svx/xflhtit.hxx>
-#include <svx/xflclit.hxx>
-#include <svx/xfillit0.hxx>
-
-#include <svx/svdorect.hxx>
-#include <svx/svdmodel.hxx>
-#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
-#include <svx/sdr/contact/displayinfo.hxx>
-#include <svx/xlnclit.hxx>
+#include <drawinglayer/attribute/fillhatchattribute.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
using namespace ::com::sun::star;
using namespace ::rtl;
@@ -70,16 +53,12 @@ sal_Unicode const pszExtHatch[] = {'s','o','h'};
// -----------------
XHatchList::XHatchList(const String& rPath )
-: XPropertyList(rPath),
- mpBackgroundObject(0),
- mpHatchObject(0)
+: XPropertyList(rPath)
{
}
XHatchList::~XHatchList()
{
- SdrObject::Free(mpBackgroundObject);
- SdrObject::Free(mpHatchObject);
}
XHatchEntry* XHatchList::Replace(XHatchEntry* pEntry, long nIndex )
@@ -107,7 +86,7 @@ sal_Bool XHatchList::Load()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -128,7 +107,7 @@ sal_Bool XHatchList::Save()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -160,61 +139,106 @@ sal_Bool XHatchList::Create()
Bitmap XHatchList::CreateBitmapForUI( long nIndex )
{
Bitmap aRetval;
- OSL_ENSURE(pGlobalsharedModelAndVDev, "OOps, global values missing (!)");
- OSL_ENSURE(nIndex < Count(), "OOps, global values missing (!)");
+ OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)");
- if(pGlobalsharedModelAndVDev && nIndex < Count())
+ if(nIndex < Count())
{
- SdrModel& rModel = pGlobalsharedModelAndVDev->getSharedSdrModel();
- VirtualDevice& rVirDev = pGlobalsharedModelAndVDev->getSharedVirtualDevice();
- const Point aZero(0, 0);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- const Size aSize(rVirDev.PixelToLogic(rStyleSettings.GetListBoxPreviewDefaultPixelSize()));
+ const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
- rVirDev.SetOutputSize(aSize);
- rVirDev.SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
- rVirDev.SetBackground(rStyleSettings.GetFieldColor());
+ // prepare polygon geometry for rectangle
+ const basegfx::B2DPolygon aRectangle(
+ basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRange(0.0, 0.0, rSize.Width(), rSize.Height())));
- const Size aSinglePixel(rVirDev.PixelToLogic(Size(1, 1)));
- const Rectangle aBackgroundSize(aZero, Size(aSize.getWidth() - aSinglePixel.getWidth(), aSize.getHeight() - aSinglePixel.getHeight()));
+ const XHatch& rHatch = GetHatch(nIndex)->GetHatch();
+ drawinglayer::attribute::HatchStyle aHatchStyle(drawinglayer::attribute::HATCHSTYLE_TRIPLE);
- if(!mpBackgroundObject)
+ switch(rHatch.GetHatchStyle())
{
- mpBackgroundObject = new SdrRectObj(aBackgroundSize);
- OSL_ENSURE(0 != mpBackgroundObject, "XDashList: no BackgroundObject created!" );
- mpBackgroundObject->SetModel(&rModel);
- mpBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_SOLID));
- mpBackgroundObject->SetMergedItem(XFillColorItem(String(), rStyleSettings.GetFieldColor()));
- mpBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
- mpBackgroundObject->SetMergedItem(XLineColorItem(String(), Color(COL_BLACK)));
+ case XHATCH_SINGLE :
+ {
+ aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE;
+ break;
+ }
+ case XHATCH_DOUBLE :
+ {
+ aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE;
+ break;
+ }
+ default :
+ {
+ aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE; // XHATCH_TRIPLE
+ break;
+ }
}
- if(!mpHatchObject)
+ const basegfx::B2DHomMatrix aScaleMatrix(OutputDevice::LogicToLogic(MAP_100TH_MM, MAP_PIXEL));
+ const basegfx::B2DVector aScaleVector(aScaleMatrix * basegfx::B2DVector(1.0, 0.0));
+ const double fScaleValue(aScaleVector.getLength());
+
+ const drawinglayer::attribute::FillHatchAttribute aFillHatch(
+ aHatchStyle,
+ (double)rHatch.GetDistance() * fScaleValue,
+ (double)rHatch.GetAngle() * F_PI1800,
+ rHatch.GetColor().getBColor(),
+ 3, // same default as VCL, a minimum of three discrete units (pixels) offset
+ false);
+
+ const basegfx::BColor aBlack(0.0, 0.0, 0.0);
+ const drawinglayer::primitive2d::Primitive2DReference aHatchPrimitive(
+ new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D(
+ basegfx::B2DPolyPolygon(aRectangle),
+ aBlack,
+ aFillHatch));
+
+ const drawinglayer::primitive2d::Primitive2DReference aBlackRectanglePrimitive(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+ aRectangle,
+ aBlack));
+
+ // prepare VirtualDevice
+ VirtualDevice aVirtualDevice;
+ const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
+
+ aVirtualDevice.SetOutputSizePixel(rSize);
+ aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
+ : DRAWMODE_DEFAULT);
+
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
{
- mpHatchObject = new SdrRectObj(aBackgroundSize);
- OSL_ENSURE(0 != mpHatchObject, "XDashList: no HatchObject created!" );
- mpHatchObject->SetModel(&rModel);
- mpHatchObject->SetMergedItem(XFillStyleItem(XFILL_HATCH));
- mpHatchObject->SetMergedItem(XLineStyleItem(XLINE_NONE));
- }
+ const Point aNull(0, 0);
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
- mpHatchObject->SetMergedItem(XFillStyleItem(XFILL_HATCH));
- mpHatchObject->SetMergedItem(XFillHatchItem(String(), GetHatch(nIndex)->GetHatch()));
+ aVirtualDevice.DrawCheckered(aNull, rSize, nLen, aW, aG);
+ }
+ else
+ {
+ aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
+ aVirtualDevice.Erase();
+ }
- sdr::contact::SdrObjectVector aObjectVector;
+ // create processor and draw primitives
+ drawinglayer::processor2d::BaseProcessor2D* pProcessor2D = drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
+ aVirtualDevice,
+ aNewViewInformation2D);
- aObjectVector.push_back(mpBackgroundObject);
- aObjectVector.push_back(mpHatchObject);
+ if(pProcessor2D)
+ {
+ drawinglayer::primitive2d::Primitive2DSequence aSequence(2);
- sdr::contact::ObjectContactOfObjListPainter aPainter(rVirDev, aObjectVector, 0);
- sdr::contact::DisplayInfo aDisplayInfo;
+ aSequence[0] = aHatchPrimitive;
+ aSequence[1] = aBlackRectanglePrimitive;
- rVirDev.Erase();
- aPainter.ProcessDisplay(aDisplayInfo);
+ pProcessor2D->process(aSequence);
+ delete pProcessor2D;
+ }
- aRetval = rVirDev.GetBitmap(aZero, rVirDev.GetOutputSize());
+ // get result bitmap and scale
+ aRetval = aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel());
}
return aRetval;
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 0f97ad4..803718d 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -19,17 +19,12 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include <svx/xtable.hxx>
#include <svx/xpool.hxx>
-#include <svx/svdobj.hxx>
#include <svx/svdpool.hxx>
-#include <vcl/virdev.hxx>
-#include <svx/svdmodel.hxx>
#define GLOBALOVERFLOW
@@ -45,61 +40,6 @@ Color RGB_Color( ColorData nColorName )
return aRGBColor;
}
-sharedModelAndVDev::sharedModelAndVDev()
-: mnUseCount(0),
- mpVirtualDevice(0),
- mpSdrModel(0)
-{
-}
-
-sharedModelAndVDev::~sharedModelAndVDev()
-{
- delete mpVirtualDevice;
- delete mpSdrModel;
-}
-
-void sharedModelAndVDev::increaseUseCount()
-{
- mnUseCount++;
-}
-
-bool sharedModelAndVDev::decreaseUseCount()
-{
- if(mnUseCount)
- {
- mnUseCount--;
- }
-
- return 0 == mnUseCount;
-}
-
-SdrModel& sharedModelAndVDev::getSharedSdrModel()
-{
- if(!mpSdrModel)
- {
- mpSdrModel = new SdrModel();
- OSL_ENSURE(0 != mpSdrModel, "XPropertyList sharedModelAndVDev: no SdrModel created!" );
- mpSdrModel->GetItemPool().FreezeIdRanges();
- mpSdrModel->SetAutomaticXPropertyListCreation(false);
- }
-
- return *mpSdrModel;
-}
-
-VirtualDevice& sharedModelAndVDev::getSharedVirtualDevice()
-{
- if(!mpVirtualDevice)
- {
- mpVirtualDevice = new VirtualDevice;
- OSL_ENSURE(0 != mpVirtualDevice, "XPropertyList sharedModelAndVDev: no VirtualDevice created!" );
- mpVirtualDevice->SetMapMode(MAP_100TH_MM);
- }
-
- return *mpVirtualDevice;
-}
-
-sharedModelAndVDev* XPropertyList::pGlobalsharedModelAndVDev = 0;
-
// --------------------
// class XPropertyList
// --------------------
@@ -110,12 +50,6 @@ XPropertyList::XPropertyList( const String& rPath ) :
maContent(),
mbListDirty (true)
{
- if(!pGlobalsharedModelAndVDev)
- {
- pGlobalsharedModelAndVDev = new sharedModelAndVDev();
- }
-
- pGlobalsharedModelAndVDev->increaseUseCount();
}
/*************************************************************************
@@ -131,12 +65,6 @@ XPropertyList::~XPropertyList()
delete maContent.back();
maContent.pop_back();
}
-
- if(pGlobalsharedModelAndVDev && pGlobalsharedModelAndVDev->decreaseUseCount())
- {
- delete pGlobalsharedModelAndVDev;
- pGlobalsharedModelAndVDev = 0;
- }
}
/*************************************************************************
@@ -264,7 +192,7 @@ void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex )
{
const long nObjectCount(maContent.size());
- if(static_cast<long>(LIST_APPEND) == nIndex || nIndex >= nObjectCount)
+ if(static_cast< long >(LIST_APPEND) == nIndex || nIndex >= nObjectCount)
{
maContent.push_back(pEntry);
}
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index b7547bc..33be5dd 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -19,56 +19,26 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
// include ---------------------------------------------------------------
-
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
-
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-
-#endif
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
-
-#ifndef _SV_APP_HXX
#include <vcl/svapp.hxx>
-#endif
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
-
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
-
#include <svx/xtable.hxx>
-#include <svx/xpool.hxx>
-#include <svx/xfillit0.hxx>
-#include <svx/xflclit.hxx>
-#include <svx/xlnstwit.hxx>
-#include <svx/xlnedwit.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/xlineit0.hxx>
-#include <svx/xlnstit.hxx>
-#include <svx/xlnedit.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/attribute/linestartendattribute.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <svx/svdorect.hxx>
-#include <svx/svdopath.hxx>
-#include <svx/svdmodel.hxx>
-#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
-#include <svx/sdr/contact/displayinfo.hxx>
-#include <svx/xlnwtit.hxx>
-
#define GLOBALOVERFLOW
using namespace com::sun::star;
@@ -84,16 +54,12 @@ sal_Unicode const pszExtLineEnd[] = {'s','o','e'};
// --------------------
XLineEndList::XLineEndList(const String& rPath)
-: XPropertyList(rPath),
- mpBackgroundObject(0),
- mpLineObject(0)
+: XPropertyList(rPath)
{
}
XLineEndList::~XLineEndList()
{
- SdrObject::Free(mpBackgroundObject);
- SdrObject::Free(mpLineObject);
}
XLineEndEntry* XLineEndList::Replace(XLineEndEntry* pEntry, long nIndex )
@@ -121,7 +87,7 @@ sal_Bool XLineEndList::Load()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -142,7 +108,7 @@ sal_Bool XLineEndList::Save()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
- DBG_ASSERT( !maPath.Len(), "invalid URL" );
+ OSL_ENSURE( !maPath.Len(), "invalid URL" );
return sal_False;
}
@@ -181,69 +147,82 @@ sal_Bool XLineEndList::Create()
Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
{
Bitmap aRetval;
- OSL_ENSURE(pGlobalsharedModelAndVDev, "OOps, global values missing (!)");
- OSL_ENSURE(nIndex < Count(), "OOps, global values missing (!)");
+ OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)");
- if(pGlobalsharedModelAndVDev && nIndex < Count())
+ if(nIndex < Count())
{
- SdrModel& rModel = pGlobalsharedModelAndVDev->getSharedSdrModel();
- VirtualDevice& rVirDev = pGlobalsharedModelAndVDev->getSharedVirtualDevice();
- const Point aZero(0, 0);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
- const Size aSize(rVirDev.PixelToLogic(Size(rSize.Width() * 2, rSize.Height())));
-
- rVirDev.SetOutputSize(aSize);
- rVirDev.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ const Size aSize(rSize.Width() * 2, rSize.Height());
+
+ // prepare line geometry
+ basegfx::B2DPolygon aLine;
+ const double fBorderDistance(aSize.Height() * 0.1);
+
+ aLine.append(basegfx::B2DPoint(fBorderDistance, aSize.Height() / 2));
+ aLine.append(basegfx::B2DPoint(aSize.Width() - fBorderDistance, aSize.Height() / 2));
+
+ // prepare LineAttribute
+ const basegfx::BColor aLineColor(rStyleSettings.GetFieldTextColor().getBColor());
+ const double fLineWidth(rStyleSettings.GetListBoxPreviewDefaultLineWidth() * 1.1);
+ const drawinglayer::attribute::LineAttribute aLineAttribute(
+ aLineColor,
+ fLineWidth);
+
+ const basegfx::B2DPolyPolygon aLineEnd(GetLineEnd(nIndex)->GetLineEnd());
+ const double fArrowHeight(aSize.Height() - (2.0 * fBorderDistance));
+ const drawinglayer::attribute::LineStartEndAttribute aLineStartEndAttribute(
+ fArrowHeight,
+ aLineEnd,
+ false);
+
+ // prepare line primitive
+ const drawinglayer::primitive2d::Primitive2DReference aLineStartEndPrimitive(
+ new drawinglayer::primitive2d::PolygonStrokeArrowPrimitive2D(
+ aLine,
+ aLineAttribute,
+ aLineStartEndAttribute,
+ aLineStartEndAttribute));
+
+ // prepare VirtualDevice
+ VirtualDevice aVirtualDevice;
+ const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
+
+ aVirtualDevice.SetOutputSizePixel(aSize);
+ aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
: DRAWMODE_DEFAULT);
- rVirDev.SetBackground(rStyleSettings.GetFieldColor());
- if(!mpBackgroundObject)
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
{
- const Rectangle aBackgroundSize(aZero, aSize);
- mpBackgroundObject = new SdrRectObj(aBackgroundSize);
- OSL_ENSURE(0 != mpBackgroundObject, "XLineEndList: no BackgroundObject created!" );
- mpBackgroundObject->SetModel(&rModel);
- mpBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_SOLID));
- mpBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_NONE));
- mpBackgroundObject->SetMergedItem(XFillColorItem(String(), rStyleSettings.GetFieldColor()));
- }
+ const Point aNull(0, 0);
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
- if(!mpLineObject)
+ aVirtualDevice.DrawCheckered(aNull, aSize, nLen, aW, aG);
+ }
+ else
{
- const basegfx::B2DPoint aStart(0, aSize.Height() / 2);
- const basegfx::B2DPoint aEnd(aSize.Width(), aSize.Height() / 2);
- basegfx::B2DPolygon aPolygon;
- aPolygon.append(aStart);
- aPolygon.append(aEnd);
- mpLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
- OSL_ENSURE(0 != mpLineObject, "XLineEndList: no LineObject created!" );
- mpLineObject->SetModel(&rModel);
- const Size aLineWidth(rVirDev.PixelToLogic(Size(rStyleSettings.GetListBoxPreviewDefaultLineWidth(), 0)));
- mpLineObject->SetMergedItem(XLineWidthItem(aLineWidth.getWidth()));
- const sal_uInt32 nArrowHeight((aSize.Height() * 8) / 10);
- mpLineObject->SetMergedItem(XLineStartWidthItem(nArrowHeight));
- mpLineObject->SetMergedItem(XLineEndWidthItem(nArrowHeight));
- mpLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
+ aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
+ aVirtualDevice.Erase();
}
- mpLineObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
- mpLineObject->SetMergedItem(XLineStartItem(String(), GetLineEnd(nIndex)->GetLineEnd()));
- mpLineObject->SetMergedItem(XLineEndItem(String(), GetLineEnd(nIndex)->GetLineEnd()));
+ // create processor and draw primitives
+ drawinglayer::processor2d::BaseProcessor2D* pProcessor2D = drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
+ aVirtualDevice,
+ aNewViewInformation2D);
- sdr::contact::SdrObjectVector aObjectVector;
-
- aObjectVector.push_back(mpBackgroundObject);
- aObjectVector.push_back(mpLineObject);
-
- sdr::contact::ObjectContactOfObjListPainter aPainter(rVirDev, aObjectVector, 0);
- sdr::contact::DisplayInfo aDisplayInfo;
+ if(pProcessor2D)
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence aSequence(&aLineStartEndPrimitive, 1);
- rVirDev.Erase();
- aPainter.ProcessDisplay(aDisplayInfo);
+ pProcessor2D->process(aSequence);
+ delete pProcessor2D;
+ }
- aRetval = rVirDev.GetBitmap(aZero, rVirDev.GetOutputSize());
+ // get result bitmap and scale
+ aRetval = aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel());
}
return aRetval;
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 5779aee..540b7d1 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -905,7 +905,7 @@ public:
void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
- void SetLineColor();
+ void Fdrawrect;
void SetLineColor( const Color& rColor );
const Color& GetLineColor() const { return maLineColor; }
sal_Bool IsLineColor() const { return mbLineColor; }
@@ -1086,6 +1086,10 @@ public:
const MapMode& rMapModeSource,
const MapMode& rMapModeDest );
+ // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
+ // for B2DPoly/Polygons use this internally anyways to transform the B2DPolygon)
+ static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
+
Size GetOutputSizePixel() const
{ return Size( mnOutWidth, mnOutHeight ); }
long GetOutputWidthPixel() const { return mnOutWidth; }
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index bba89bb..e9f0f0e 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -440,6 +440,7 @@ private:
Size maListBoxPreviewDefaultLogicSize;
Size maListBoxPreviewDefaultPixelSize;
sal_uInt16 mnListBoxPreviewDefaultLineWidth;
+ sal_Bool mbUIPreviewUsesCheckeredBackground;
};
#define DEFAULT_WORKSPACE_GRADIENT_START_COLOR Color( 0xa3, 0xae, 0xb8 )
@@ -969,6 +970,11 @@ public:
void SetListBoxPreviewDefaultLineWidth(sal_uInt16 nWidth) { CopyData(); mpData->mnListBoxPreviewDefaultLineWidth = nWidth; }
sal_uInt16 GetListBoxPreviewDefaultLineWidth() const { return mpData->mnListBoxPreviewDefaultLineWidth; }
+ // defines if previews which containn potentially transparent objects (e.g. the dash/line/LineStartEnd previews and others)
+ // use the default transparent visualization background (checkered background) as it has got standard in graphic programs nowadays
+ void SetUIPreviewUsesCheckeredBackground(bool bNew) { CopyData(); mpData->mbUIPreviewUsesCheckeredBackground = bNew; }
+ bool GetUIPreviewUsesCheckeredBackground() const { return mpData->mbUIPreviewUsesCheckeredBackground; }
+
void SetStandardStyles();
const StyleSettings& operator =( const StyleSettings& rSet );
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 61f362f..8bda10d 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -441,6 +441,7 @@ ImplStyleData::ImplStyleData()
maListBoxPreviewDefaultLogicSize = Size(15, 7);
maListBoxPreviewDefaultPixelSize = Size(0, 0); // on-demand calculated in GetListBoxPreviewDefaultPixelSize()
mnListBoxPreviewDefaultLineWidth = 1;
+ mbUIPreviewUsesCheckeredBackground = true;
SetStandardStyles();
}
@@ -553,6 +554,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
maListBoxPreviewDefaultLogicSize = rData.maListBoxPreviewDefaultLogicSize;
maListBoxPreviewDefaultPixelSize = rData.maListBoxPreviewDefaultPixelSize;
mnListBoxPreviewDefaultLineWidth = rData.mnListBoxPreviewDefaultLineWidth;
+ mbUIPreviewUsesCheckeredBackground = rData.mbUIPreviewUsesCheckeredBackground;
}
// -----------------------------------------------------------------------
@@ -1072,7 +1074,8 @@ sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->mnColorValueSetMaximumRowCount == rSet.mpData->mnColorValueSetMaximumRowCount) &&
(mpData->maListBoxPreviewDefaultLogicSize == rSet.mpData->maListBoxPreviewDefaultLogicSize) &&
(mpData->maListBoxPreviewDefaultPixelSize == rSet.mpData->maListBoxPreviewDefaultPixelSize) &&
- (mpData->mnListBoxPreviewDefaultLineWidth == rSet.mpData->mnListBoxPreviewDefaultLineWidth))
+ (mpData->mnListBoxPreviewDefaultLineWidth == rSet.mpData->mnListBoxPreviewDefaultLineWidth) &&
+ (mpData->mbUIPreviewUsesCheckeredBackground == rSet.mpData->mbUIPreviewUsesCheckeredBackground))
return sal_True;
else
return sal_False;
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index fb8e9de..27619af 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -2322,42 +2322,15 @@ basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPoly
const MapMode& rMapModeSource,
const MapMode& rMapModeDest )
{
- if ( rMapModeSource == rMapModeDest )
- return rPolySource;
-
- MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
- ENTER2( eUnitSource, eUnitDest );
-
- basegfx::B2DHomMatrix aTransform;
-
- if ( rMapModeSource.mpImplMapMode->mbSimple &&
- rMapModeDest.mpImplMapMode->mbSimple )
+ if(rMapModeSource == rMapModeDest)
{
- ENTER3( eUnitSource, eUnitDest );
-
- const double fScaleFactor((double)nNumerator / (double)nDenominator);
- aTransform.set(0, 0, fScaleFactor);
- aTransform.set(1, 1, fScaleFactor);
+ return rPolySource;
}
- else
- {
- ENTER4( rMapModeSource, rMapModeDest );
- const double fScaleFactorX( (double(aMapResSource.mnMapScNumX) * double(aMapResDest.mnMapScDenomX))
- / (double(aMapResSource.mnMapScDenomX) * double(aMapResDest.mnMapScNumX)) );
- const double fScaleFactorY( (double(aMapResSource.mnMapScNumY) * double(aMapResDest.mnMapScDenomY))
- / (double(aMapResSource.mnMapScDenomY) * double(aMapResDest.mnMapScNumY)) );
- const double fZeroPointX(double(aMapResSource.mnMapOfsX) * fScaleFactorX - double(aMapResDest.mnMapOfsX));
- const double fZeroPointY(double(aMapResSource.mnMapOfsY) * fScaleFactorY - double(aMapResDest.mnMapOfsY));
+ const basegfx::B2DHomMatrix aTransform(LogicToLogic(rMapModeSource, rMapModeDest));
+ basegfx::B2DPolygon aPoly(rPolySource);
- aTransform.set(0, 0, fScaleFactorX);
- aTransform.set(1, 1, fScaleFactorY);
- aTransform.set(0, 2, fZeroPointX);
- aTransform.set(1, 2, fZeroPointY);
- }
- basegfx::B2DPolygon aPoly( rPolySource );
- aPoly.transform( aTransform );
+ aPoly.transform(aTransform);
return aPoly;
}
@@ -2367,19 +2340,36 @@ basegfx::B2DPolyPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolyPolygo
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list