You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/05/18 12:12:56 UTC
svn commit: r1484083 [15/17] - in /openoffice/branches/ia2: ./
ext_libraries/apr/prj/ ext_libraries/coinmp/prj/ ext_libraries/ratscan/prj/
ext_libraries/serf/prj/ main/ main/avmedia/source/quicktime/
main/bridges/prj/ main/bridges/source/cpp_uno/cxx_ma...
Modified: openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.cxx Sat May 18 10:12:43 2013
@@ -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>
@@ -85,68 +85,61 @@ TextUnderlineControl::TextUnderlineContr
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 ));
- maVSUnderline.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
- GetSettings().GetStyleSettings().GetMenuColor():
- sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-
- Link aLink = LINK( this, TextUnderlineControl, PBClickHdl ) ;
- maPBOptions.SetClickHdl(aLink);
-
- maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
-
- maVSUnderline.InsertItem(1, maIMGSingle ,String(SVX_RES(STR_SINGLE)));
- maVSUnderline.SetItemData(1, (void*)(sal_uInt64)UNDERLINE_SINGLE);
-
- maVSUnderline.InsertItem(2, maIMGDouble ,String(SVX_RES(STR_DOUBLE)));
- maVSUnderline.SetItemData(2, (void*)(sal_uInt64)UNDERLINE_DOUBLE);
-
- maVSUnderline.InsertItem(3, maIMGBold, String(SVX_RES(STR_BOLD)));
- maVSUnderline.SetItemData(3,(void*)(sal_uInt64)UNDERLINE_BOLD);
-
- maVSUnderline.InsertItem(4, maIMGDot, String(SVX_RES(STR_DOT)));
- maVSUnderline.SetItemData(4,(void*)(sal_uInt64)UNDERLINE_DOTTED);
-
- maVSUnderline.InsertItem(5, maIMGDotBold, String(SVX_RES(STR_DOT_BOLD)));
- maVSUnderline.SetItemData(5,(void*)(sal_uInt64)UNDERLINE_BOLDDOTTED);
-
- maVSUnderline.InsertItem(6, maIMGDash, String(SVX_RES(STR_DASH)));
- maVSUnderline.SetItemData(6,(void*)(sal_uInt64)UNDERLINE_DASH);
-
- maVSUnderline.InsertItem(7, maIMGDashLong,String(SVX_RES(STR_DASH_LONG)));
- maVSUnderline.SetItemData(7,(void*)(sal_uInt64)UNDERLINE_LONGDASH);
-
- maVSUnderline.InsertItem(8, maIMGDashDot, String(SVX_RES(STR_DASH_DOT)));
- maVSUnderline.SetItemData(8,(void*)(sal_uInt64)UNDERLINE_DASHDOT);
+ maVSUnderline.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ maVSUnderline.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
- maVSUnderline.InsertItem(9, maIMGDashDotDot, String(SVX_RES(STR_DASH_DOT_DOT)));
- maVSUnderline.SetItemData(9,(void*)(sal_uInt64)UNDERLINE_DASHDOTDOT);
+ Link aLink = LINK( this, TextUnderlineControl, PBClickHdl ) ;
+ maPBOptions.SetClickHdl(aLink);
- maVSUnderline.InsertItem(10, maIMGWave, String(SVX_RES(STR_WAVE)));
- maVSUnderline.SetItemData(10,(void*)(sal_uInt64)UNDERLINE_WAVE);
+ maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
- maVSUnderline.SetColCount( 1 );
- aLink = LINK( this, TextUnderlineControl, VSSelectHdl ) ;
+ // 'none' item
+ maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
+ maVSUnderline.SetText( String(SVX_RES(STR_WITHOUT) ) );
+
+ maVSUnderline.InsertItem(1, maIMGSingle ,String(SVX_RES(STR_SINGLE)));
+ maVSUnderline.SetItemData(1, (void*)(sal_uInt64)UNDERLINE_SINGLE);
+
+ maVSUnderline.InsertItem(2, maIMGDouble ,String(SVX_RES(STR_DOUBLE)));
+ maVSUnderline.SetItemData(2, (void*)(sal_uInt64)UNDERLINE_DOUBLE);
+
+ maVSUnderline.InsertItem(3, maIMGBold, String(SVX_RES(STR_BOLD)));
+ maVSUnderline.SetItemData(3,(void*)(sal_uInt64)UNDERLINE_BOLD);
+
+ maVSUnderline.InsertItem(4, maIMGDot, String(SVX_RES(STR_DOT)));
+ maVSUnderline.SetItemData(4,(void*)(sal_uInt64)UNDERLINE_DOTTED);
+
+ maVSUnderline.InsertItem(5, maIMGDotBold, String(SVX_RES(STR_DOT_BOLD)));
+ maVSUnderline.SetItemData(5,(void*)(sal_uInt64)UNDERLINE_BOLDDOTTED);
+
+ maVSUnderline.InsertItem(6, maIMGDash, String(SVX_RES(STR_DASH)));
+ maVSUnderline.SetItemData(6,(void*)(sal_uInt64)UNDERLINE_DASH);
+
+ maVSUnderline.InsertItem(7, maIMGDashLong,String(SVX_RES(STR_DASH_LONG)));
+ maVSUnderline.SetItemData(7,(void*)(sal_uInt64)UNDERLINE_LONGDASH);
+
+ maVSUnderline.InsertItem(8, maIMGDashDot, String(SVX_RES(STR_DASH_DOT)));
+ maVSUnderline.SetItemData(8,(void*)(sal_uInt64)UNDERLINE_DASHDOT);
+
+ maVSUnderline.InsertItem(9, maIMGDashDotDot, String(SVX_RES(STR_DASH_DOT_DOT)));
+ maVSUnderline.SetItemData(9,(void*)(sal_uInt64)UNDERLINE_DASHDOTDOT);
+
+ maVSUnderline.InsertItem(10, maIMGWave, String(SVX_RES(STR_WAVE)));
+ maVSUnderline.SetItemData(10,(void*)(sal_uInt64)UNDERLINE_WAVE);
+
+ maVSUnderline.SetColCount( 1 );
+ aLink = LINK( this, TextUnderlineControl, VSSelectHdl ) ;
maVSUnderline.SetSelectHdl(aLink);
- maVSUnderline.StartSelection();
- maVSUnderline.Show();
+ maVSUnderline.StartSelection();
+ maVSUnderline.Show();
}
-void TextUnderlineControl::GetFocus()
-{
- maVSUnderline.GrabFocus();
-}
+
void TextUnderlineControl::Rearrange(FontUnderline eLine)
{
// high contrast
@@ -160,108 +153,91 @@ void TextUnderlineControl::Rearrange(Fon
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.GrabFocus();
- break;
- case UNDERLINE_DOUBLE:
- maVSUnderline.SetItemImage(2, maIMGDoubleSel);
- maVSUnderline.SelectItem(2); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_BOLD:
- maVSUnderline.SetItemImage(3, maIMGBoldSel);
- maVSUnderline.SelectItem(3); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_DOTTED:
- maVSUnderline.SetItemImage(4, maIMGDotSel);
- maVSUnderline.SelectItem(4); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_BOLDDOTTED:
- maVSUnderline.SetItemImage(5, maIMGDotBoldSel);
- maVSUnderline.SelectItem(5); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_DASH:
- maVSUnderline.SetItemImage(6, maIMGDashSel);
- maVSUnderline.SelectItem(6); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_LONGDASH:
- maVSUnderline.SetItemImage(7, maIMGDashLongSel);
- maVSUnderline.SelectItem(7); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_DASHDOT:
- maVSUnderline.SetItemImage(8, maIMGDashDotSel);
- maVSUnderline.SelectItem(8); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_DASHDOTDOT:
- maVSUnderline.SetItemImage(9, maIMGDashDotDotSel);
- maVSUnderline.SelectItem(9); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_WAVE:
- maVSUnderline.SetItemImage(10, maIMGWaveSel);
- maVSUnderline.SelectItem(10); //add
- maVSUnderline.GrabFocus();
- break;
- case UNDERLINE_NONE:
- default:
- maVSUnderline.SelectItem(1);
- maVSUnderline.SetNoSelection();//add
- maPBOptions.GrabFocus();
- }
- maVSUnderline.StartSelection();
- //removed
- //if(mpPage->meContextType == PROPERTY_CONTEXT_SC_CELL)
- // maPBOptions.Disable();
- //else
- // maPBOptions.Enable();
- //removed end
-}
-ValueSet& TextUnderlineControl::GetValueSet()
-{
- return maVSUnderline;
+ switch(eLine)
+ {
+ case UNDERLINE_SINGLE:
+ maVSUnderline.SetItemImage(1, maIMGSingleSel);
+ maVSUnderline.SelectItem(1);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_DOUBLE:
+ maVSUnderline.SetItemImage(2, maIMGDoubleSel);
+ maVSUnderline.SelectItem(2);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_BOLD:
+ maVSUnderline.SetItemImage(3, maIMGBoldSel);
+ maVSUnderline.SelectItem(3);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_DOTTED:
+ maVSUnderline.SetItemImage(4, maIMGDotSel);
+ maVSUnderline.SelectItem(4);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_BOLDDOTTED:
+ maVSUnderline.SetItemImage(5, maIMGDotBoldSel);
+ maVSUnderline.SelectItem(5);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_DASH:
+ maVSUnderline.SetItemImage(6, maIMGDashSel);
+ maVSUnderline.SelectItem(6);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_LONGDASH:
+ maVSUnderline.SetItemImage(7, maIMGDashLongSel);
+ maVSUnderline.SelectItem(7);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_DASHDOT:
+ maVSUnderline.SetItemImage(8, maIMGDashDotSel);
+ maVSUnderline.SelectItem(8);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_DASHDOTDOT:
+ maVSUnderline.SetItemImage(9, maIMGDashDotDotSel);
+ maVSUnderline.SelectItem(9);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_WAVE:
+ maVSUnderline.SetItemImage(10, maIMGWaveSel);
+ maVSUnderline.SelectItem(10);
+ maVSUnderline.GrabFocus();
+ break;
+ case UNDERLINE_NONE:
+ maVSUnderline.SelectItem(0);
+ maVSUnderline.GrabFocus();
+ break;
+ default:
+ maVSUnderline.SelectItem(1);
+ maVSUnderline.SetNoSelection();
+ maPBOptions.GrabFocus();
+ }
+ maVSUnderline.StartSelection();
}
-Control& TextUnderlineControl::GetPB()
-{
- return maPBOptions;
-}
-IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
-{
- if(pControl == &maVSUnderline)
- {
- 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();
- }
- return( 0L );
+IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
+{
+ if ( pControl == &maVSUnderline )
+ {
+ const sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
+ const FontUnderline eUnderline = ( iPos == 0 )
+ ? UNDERLINE_NONE
+ : (FontUnderline)(sal_uInt64)maVSUnderline.GetItemData( iPos );
+
+ SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
+
+ aLineItem.SetColor(mrTextPropertyPanel.GetUnderlineColor());
+ mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_UNDERLINE, SFX_CALLMODE_RECORD, &aLineItem, 0L);
+
+ mrTextPropertyPanel.SetUnderline(eUnderline);
+
+ mrTextPropertyPanel.EndUnderlinePopupMode();
+ }
+ return( 0L );
}
IMPL_LINK(TextUnderlineControl, PBClickHdl, PushButton *, pPBtn)
@@ -273,9 +249,7 @@ IMPL_LINK(TextUnderlineControl, PBClickH
SfxDispatcher* pDisp = mpBindings->GetDispatcher();
pDisp->Execute( SID_CHAR_DLG_EFFECT, SFX_CALLMODE_ASYNCHRON );
}
- //add
mrTextPropertyPanel.EndUnderlinePopupMode();
- //add end
}
return 0;
}
Modified: openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.hxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/text/TextUnderlineControl.hxx Sat May 18 10:12:43 2013
@@ -38,15 +38,13 @@ namespace svx{ namespace sidebar {
class TextUnderlineControl:public svx::sidebar::PopupControl
{
public:
- TextUnderlineControl (
+ TextUnderlineControl (
Window* pParent,
svx::sidebar::TextPropertyPanel& rPanel,
SfxBindings* pBindings);
- void GetFocus();
- void Rearrange(FontUnderline eLine);
- ValueSet& GetValueSet();
- Control& GetPB();
-private:
+ void Rearrange(FontUnderline eLine);
+
+private:
svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
SfxBindings* mpBindings;
ValueSet maVSUnderline;
Modified: openoffice/branches/ia2/main/svx/source/sidebar/tools/ColorControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/tools/ColorControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/tools/ColorControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/tools/ColorControl.cxx Sat May 18 10:12:43 2013
@@ -63,10 +63,8 @@ namespace {
}
return bFound ? n : -1;
}
- class JustReleaseDeleter {public:
- void operator() (XColorList*) const {/* release but don't delete pointer */}
- };
- ::boost::shared_ptr<XColorList> GetColorTable (void)
+
+ const XColorListSharedPtr GetColorTable (void)
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT(pDocSh!=NULL, "DocShell not found!");
@@ -75,13 +73,11 @@ namespace {
const SfxPoolItem* pItem = pDocSh->GetItem(SID_COLOR_TABLE);
if (pItem != NULL)
{
- XColorList* pTable = ((SvxColorTableItem*)pItem)->GetColorTable();
- if (pTable != NULL)
- return ::boost::shared_ptr<XColorList>(pTable, JustReleaseDeleter());
+ return static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
}
}
- return ::boost::shared_ptr<XColorList>(new XColorList(SvtPathOptions().GetPalettePath()));
+ return XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
}
} // end of anonymous namespace
@@ -123,42 +119,39 @@ ColorControl::~ColorControl (void)
void ColorControl::FillColors (void)
{
- ::boost::shared_ptr<XColorList> pColorTable (GetColorTable());
+ const XColorListSharedPtr aColorTable(GetColorTable());
- if (pColorTable)
- {
- const long nColorCount(pColorTable->Count());
- if (nColorCount <= 0)
- return;
+ const long nColorCount(aColorTable->Count());
+ if (nColorCount <= 0)
+ return;
- const WinBits aWinBits(maVSColor.GetStyle() | WB_TABSTOP | WB_ITEMBORDER | WB_NAMEFIELD |
- WB_NO_DIRECTSELECT | WB_MENUSTYLEVALUESET | WB_NO_DIRECTSELECT);
+ const WinBits aWinBits(maVSColor.GetStyle() | WB_TABSTOP | WB_ITEMBORDER | WB_NAMEFIELD |
+ WB_NO_DIRECTSELECT | WB_MENUSTYLEVALUESET | WB_NO_DIRECTSELECT);
- maVSColor.SetStyle(aWinBits);
+ maVSColor.SetStyle(aWinBits);
- // neds to be done *before* layouting
- if(msNoColorString.Len() > 0)
- {
- maVSColor.SetStyle(maVSColor.GetStyle() | WB_NONEFIELD);
- maVSColor.SetText(msNoColorString);
- }
+ // neds to be done *before* layouting
+ if(msNoColorString.Len() > 0)
+ {
+ maVSColor.SetStyle(maVSColor.GetStyle() | WB_NONEFIELD);
+ maVSColor.SetText(msNoColorString);
+ }
- const Size aNewSize(maVSColor.layoutAllVisible(nColorCount));
- maVSColor.SetOutputSizePixel(aNewSize);
- static sal_Int32 nAdd = 4;
-
- SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd));
- Link aLink = LINK(this, ColorControl, VSSelectHdl);
- maVSColor.SetSelectHdl(aLink);
-
- // Now, after all calls to SetStyle, we can change the
- // background color.
- maVSColor.SetBackground(Theme::GetWallpaper(Theme::Paint_DropDownBackground));
-
- // add entrties
- maVSColor.Clear();
- maVSColor.addEntriesForXColorList(*pColorTable);
- }
+ const Size aNewSize(maVSColor.layoutAllVisible(nColorCount));
+ maVSColor.SetOutputSizePixel(aNewSize);
+ static sal_Int32 nAdd = 4;
+
+ SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd));
+ Link aLink = LINK(this, ColorControl, VSSelectHdl);
+ maVSColor.SetSelectHdl(aLink);
+
+ // Now, after all calls to SetStyle, we can change the
+ // background color.
+ maVSColor.SetBackground(Theme::GetWallpaper(Theme::Paint_DropDownBackground));
+
+ // add entrties
+ maVSColor.Clear();
+ maVSColor.addEntriesForXColorList(aColorTable);
maVSColor.Show();
}
Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdedxv.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdedxv.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdedxv.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdedxv.cxx Sat May 18 10:12:43 2013
@@ -695,8 +695,6 @@ sal_Bool SdrObjEditView::SdrBeginTextEdi
// Since IsMarkHdlWhenTextEdit() is ignored, it is necessary
// to call AdjustMarkHdl() always.
AdjustMarkHdl();
- // Call <MarkListHasChanged()> as it also handles context changes for sidebar
- MarkListHasChanged();
pTextEditOutlinerView=ImpMakeOutlinerView(pWin,!bEmpty,pGivenOutlinerView);
@@ -1033,8 +1031,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEn
// Since IsMarkHdlWhenTextEdit() is ignored, it is necessary
// to call AdjustMarkHdl() always.
AdjustMarkHdl();
- // Call <MarkListHasChanged()> as it also handles context changes for sidebar
- MarkListHasChanged();
}
// alle OutlinerViews loeschen
for (sal_uIntPtr i=pTEOutliner->GetViewCount(); i>0;)
Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdfmtf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdfmtf.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdfmtf.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdfmtf.cxx Sat May 18 10:12:43 2013
@@ -75,6 +75,9 @@
#include <svx/xflbmtit.hxx>
#include <svx/xflbstit.hxx>
#include <svx/svdpntv.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdogrp.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -129,8 +132,18 @@ ImpSdrGDIMetaFileImport::~ImpSdrGDIMetaF
void ImpSdrGDIMetaFileImport::DoLoopActions(GDIMetaFile& rMtf, SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport)
{
- for( MetaAction* pAct = rMtf.FirstAction(); pAct; pAct = rMtf.NextAction() )
- {
+ const sal_uLong nCount(rMtf.GetActionCount());
+
+ for(sal_uLong a(0); a < nCount; a++)
+ {
+ MetaAction* pAct = rMtf.GetAction(a);
+
+ if(!pAct)
+ {
+ OSL_ENSURE(false, "OOps, no action at valid position (!)");
+ pAct = rMtf.GetAction(0);
+ }
+
switch (pAct->GetType())
{
case META_PIXEL_ACTION : DoAction((MetaPixelAction &)*pAct); break;
@@ -474,56 +487,130 @@ void ImpSdrGDIMetaFileImport::InsertObj(
const SdrLayerID aOldLayer(pObj->GetLayer());
const SfxItemSet aOldItemSet(pObj->GetMergedItemSet());
const SdrGrafObj* pSdrGrafObj = dynamic_cast< SdrGrafObj* >(pObj);
- BitmapEx aBitmapEx;
+ const SdrTextObj* pSdrTextObj = dynamic_cast< SdrTextObj* >(pObj);
- if(pSdrGrafObj)
+ if(pSdrTextObj && pSdrTextObj->HasText())
{
- aBitmapEx = pSdrGrafObj->GetGraphic().GetBitmapEx();
- }
+ // all text objects are created from ImportText and have no line or fill attributes, so
+ // it is okay to concentrate on the text itself
+ while(true)
+ {
+ const basegfx::B2DPolyPolygon aTextContour(pSdrTextObj->TakeContour());
+ const basegfx::B2DRange aTextRange(aTextContour.getB2DRange());
+ const basegfx::B2DRange aClipRange(maClip.getB2DRange());
- SdrObject::Free(pObj);
+ // no overlap -> completely outside
+ if(!aClipRange.overlaps(aTextRange))
+ {
+ SdrObject::Free(pObj);
+ break;
+ }
- if(!aOldRange.isEmpty())
+ // when the clip is a rectangle fast check for inside is possible
+ if(basegfx::tools::isRectangle(maClip) && aClipRange.isInside(aTextRange))
+ {
+ // completely inside ClipRect
+ break;
+ }
+
+ // here text needs to be clipped; to do so, convert to SdrObjects with polygons
+ // and add these recursively. Delete original object, do not add in this run
+ SdrObject* pConverted = pSdrTextObj->ConvertToPolyObj(true, true);
+ SdrObject::Free(pObj);
+
+ if(pConverted)
+ {
+ // recursively add created conversion; per definition this shall not
+ // contain further SdrTextObjs. Visit only non-group objects
+ SdrObjListIter aIter(*pConverted, IM_DEEPNOGROUPS);
+
+ // work with clones; the created conversion may contain group objects
+ // and when working with the original objects the loop itself could
+ // break and the cleanup later would be pretty complicated (only delete group
+ // objects, are these empty, ...?)
+ while(aIter.IsMore())
+ {
+ SdrObject* pCandidate = aIter.Next();
+ OSL_ENSURE(pCandidate && 0 == dynamic_cast< SdrObjGroup* >(pCandidate), "SdrObjListIter with IM_DEEPNOGROUPS error (!)");
+ SdrObject* pNewClone = pCandidate->Clone();
+
+ if(pNewClone)
+ {
+ InsertObj(pNewClone, false);
+ }
+ else
+ {
+ OSL_ENSURE(false, "SdrObject::Clone() failed (!)");
+ }
+ }
+
+ // cleanup temporary conversion objects
+ SdrObject::Free(pConverted);
+ }
+
+ break;
+ }
+ }
+ else
{
- // clip against ClipRegion
- const basegfx::B2DPolyPolygon aNewPoly(
- basegfx::tools::clipPolyPolygonOnPolyPolygon(
- aPoly,
- maClip,
- true,
- aPoly.isClosed() ? false : true));
- const basegfx::B2DRange aNewRange(aNewPoly.getB2DRange());
-
- if(!aNewRange.isEmpty())
+ BitmapEx aBitmapEx;
+
+ if(pSdrGrafObj)
{
- pObj = new SdrPathObj(
- aNewPoly.isClosed() ? OBJ_POLY : OBJ_PLIN,
- aNewPoly);
-
- pObj->SetLayer(aOldLayer);
- pObj->SetMergedItemSet(aOldItemSet);
+ aBitmapEx = pSdrGrafObj->GetGraphic().GetBitmapEx();
+ }
+
+ SdrObject::Free(pObj);
- if(!!aBitmapEx)
+ if(!aOldRange.isEmpty())
+ {
+ // clip against ClipRegion
+ const basegfx::B2DPolyPolygon aNewPoly(
+ basegfx::tools::clipPolyPolygonOnPolyPolygon(
+ aPoly,
+ maClip,
+ true,
+ aPoly.isClosed() ? false : true));
+ const basegfx::B2DRange aNewRange(aNewPoly.getB2DRange());
+
+ if(!aNewRange.isEmpty())
{
- // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used
- const double fScaleX(aBitmapEx.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0));
- const double fScaleY(aBitmapEx.GetSizePixel().Height() / (aOldRange.getHeight() ? aOldRange.getHeight() : 1.0));
- basegfx::B2DRange aPixel(aNewRange);
- basegfx::B2DHomMatrix aTrans;
-
- aTrans.translate(-aOldRange.getMinX(), -aOldRange.getMinY());
- aTrans.scale(fScaleX, fScaleY);
- aPixel.transform(aTrans);
-
- const BitmapEx aClippedBitmap(
- aBitmapEx,
- Point(floor(std::max(0.0, aPixel.getMinX())), floor(std::max(0.0, aPixel.getMinY()))),
- Size(ceil(aPixel.getWidth()), ceil(aPixel.getHeight())));
-
- pObj->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
- pObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aClippedBitmap)));
- pObj->SetMergedItem(XFillBmpTileItem(false));
- pObj->SetMergedItem(XFillBmpStretchItem(true));
+ pObj = new SdrPathObj(
+ aNewPoly.isClosed() ? OBJ_POLY : OBJ_PLIN,
+ aNewPoly);
+
+ pObj->SetLayer(aOldLayer);
+ pObj->SetMergedItemSet(aOldItemSet);
+
+ if(!!aBitmapEx)
+ {
+ // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used
+ const double fScaleX(aBitmapEx.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0));
+ const double fScaleY(aBitmapEx.GetSizePixel().Height() / (aOldRange.getHeight() ? aOldRange.getHeight() : 1.0));
+ basegfx::B2DRange aPixel(aNewRange);
+ basegfx::B2DHomMatrix aTrans;
+
+ aTrans.translate(-aOldRange.getMinX(), -aOldRange.getMinY());
+ aTrans.scale(fScaleX, fScaleY);
+ aPixel.transform(aTrans);
+
+ const Size aOrigSizePixel(aBitmapEx.GetSizePixel());
+ const Point aClipTopLeft(
+ basegfx::fround(floor(std::max(0.0, aPixel.getMinX()))),
+ basegfx::fround(floor(std::max(0.0, aPixel.getMinY()))));
+ const Size aClipSize(
+ basegfx::fround(ceil(std::min((double)aOrigSizePixel.Width(), aPixel.getWidth()))),
+ basegfx::fround(ceil(std::min((double)aOrigSizePixel.Height(), aPixel.getHeight()))));
+ const BitmapEx aClippedBitmap(
+ aBitmapEx,
+ aClipTopLeft,
+ aClipSize);
+
+ pObj->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
+ pObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aClippedBitmap)));
+ pObj->SetMergedItem(XFillBmpTileItem(false));
+ pObj->SetMergedItem(XFillBmpStretchItem(true));
+ }
}
}
}
@@ -942,19 +1029,22 @@ void ImpSdrGDIMetaFileImport::ImportText
Rectangle aTextRect( aPos, aSize );
SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect );
- if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) )
+ pText->SetMergedItem ( SdrTextUpperDistItem (0));
+ pText->SetMergedItem ( SdrTextLowerDistItem (0));
+ pText->SetMergedItem ( SdrTextRightDistItem (0));
+ pText->SetMergedItem ( SdrTextLeftDistItem (0));
+
+ if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) )
{
pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH );
pText->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
// don't let the margins eat the space needed for the text
- pText->SetMergedItem ( SdrTextUpperDistItem (0));
- pText->SetMergedItem ( SdrTextLowerDistItem (0));
- pText->SetMergedItem ( SdrTextRightDistItem (0));
- pText->SetMergedItem ( SdrTextLeftDistItem (0));
pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) );
}
else
+ {
pText->SetMergedItem( SdrTextAutoGrowWidthItem( true ) );
+ }
pText->SetModel(mpModel);
pText->SetLayer(mnLayer);
@@ -1010,7 +1100,11 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
- InsertObj(pGraf);
+
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
+ InsertObj(pGraf);
}
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct)
@@ -1018,7 +1112,11 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
- InsertObj(pGraf);
+
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
+ InsertObj(pGraf);
}
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct)
@@ -1026,7 +1124,11 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
- InsertObj(pGraf);
+
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
+ InsertObj(pGraf);
}
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction& rAct)
@@ -1034,6 +1136,10 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
+
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
@@ -1158,23 +1264,19 @@ void ImpSdrGDIMetaFileImport::DoAction(
aXGradient.SetEndIntens(rGrad.GetEndIntensity());
aXGradient.SetSteps(rGrad.GetSteps());
- if(maVD.IsLineColor())
- {
- // switch line off; when there was one there will be a
- // META_POLYLINE_ACTION following creating another object
- const Color aLineColor(maVD.GetLineColor());
- maVD.SetLineColor();
- SetAttributes(pPath);
- maVD.SetLineColor(aLineColor);
- }
- else
- {
- SetAttributes(pPath);
- }
+ // no need to use SetAttributes(..) here since line and fill style
+ // need to be set individually
+ // SetAttributes(pPath);
+
+ // switch line off; when there was one there will be a
+ // META_POLYLINE_ACTION following creating another object
+ aGradAttr.Put(XLineStyleItem(XLINE_NONE));
+
+ // add detected gradient fillstyle
+ aGradAttr.Put(XFillStyleItem(XFILL_GRADIENT));
+ aGradAttr.Put(XFillGradientItem(&mpModel->GetItemPool(), aXGradient));
- aGradAttr.Put(XFillStyleItem(XFILL_GRADIENT));
- aGradAttr.Put(XFillGradientItem(&mpModel->GetItemPool(), aXGradient));
- pPath->SetMergedItemSet(aGradAttr);
+ pPath->SetMergedItemSet(aGradAttr);
InsertObj(pPath);
}
@@ -1215,9 +1317,11 @@ void ImpSdrGDIMetaFileImport::DoAction(M
aRect.Right()++;
aRect.Bottom()++;
aBitmap.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
-
SdrGrafObj* pGraf = new SdrGrafObj(aBitmap, aRect);
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
@@ -1229,9 +1333,11 @@ void ImpSdrGDIMetaFileImport::DoAction(M
aRect.Right()++;
aRect.Bottom()++;
aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
-
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
@@ -1240,11 +1346,12 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
- aRect.Right()++;
- aRect.Bottom()++;
-
+ aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
@@ -1253,11 +1360,12 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetPoint(), rAct.GetSize());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
- aRect.Right()++;
- aRect.Bottom()++;
-
+ aRect.Right()++; aRect.Bottom()++;
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
@@ -1266,12 +1374,13 @@ void ImpSdrGDIMetaFileImport::DoAction(M
Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
- aRect.Right()++;
- aRect.Bottom()++;
+ aRect.Right()++; aRect.Bottom()++;
aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
-
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
+ // This action is not creating line and fill, set directly, do not use SetAttributes(..)
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
@@ -1417,6 +1526,9 @@ void ImpSdrGDIMetaFileImport::DoAction(M
{
const Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+ Rectangle aHairline;
+ const Rectangle aBoundRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), &aHairline));
+
// convert metafile sub-content to BitmapEx
BitmapEx aBitmapEx(
convertMetafileToBitmapEx(
@@ -1585,6 +1697,11 @@ void ImpSdrGDIMetaFileImport::DoAction(M
// create and add object
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
+ // for MetaFloatTransparentAction, do not use SetAttributes(...)
+ // since these metafile content is not used to draw line/fill
+ // dependent of these setting at the device content
+ pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE));
InsertObj(pGraf);
}
}
Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx Sat May 18 10:12:43 2013
@@ -109,8 +109,7 @@ struct SdrModelImpl
DBG_NAME(SdrModel)
TYPEINIT1(SdrModel,SfxBroadcaster);
-void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbeddedHelper,
- bool bUseExtColorTable, bool bLoadRefCounts)
+void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbeddedHelper,bool bLoadRefCounts)
{
mpImpl = new SdrModelImpl;
mpImpl->mpUndoManager=0;
@@ -144,7 +143,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPoo
mbUndoEnabled=true;
nProgressPercent=0;
nLoadVersion=0;
- bExtColorTable=sal_False;
mbChanged = sal_False;
bInfoChanged=sal_False;
bPagNumsDirty=sal_False;
@@ -162,12 +160,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPoo
nStreamCompressMode=COMPRESSMODE_NONE;
nStreamNumberFormat=NUMBERFORMAT_INT_BIGENDIAN;
nDefaultTabulator=0;
- pColorTable=NULL;
- pDashList=NULL;
- pLineEndList=NULL;
- pHatchList=NULL;
- pGradientList=NULL;
- pBitmapList=NULL;
mpNumberFormatter = NULL;
bTransparentTextFrames=sal_False;
bStarDrawPreviewMode = sal_False;
@@ -186,8 +178,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPoo
#ifdef OSL_LITENDIAN
nStreamNumberFormat=NUMBERFORMAT_INT_LITTLEENDIAN;
#endif
- bExtColorTable=bUseExtColorTable;
-
if ( pPool == NULL )
{
pItemPool=new SdrItemPool(0L, bLoadRefCounts);
@@ -222,8 +212,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPoo
pHitTestOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
ImpSetOutlinerDefaults(pHitTestOutliner, sal_True);
-
- ImpCreateTables();
}
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
@@ -235,7 +223,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, :
#endif
DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,sal_False, (FASTBOOL)bLoadRefCounts);
+ ImpCtor(pPool,pPers,(FASTBOOL)bLoadRefCounts);
}
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
@@ -248,32 +236,7 @@ SdrModel::SdrModel(const String& rPath,
#endif
DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,sal_False, (FASTBOOL)bLoadRefCounts);
-}
-
-SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts):
- maMaPag(1024,32,32),
- maPages(1024,32,32)
-{
-#ifdef TIMELOG
- RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
-#endif
-
- DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
-}
-
-SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts):
- maMaPag(1024,32,32),
- maPages(1024,32,32),
- aTablePath(rPath)
-{
-#ifdef TIMELOG
- RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
-#endif
-
- DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
+ ImpCtor(pPool,pPers,(FASTBOOL)bLoadRefCounts);
}
SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
@@ -360,15 +323,6 @@ SdrModel::~SdrModel()
if( mpForbiddenCharactersTable )
mpForbiddenCharactersTable->release();
- // Tabellen, Listen und Paletten loeschen
- if (!bExtColorTable)
- delete pColorTable;
- delete pDashList;
- delete pLineEndList;
- delete pHatchList;
- delete pGradientList;
- delete pBitmapList;
-
if(mpNumberFormatter)
delete mpNumberFormatter;
@@ -759,17 +713,6 @@ bool SdrModel::IsUndoEnabled() const
////////////////////////////////////////////////////////////////////////////////////////////////////
-void SdrModel::ImpCreateTables()
-{
- // der Writer hat seinen eigenen ColorTable
- if (!bExtColorTable) pColorTable=new XColorList(aTablePath,(XOutdevItemPool*)pItemPool);
- pDashList =new XDashList (aTablePath,(XOutdevItemPool*)pItemPool);
- pLineEndList =new XLineEndList (aTablePath,(XOutdevItemPool*)pItemPool);
- pHatchList =new XHatchList (aTablePath,(XOutdevItemPool*)pItemPool);
- pGradientList=new XGradientList(aTablePath,(XOutdevItemPool*)pItemPool);
- pBitmapList =new XBitmapList (aTablePath,(XOutdevItemPool*)pItemPool);
-}
-
// #116168#
void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
{
@@ -2170,15 +2113,97 @@ const ::com::sun::star::uno::Sequence< s
return *pSeq;
}
-//
-// i120668, move from the header files, add delete action
-//
-void SdrModel::SetColorTable(XColorList* pTable) { delete pColorTable; pColorTable=pTable; }
-void SdrModel::SetDashList(XDashList* pList) { delete pDashList; pDashList=pList; }
-void SdrModel::SetLineEndList(XLineEndList* pList) { delete pLineEndList; pLineEndList=pList; }
-void SdrModel::SetHatchList(XHatchList* pList) { delete pHatchList; pHatchList=pList; }
-void SdrModel::SetGradientList(XGradientList* pList) { delete pGradientList; pGradientList=pList; }
-void SdrModel::SetBitmapList(XBitmapList* pList) { delete pBitmapList; pBitmapList=pList; }
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrModel::SetColorTableAtSdrModel(XColorListSharedPtr aTable)
+{
+ maColorTable = aTable;
+}
+
+XColorListSharedPtr SdrModel::GetColorTableFromSdrModel() const
+{
+ if(!maColorTable.get())
+ {
+ const_cast< SdrModel* >(this)->maColorTable = XPropertyListFactory::CreateSharedXColorList(aTablePath);
+ }
+
+ return maColorTable;
+}
+
+void SdrModel::SetDashListAtSdrModel(XDashListSharedPtr aList)
+{
+ maDashList = aList;
+}
+
+XDashListSharedPtr SdrModel::GetDashListFromSdrModel() const
+{
+ if(!maDashList.get())
+ {
+ const_cast< SdrModel* >(this)->maDashList = XPropertyListFactory::CreateSharedXDashList(aTablePath);
+ }
+
+ return maDashList;
+}
+
+void SdrModel::SetLineEndListAtSdrModel(XLineEndListSharedPtr aList)
+{
+ maLineEndList = aList;
+}
+
+XLineEndListSharedPtr SdrModel::GetLineEndListFromSdrModel() const
+{
+ if(!maLineEndList.get())
+ {
+ const_cast< SdrModel* >(this)->maLineEndList = XPropertyListFactory::CreateSharedXLineEndList(aTablePath);
+ }
+
+ return maLineEndList;
+}
+
+void SdrModel::SetHatchListAtSdrModel(XHatchListSharedPtr aList)
+{
+ maHatchList = aList;
+}
+
+XHatchListSharedPtr SdrModel::GetHatchListFromSdrModel() const
+{
+ if(!maHatchList.get())
+ {
+ const_cast< SdrModel* >(this)->maHatchList = XPropertyListFactory::CreateSharedXHatchList(aTablePath);
+ }
+
+ return maHatchList;
+}
+
+void SdrModel::SetGradientListAtSdrModel(XGradientListSharedPtr aList)
+{
+ maGradientList = aList;
+}
+
+XGradientListSharedPtr SdrModel::GetGradientListFromSdrModel() const
+{
+ if(!maGradientList.get())
+ {
+ const_cast< SdrModel* >(this)->maGradientList = XPropertyListFactory::CreateSharedXGradientList(aTablePath);
+ }
+
+ return maGradientList;
+}
+
+void SdrModel::SetBitmapListAtSdrModel(XBitmapListSharedPtr aList)
+{
+ maBitmapList = aList;
+}
+
+XBitmapListSharedPtr SdrModel::GetBitmapListFromSdrModel() const
+{
+ if(!maBitmapList.get())
+ {
+ const_cast< SdrModel* >(this)->maBitmapList = XPropertyListFactory::CreateSharedXBitmapList(aTablePath);
+ }
+
+ return maBitmapList;
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdmrkv.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdmrkv.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdmrkv.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdmrkv.cxx Sat May 18 10:12:43 2013
@@ -54,6 +54,7 @@
#include <svx/sdrpaintwindow.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svx/sdrhittesthelper.hxx>
+#include <svx/svdocapt.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
// predefines
@@ -715,6 +716,12 @@ void SdrMarkView::SetMarkHandles()
}
}
}
+
+ // #122142# for captions in TextEdit, force to FrameHdls to get the special text selection
+ if(!bFrmHdl && pMarkedObj && bSingleTextObjMark && dynamic_cast< SdrCaptionObj* >(pMarkedObj))
+ {
+ bFrmHdl = true;
+ }
if (bFrmHdl)
{
Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdorect.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdorect.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdorect.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdorect.cxx Sat May 18 10:12:43 2013
@@ -330,6 +330,7 @@ SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nH
{
case 0:
{
+ OSL_ENSURE(!IsTextEditActive(), "Do not use a ImpTextframeHdl for hilighting text in active text edit, this will collide with EditEngine paints (!)");
pH = new ImpTextframeHdl(aRect);
pH->SetObj((SdrObject*)this);
pH->SetDrehWink(aGeo.nDrehWink);
Modified: openoffice/branches/ia2/main/svx/source/tbxctrls/SvxColorValueSet.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/tbxctrls/SvxColorValueSet.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/tbxctrls/SvxColorValueSet.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/tbxctrls/SvxColorValueSet.cxx Sat May 18 10:12:43 2013
@@ -61,13 +61,13 @@ sal_uInt32 SvxColorValueSet::getColumnCo
return rStyleSettings.GetColorValueSetColumnCount();
}
-void SvxColorValueSet::addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex)
+void SvxColorValueSet::addEntriesForXColorList(const XColorListSharedPtr aXColorList, sal_uInt32 nStartIndex)
{
- const sal_uInt32 nColorCount(rXColorList.Count());
+ const sal_uInt32 nColorCount(aXColorList ? aXColorList->Count() : 0);
for(sal_uInt32 nIndex(0); nIndex < nColorCount; nIndex++, nStartIndex++)
{
- const XColorEntry* pEntry = rXColorList.GetColor(nIndex);
+ const XColorEntry* pEntry = aXColorList->GetColor(nIndex);
if(pEntry)
{
Modified: openoffice/branches/ia2/main/svx/source/tbxctrls/colrctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/tbxctrls/colrctrl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/tbxctrls/colrctrl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/tbxctrls/colrctrl.cxx Sat May 18 10:12:43 2013
@@ -257,7 +257,7 @@ SvxColorDockingWindow::SvxColorDockingWi
SfxDockingWindow( _pBindings, pCW, _pParent, rResId ),
- pColorTable ( NULL ),
+ maColorTable(),
aColorSet ( this, ResId( 1, *rResId.GetResMgr() ) ),
nLeftSlot ( SID_ATTR_FILL_COLOR ),
nRightSlot ( SID_ATTR_LINE_COLOR ),
@@ -293,7 +293,7 @@ SvxColorDockingWindow::SvxColorDockingWi
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
if( pItem )
{
- pColorTable = ( (SvxColorTableItem*) pItem )->GetColorTable();
+ maColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
FillValueSet();
}
}
@@ -334,7 +334,7 @@ void SvxColorDockingWindow::Notify( SfxB
&& ( pPoolItemHint->GetObject()->ISA( SvxColorTableItem ) ) )
{
// Die Liste der Farben hat sich geaendert
- pColorTable = ( (SvxColorTableItem*) pPoolItemHint->GetObject() )->GetColorTable();
+ maColorTable = static_cast< SvxColorTableItem* >(pPoolItemHint->GetObject())->GetColorTable();
FillValueSet();
}
}
@@ -347,9 +347,9 @@ void SvxColorDockingWindow::Notify( SfxB
void SvxColorDockingWindow::FillValueSet()
{
- if( pColorTable )
+ if( maColorTable.get() )
{
- nCount = pColorTable->Count();
+ nCount = maColorTable->Count();
aColorSet.Clear();
// create the first entry for 'invisible/none'
@@ -367,7 +367,7 @@ void SvxColorDockingWindow::FillValueSet
Bitmap aBmp( aVD.GetBitmap( Point(), aColorSize ) );
aColorSet.InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
- aColorSet.addEntriesForXColorList(*pColorTable, 2);
+ aColorSet.addEntriesForXColorList(maColorTable, 2);
}
}
Modified: openoffice/branches/ia2/main/svx/source/tbxctrls/fillctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/tbxctrls/fillctrl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/tbxctrls/fillctrl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/tbxctrls/fillctrl.cxx Sat May 18 10:12:43 2013
@@ -329,21 +329,17 @@ void SvxFillToolBoxControl::Update( cons
aTmpStr += TMP_STR_END;
XGradientEntry* pEntry = new XGradientEntry( pGradientItem->GetGradientValue(), aTmpStr );
- String aEmptyString = String();
- XGradientList aGradientList( aEmptyString );
- aGradientList.Insert( pEntry );
- aGradientList.SetDirty( sal_False );
- const Bitmap aBmp = aGradientList.GetUiBitmap( 0 );
+ XGradientListSharedPtr aGradientList(XPropertyListFactory::CreateSharedXGradientList(String::CreateFromAscii("TmpList")));
+
+ aGradientList->Insert(pEntry);
+ aGradientList->SetDirty(false);
+ const Bitmap aBmp = aGradientList->GetUiBitmap( 0 );
if( !aBmp.IsEmpty() )
{
( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), aBmp );
pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
- //delete pBmp;
}
-
- aGradientList.Remove( 0 );
- delete pEntry;
}
// NEU
}
@@ -379,21 +375,17 @@ void SvxFillToolBoxControl::Update( cons
aTmpStr += TMP_STR_END;
XHatchEntry* pEntry = new XHatchEntry( pHatchItem->GetHatchValue(), aTmpStr );
- String aEmptyString = String();
- XHatchList aHatchList( aEmptyString );
- aHatchList.Insert( pEntry );
- aHatchList.SetDirty( sal_False );
- const Bitmap aBmp = aHatchList.GetUiBitmap( 0 );
+ XHatchListSharedPtr aHatchList(XPropertyListFactory::CreateSharedXHatchList(String::CreateFromAscii("TmpList")));
+
+ aHatchList->Insert( pEntry );
+ aHatchList->SetDirty( sal_False );
+ const Bitmap aBmp = aHatchList->GetUiBitmap( 0 );
if( !aBmp.IsEmpty() )
{
( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), aBmp );
pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
- //delete pBmp;
}
-
- aHatchList.Remove( 0 );
- delete pEntry;
}
// NEU
}
@@ -435,14 +427,12 @@ void SvxFillToolBoxControl::Update( cons
aTmpStr += aString;
aTmpStr += TMP_STR_END;
- XBitmapEntry* pEntry = new XBitmapEntry(pBitmapItem->GetGraphicObject(), aTmpStr);
- XBitmapList aBitmapList( String::CreateFromAscii("TmpList") );
- aBitmapList.Insert( pEntry );
- aBitmapList.SetDirty( sal_False );
- pFillAttrLB->Fill( &aBitmapList );
- pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
- aBitmapList.Remove( 0 );
- delete pEntry;
+ XBitmapListSharedPtr aNew(XPropertyListFactory::CreateSharedXBitmapList(String::CreateFromAscii("TmpList")));
+ aNew->Insert(new XBitmapEntry(pBitmapItem->GetGraphicObject(), aTmpStr));
+ aNew->SetDirty(false);
+
+ pFillAttrLB->Fill( aNew );
+ pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
}
// NEU
}
Modified: openoffice/branches/ia2/main/svx/source/tbxctrls/fontworkgallery.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/tbxctrls/fontworkgallery.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/tbxctrls/fontworkgallery.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/tbxctrls/fontworkgallery.cxx Sat May 18 10:12:43 2013
@@ -121,6 +121,8 @@ void FontWorkGalleryDialog::initFavorite
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::initFavorite
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.GetPreviewUsesCheckeredBackground())
+ {
+ 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));
}
}
Modified: openoffice/branches/ia2/main/svx/source/tbxctrls/linectrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/tbxctrls/linectrl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/tbxctrls/linectrl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/tbxctrls/linectrl.cxx Sat May 18 10:12:43 2013
@@ -379,7 +379,7 @@ SvxLineEndWindow::SvxLineEndWindow(
SfxPopupWindow( nSlotId,
rFrame,
WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ),
- pLineEndList ( NULL ),
+ maLineEndList(),
aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
nCols ( 2 ),
nLines ( 12 ),
@@ -401,7 +401,7 @@ SvxLineEndWindow::SvxLineEndWindow(
rFrame,
pParentWindow,
WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ),
- pLineEndList ( NULL ),
+ maLineEndList(),
aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
nCols ( 2 ),
nLines ( 12 ),
@@ -426,13 +426,13 @@ void SvxLineEndWindow::implInit()
{
pItem = pDocSh->GetItem( SID_LINEEND_LIST );
if( pItem )
- pLineEndList = ( (SvxLineEndListItem*) pItem )->GetLineEndList();
+ maLineEndList = static_cast< const SvxLineEndListItem* >(pItem)->GetLineEndList();
pItem = pDocSh->GetItem( SID_ATTR_LINEEND_WIDTH_DEFAULT );
if( pItem )
nLineEndWidth = ( (SfxUInt16Item*) pItem )->GetValue();
}
- DBG_ASSERT( pLineEndList, "LineEndList wurde nicht gefunden" );
+ DBG_ASSERT( maLineEndList.get(), "LineEndList wurde nicht gefunden" );
aLineEndSet.SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
aLineEndSet.SetColCount( nCols );
@@ -475,12 +475,12 @@ IMPL_LINK( SvxLineEndWindow, SelectHdl,
}
else if( nId % 2 ) // LinienAnfang
{
- XLineEndEntry* pEntry = pLineEndList->GetLineEnd( ( nId - 1 ) / 2 - 1 );
+ XLineEndEntry* pEntry = maLineEndList->GetLineEnd( ( nId - 1 ) / 2 - 1 );
pLineStartItem = new XLineStartItem( pEntry->GetName(), pEntry->GetLineEnd() );
}
else // LinienEnde
{
- XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nId / 2 - 2 );
+ XLineEndEntry* pEntry = maLineEndList->GetLineEnd( nId / 2 - 2 );
pLineEndItem = new XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() );
}
@@ -522,19 +522,19 @@ IMPL_LINK( SvxLineEndWindow, SelectHdl,
void SvxLineEndWindow::FillValueSet()
{
- if( pLineEndList )
+ if(maLineEndList.get())
{
XLineEndEntry* pEntry = NULL;
VirtualDevice aVD;
- long nCount = pLineEndList->Count();
+ long nCount = maLineEndList->Count();
// Erster Eintrag: kein LinienEnde
// Temporaer wird ein Eintrag hinzugefuegt, um die UI-Bitmap zu erhalten
basegfx::B2DPolyPolygon aNothing;
- pLineEndList->Insert( new XLineEndEntry( aNothing, SVX_RESSTR( RID_SVXSTR_NONE ) ) );
- pEntry = pLineEndList->GetLineEnd( nCount );
- Bitmap aBmp = pLineEndList->GetUiBitmap( nCount );
+ maLineEndList->Insert( new XLineEndEntry( aNothing, SVX_RESSTR( RID_SVXSTR_NONE ) ) );
+ pEntry = maLineEndList->GetLineEnd( nCount );
+ Bitmap aBmp = maLineEndList->GetUiBitmap( nCount );
OSL_ENSURE( !aBmp.IsEmpty(), "UI-Bitmap wurde nicht erzeugt" );
aBmpSize = aBmp.GetSizePixel();
@@ -547,13 +547,13 @@ void SvxLineEndWindow::FillValueSet()
aLineEndSet.InsertItem( 1, aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
aLineEndSet.InsertItem( 2, aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
- delete pLineEndList->Remove( nCount );
+ delete maLineEndList->Remove( nCount );
for( long i = 0; i < nCount; i++ )
{
- pEntry = pLineEndList->GetLineEnd( i );
+ pEntry = maLineEndList->GetLineEnd( i );
DBG_ASSERT( pEntry, "Konnte auf LineEndEntry nicht zugreifen" );
- aBmp = pLineEndList->GetUiBitmap( i );
+ aBmp = maLineEndList->GetUiBitmap( i );
OSL_ENSURE( !aBmp.IsEmpty(), "UI-Bitmap wurde nicht erzeugt" );
aVD.DrawBitmap( aPt0, aBmp );
@@ -664,8 +664,8 @@ void SvxLineEndWindow::StateChanged(
// Die Liste der LinienEnden (LineEndList) hat sich geaendert:
if ( pState && pState->ISA( SvxLineEndListItem ))
{
- pLineEndList = ((SvxLineEndListItem*)pState)->GetLineEndList();
- DBG_ASSERT( pLineEndList, "LineEndList nicht gefunden" );
+ maLineEndList = static_cast< const SvxLineEndListItem* >(pState)->GetLineEndList();
+ DBG_ASSERT( maLineEndList.get(), "LineEndList nicht gefunden" );
aLineEndSet.Clear();
FillValueSet();
Modified: openoffice/branches/ia2/main/svx/source/tbxctrls/tbcontrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/tbxctrls/tbcontrl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/tbxctrls/tbcontrl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/tbxctrls/tbcontrl.cxx Sat May 18 10:12:43 2013
@@ -830,17 +830,15 @@ SvxColorWindow_Impl::SvxColorWindow_Impl
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem = NULL;
- XColorList* pColorTable = NULL;
- sal_Bool bKillTable = sal_False;
+ XColorListSharedPtr aColorTable;
if ( pDocSh )
if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
- if ( !pColorTable )
+ if ( !aColorTable )
{
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- bKillTable = sal_True;
+ aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
}
if ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId )
@@ -870,16 +868,16 @@ SvxColorWindow_Impl::SvxColorWindow_Impl
aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) );
}
- if ( pColorTable )
+ if ( aColorTable )
{
- const long nColorCount(pColorTable->Count());
+ const long nColorCount(aColorTable->Count());
const Size aNewSize(aColorSet.layoutAllVisible(nColorCount));
aColorSet.SetOutputSizePixel(aNewSize);
static sal_Int32 nAdd = 4;
SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd));
aColorSet.Clear();
- aColorSet.addEntriesForXColorList(*pColorTable);
+ aColorSet.addEntriesForXColorList(aColorTable);
}
aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) );
@@ -888,9 +886,6 @@ SvxColorWindow_Impl::SvxColorWindow_Impl
SetText( rWndTitle );
aColorSet.Show();
AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColorTableState" )));
-
- if ( bKillTable )
- delete pColorTable;
}
SvxColorWindow_Impl::~SvxColorWindow_Impl()
@@ -989,19 +984,24 @@ void SvxColorWindow_Impl::StateChanged(
{
if (( nSID == SID_COLOR_TABLE ) && ( pState->ISA( SvxColorTableItem )))
{
- XColorList* pColorTable = pState ? ((SvxColorTableItem *)pState)->GetColorTable() : NULL;
+ XColorListSharedPtr aColorTable;
+
+ if(pState)
+ {
+ aColorTable = static_cast< const SvxColorTableItem* >(pState)->GetColorTable();
+ }
- if ( pColorTable )
+ if ( aColorTable )
{
// Die Liste der Farben (ColorTable) hat sich ge"andert:
- const long nColorCount(pColorTable->Count());
+ const long nColorCount(aColorTable->Count());
const Size aNewSize(aColorSet.layoutAllVisible(nColorCount));
aColorSet.SetOutputSizePixel(aNewSize);
static sal_Int32 nAdd = 4;
SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd));
aColorSet.Clear();
- aColorSet.addEntriesForXColorList(*pColorTable);
+ aColorSet.addEntriesForXColorList(aColorTable);
}
}
}
Modified: openoffice/branches/ia2/main/svx/source/unodraw/XPropertyTable.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/unodraw/XPropertyTable.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/unodraw/XPropertyTable.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/unodraw/XPropertyTable.cxx Sat May 18 10:12:43 2013
@@ -94,7 +94,7 @@ SvxUnoXPropertyTable::~SvxUnoXPropertyTa
XPropertyEntry* SvxUnoXPropertyTable::get( long index ) const
{
if( mpList )
- return mpList->Get( index, 0 );
+ return mpList->Get( index );
else
return NULL;
}
@@ -156,7 +156,7 @@ void SAL_CALL SvxUnoXPropertyTable::remo
if( pEntry && pEntry->GetName() == aInternalName )
{
if( mpList )
- delete mpList->Remove( i, 0 );
+ delete mpList->Remove( i );
return;
}
}
Modified: openoffice/branches/ia2/main/svx/source/unodraw/unoctabl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/unodraw/unoctabl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/unodraw/unoctabl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/unodraw/unoctabl.cxx Sat May 18 10:12:43 2013
@@ -44,7 +44,7 @@ using namespace ::cppu;
class SvxUnoColorTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
{
private:
- XColorList* pTable;
+ XColorListSharedPtr maTable;
public:
SvxUnoColorTable() throw();
@@ -82,13 +82,12 @@ public:
};
SvxUnoColorTable::SvxUnoColorTable() throw()
+: maTable(XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath()))
{
- pTable = new XColorList( SvtPathOptions().GetPalettePath() );
}
SvxUnoColorTable::~SvxUnoColorTable() throw()
{
- delete pTable;
}
sal_Bool SAL_CALL SvxUnoColorTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
@@ -132,21 +131,18 @@ void SAL_CALL SvxUnoColorTable::insertBy
if( !(aElement >>= nColor) )
throw lang::IllegalArgumentException();
- if( pTable )
- {
- XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
- pTable->Insert( pEntry, pTable->Count() );
- }
+ XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
+ maTable->Insert( pEntry, maTable->Count() );
}
void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- long nIndex = pTable ? ((XPropertyList*)pTable)->Get( Name ) : -1;
+ long nIndex = maTable->GetIndex(Name);
if( nIndex == -1 )
throw container::NoSuchElementException();
- pTable->Remove( nIndex );
+ maTable->Remove( nIndex );
}
// XNameReplace
@@ -157,37 +153,37 @@ void SAL_CALL SvxUnoColorTable::replaceB
if( !(aElement >>= nColor) )
throw lang::IllegalArgumentException();
- long nIndex = pTable ? ((XPropertyList*)pTable)->Get( aName ) : -1;
+ long nIndex = maTable->GetIndex(aName);
if( nIndex == -1 )
throw container::NoSuchElementException();
XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
- delete pTable->Replace( pEntry, nIndex );
+ delete maTable->Replace( pEntry, nIndex );
}
// XNameAccess
uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- long nIndex = pTable ? ((XPropertyList*)pTable)->Get( aName ) : -1;
+ long nIndex = maTable->GetIndex(aName);
if( nIndex == -1 )
throw container::NoSuchElementException();
- XColorEntry* pEntry = ((XColorList*)pTable)->GetColor( nIndex );
+ XColorEntry* pEntry = maTable->GetColor( nIndex );
return uno::Any( (sal_Int32) pEntry->GetColor().GetRGBColor() );
}
uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames( )
throw( uno::RuntimeException )
{
- const long nCount = pTable ? pTable->Count() : 0;
+ const long nCount = maTable->Count();
uno::Sequence< OUString > aSeq( nCount );
OUString* pStrings = aSeq.getArray();
for( long nIndex = 0; nIndex < nCount; nIndex++ )
{
- XColorEntry* pEntry = pTable->GetColor( (long)nIndex );
+ XColorEntry* pEntry = maTable->GetColor( (long)nIndex );
pStrings[nIndex] = pEntry->GetName();
}
@@ -197,7 +193,7 @@ uno::Sequence< OUString > SAL_CALL SvxUn
sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName )
throw( uno::RuntimeException )
{
- long nIndex = pTable ? ((XPropertyList*)pTable)->Get( aName ) : -1;
+ long nIndex = maTable->GetIndex( aName );
return nIndex != -1;
}
@@ -211,7 +207,7 @@ uno::Type SAL_CALL SvxUnoColorTable::get
sal_Bool SAL_CALL SvxUnoColorTable::hasElements( )
throw( uno::RuntimeException )
{
- return pTable && pTable->Count() != 0;
+ return maTable->Count() != 0;
}
/**
Modified: openoffice/branches/ia2/main/svx/source/unodraw/unoprov.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/unodraw/unoprov.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/unodraw/unoprov.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/unodraw/unoprov.cxx Sat May 18 10:12:43 2013
@@ -1235,64 +1235,60 @@ bool SvxUnoConvertResourceString( int nS
static sal_uInt16 __READONLY_DATA SvxUnoColorNameDefResId[] =
{
- RID_SVXSTR_BLUEGREY_DEF,
- RID_SVXSTR_BLACK_DEF,
- RID_SVXSTR_BLUE_DEF,
- RID_SVXSTR_GREEN_DEF,
- RID_SVXSTR_CYAN_DEF,
- RID_SVXSTR_RED_DEF,
- RID_SVXSTR_MAGENTA_DEF,
- RID_SVXSTR_BROWN_DEF,
- RID_SVXSTR_GREY_DEF,
- RID_SVXSTR_LIGHTGREY_DEF,
- RID_SVXSTR_LIGHTBLUE_DEF,
- RID_SVXSTR_LIGHTGREEN_DEF,
- RID_SVXSTR_LIGHTCYAN_DEF,
- RID_SVXSTR_LIGHTRED_DEF,
- RID_SVXSTR_LIGHTMAGENTA_DEF,
- RID_SVXSTR_YELLOW_DEF,
- RID_SVXSTR_WHITE_DEF,
- RID_SVXSTR_ORANGE_DEF,
- RID_SVXSTR_VIOLET_DEF,
- RID_SVXSTR_BORDEAUX_DEF,
- RID_SVXSTR_PALE_YELLOW_DEF,
- RID_SVXSTR_PALE_GREEN_DEF,
- RID_SVXSTR_DKVIOLET_DEF,
- RID_SVXSTR_SALMON_DEF,
- RID_SVXSTR_SEABLUE_DEF,
- RID_SVXSTR_COLOR_SUN_DEF,
- RID_SVXSTR_COLOR_CHART_DEF
+ RID_SVXSTR_COLOR_BLUEGREY_DEF,
+ RID_SVXSTR_COLOR_BLACK_DEF,
+ RID_SVXSTR_COLOR_BLUE_DEF,
+ RID_SVXSTR_COLOR_GREEN_DEF,
+ RID_SVXSTR_COLOR_CYAN_DEF,
+ RID_SVXSTR_COLOR_RED_DEF,
+ RID_SVXSTR_COLOR_MAGENTA_DEF,
+ RID_SVXSTR_COLOR_GREY_DEF,
+ RID_SVXSTR_COLOR_YELLOW_DEF,
+ RID_SVXSTR_COLOR_WHITE_DEF,
+ RID_SVXSTR_COLOR_ORANGE_DEF,
+ RID_SVXSTR_COLOR_VIOLET_DEF,
+ RID_SVXSTR_COLOR_BORDEAUX_DEF,
+ RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
+ RID_SVXSTR_COLOR_PALE_GREEN_DEF,
+ RID_SVXSTR_COLOR_DARKVIOLET_DEF,
+ RID_SVXSTR_COLOR_SALMON_DEF,
+ RID_SVXSTR_COLOR_SEABLUE_DEF,
+ RID_SVXSTR_COLOR_CHART_DEF,
+ RID_SVXSTR_COLOR_PURPLE_DEF,
+ RID_SVXSTR_COLOR_SKYBLUE_DEF,
+ RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
+ RID_SVXSTR_COLOR_PINK_DEF,
+ RID_SVXSTR_COLOR_TURQUOISE_DEF,
+ RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF
};
static sal_uInt16 __READONLY_DATA SvxUnoColorNameResId[] =
{
- RID_SVXSTR_BLUEGREY,
- RID_SVXSTR_BLACK,
- RID_SVXSTR_BLUE,
- RID_SVXSTR_GREEN,
- RID_SVXSTR_CYAN,
- RID_SVXSTR_RED,
- RID_SVXSTR_MAGENTA,
- RID_SVXSTR_BROWN,
- RID_SVXSTR_GREY,
- RID_SVXSTR_LIGHTGREY,
- RID_SVXSTR_LIGHTBLUE,
- RID_SVXSTR_LIGHTGREEN,
- RID_SVXSTR_LIGHTCYAN,
- RID_SVXSTR_LIGHTRED,
- RID_SVXSTR_LIGHTMAGENTA,
- RID_SVXSTR_YELLOW,
- RID_SVXSTR_WHITE,
- RID_SVXSTR_ORANGE,
- RID_SVXSTR_VIOLET,
- RID_SVXSTR_BORDEAUX,
- RID_SVXSTR_PALE_YELLOW,
- RID_SVXSTR_PALE_GREEN,
- RID_SVXSTR_DKVIOLET,
- RID_SVXSTR_SALMON,
- RID_SVXSTR_SEABLUE,
- RID_SVXSTR_COLOR_SUN,
- RID_SVXSTR_COLOR_CHART
+ RID_SVXSTR_COLOR_BLUEGREY,
+ RID_SVXSTR_COLOR_BLACK,
+ RID_SVXSTR_COLOR_BLUE,
+ RID_SVXSTR_COLOR_GREEN,
+ RID_SVXSTR_COLOR_CYAN,
+ RID_SVXSTR_COLOR_RED,
+ RID_SVXSTR_COLOR_MAGENTA,
+ RID_SVXSTR_COLOR_GREY,
+ RID_SVXSTR_COLOR_YELLOW,
+ RID_SVXSTR_COLOR_WHITE,
+ RID_SVXSTR_COLOR_ORANGE,
+ RID_SVXSTR_COLOR_VIOLET,
+ RID_SVXSTR_COLOR_BORDEAUX,
+ RID_SVXSTR_COLOR_PALE_YELLOW,
+ RID_SVXSTR_COLOR_PALE_GREEN,
+ RID_SVXSTR_COLOR_DARKVIOLET,
+ RID_SVXSTR_COLOR_SALMON,
+ RID_SVXSTR_COLOR_SEABLUE,
+ RID_SVXSTR_COLOR_CHART,
+ RID_SVXSTR_COLOR_PURPLE,
+ RID_SVXSTR_COLOR_SKYBLUE,
+ RID_SVXSTR_COLOR_YELLOWGREEN,
+ RID_SVXSTR_COLOR_PINK,
+ RID_SVXSTR_COLOR_TURQUOISE,
+ RID_SVXSTR_COLOR_BLUE_CLASSIC
};
bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw()
Modified: openoffice/branches/ia2/main/svx/source/unodraw/unoshape.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/unodraw/unoshape.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/unodraw/unoshape.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/unodraw/unoshape.cxx Sat May 18 10:12:43 2013
@@ -1567,16 +1567,16 @@ sal_Bool SAL_CALL SvxShape::SetFillAttri
{
case XATTR_FILLBITMAP:
{
- XBitmapList* pBitmapList = pModel->GetBitmapList();
+ XBitmapListSharedPtr aBitmapList = pModel->GetBitmapListFromSdrModel();
- if( !pBitmapList )
+ if( !aBitmapList.get() )
return sal_False;
- long nPos = ((XPropertyList*)pBitmapList)->Get(aStrName);
+ long nPos = aBitmapList->GetIndex(aStrName);
if( nPos == -1 )
return sal_False;
- XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos );
+ XBitmapEntry* pEntry = aBitmapList->GetBitmap( nPos );
XFillBitmapItem aBmpItem;
aBmpItem.SetWhich( XATTR_FILLBITMAP );
aBmpItem.SetName( rName );
@@ -1586,16 +1586,16 @@ sal_Bool SAL_CALL SvxShape::SetFillAttri
}
case XATTR_FILLGRADIENT:
{
- XGradientList* pGradientList = pModel->GetGradientList();
+ XGradientListSharedPtr aGradientList = pModel->GetGradientListFromSdrModel();
- if( !pGradientList )
+ if( !aGradientList.get() )
return sal_False;
- long nPos = ((XPropertyList*)pGradientList)->Get(aStrName);
+ long nPos = aGradientList->GetIndex(aStrName);
if( nPos == -1 )
return sal_False;
- XGradientEntry* pEntry = pGradientList->GetGradient( nPos );
+ XGradientEntry* pEntry = aGradientList->GetGradient( nPos );
XFillGradientItem aGrdItem;
aGrdItem.SetWhich( XATTR_FILLGRADIENT );
aGrdItem.SetName( rName );
@@ -1605,16 +1605,16 @@ sal_Bool SAL_CALL SvxShape::SetFillAttri
}
case XATTR_FILLHATCH:
{
- XHatchList* pHatchList = pModel->GetHatchList();
+ XHatchListSharedPtr aHatchList = pModel->GetHatchListFromSdrModel();
- if( !pHatchList )
+ if( !aHatchList.get() )
return sal_False;
- long nPos = ((XPropertyList*)pHatchList)->Get(aStrName);
+ long nPos = aHatchList->GetIndex(aStrName);
if( nPos == -1 )
return sal_False;
- XHatchEntry* pEntry = pHatchList->GetHatch( nPos );
+ XHatchEntry* pEntry = aHatchList->GetHatch( nPos );
XFillHatchItem aHatchItem;
aHatchItem.SetWhich( XATTR_FILLHATCH );
aHatchItem.SetName( rName );
@@ -1625,16 +1625,16 @@ sal_Bool SAL_CALL SvxShape::SetFillAttri
case XATTR_LINEEND:
case XATTR_LINESTART:
{
- XLineEndList* pLineEndList = pModel->GetLineEndList();
+ XLineEndListSharedPtr aLineEndList = pModel->GetLineEndListFromSdrModel();
- if( !pLineEndList )
+ if( !aLineEndList.get() )
return sal_False;
- long nPos = ((XPropertyList*)pLineEndList)->Get(aStrName);
+ long nPos = aLineEndList->GetIndex(aStrName);
if( nPos == -1 )
return sal_False;
- XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nPos );
+ XLineEndEntry* pEntry = aLineEndList->GetLineEnd( nPos );
if( XATTR_LINEEND == nWID )
{
XLineEndItem aLEItem;
@@ -1656,16 +1656,16 @@ sal_Bool SAL_CALL SvxShape::SetFillAttri
}
case XATTR_LINEDASH:
{
- XDashList* pDashList = pModel->GetDashList();
+ XDashListSharedPtr aDashList = pModel->GetDashListFromSdrModel();
- if( !pDashList )
+ if( !aDashList.get() )
return sal_False;
- long nPos = ((XPropertyList*)pDashList)->Get(aStrName);
+ long nPos = aDashList->GetIndex(aStrName);
if( nPos == -1 )
return sal_False;
- XDashEntry* pEntry = pDashList->GetDash( nPos );
+ XDashEntry* pEntry = aDashList->GetDash( nPos );
XLineDashItem aDashItem;
aDashItem.SetWhich( XATTR_LINEDASH );
aDashItem.SetName( rName );
Modified: openoffice/branches/ia2/main/svx/source/xoutdev/xattr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/xoutdev/xattr.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/xoutdev/xattr.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/xoutdev/xattr.cxx Sat May 18 10:12:43 2013
@@ -283,7 +283,7 @@ String NameOrIndex::CheckNamedItem( cons
int nIndex;
for( nIndex = 0; nIndex < nCount; nIndex++ )
{
- XPropertyEntry* pEntry = pDefaults->Get( nIndex, 0 );
+ XPropertyEntry* pEntry = pDefaults->Get( nIndex );
if( pEntry )
{
bool bFound = false;
@@ -475,13 +475,26 @@ SvStream& XColorItem::Store( SvStream& r
|*
\************************************************************************/
-const Color& XColorItem::GetColorValue(const XColorList* pTable) const
+const Color& XColorItem::GetColorValue() const
{
- if (!IsIndex())
- return aColor;
- else
- return pTable->GetColor(GetIndex())->GetColor();
+ if(!IsIndex())
+ {
+ return aColor;
+ }
+
+ OSL_ENSURE(false, "Acces to Indexed XColorItem needs to use the call which hands over a XColorListSharedPtr (!)");
+
+ return aColor;
+}
+
+const Color& XColorItem::GetColorValue(const XColorListSharedPtr aTable) const
+{
+ if(!IsIndex())
+ {
+ return aColor;
+ }
+ return aTable->GetColor(GetIndex())->GetColor();
}
sal_Bool XColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1369,7 +1382,7 @@ XLineDashItem* XLineDashItem::checkForUn
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XLineDashItem::CompareValueFunc,
RID_SVXSTR_DASH11,
- pModel->GetDashList() );
+ pModel->GetDashListFromSdrModel().get() );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
@@ -4013,7 +4026,7 @@ XFillGradientItem* XFillGradientItem::ch
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XFillGradientItem::CompareValueFunc,
RID_SVXSTR_GRADIENT,
- pModel->GetGradientList() );
+ pModel->GetGradientListFromSdrModel().get() );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
@@ -4654,7 +4667,7 @@ XFillHatchItem* XFillHatchItem::checkFor
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XFillHatchItem::CompareValueFunc,
RID_SVXSTR_HATCH10,
- pModel->GetHatchList() );
+ pModel->GetHatchListFromSdrModel().get() );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
Modified: openoffice/branches/ia2/main/svx/source/xoutdev/xattr2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/xoutdev/xattr2.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/xoutdev/xattr2.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/xoutdev/xattr2.cxx Sat May 18 10:12:43 2013
@@ -222,6 +222,9 @@ SfxItemPresentation XLineJointItem::GetP
case( com::sun::star::drawing::LineJoint_ROUND ):
nId = RID_SVXSTR_LINEJOINT_ROUND;
break;
+
+ default:
+ break;
}
if( nId )
Modified: openoffice/branches/ia2/main/svx/source/xoutdev/xattrbmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/xoutdev/xattrbmp.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/xoutdev/xattrbmp.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/xoutdev/xattrbmp.cxx Sat May 18 10:12:43 2013
@@ -95,11 +95,11 @@ Bitmap createHistorical8x8FromArray(cons
{
if(pArray[(a * 8) + b])
{
- pContent->SetPixelIndex(b, a, 1);
+ pContent->SetPixelIndex(a, b, 1);
}
else
{
- pContent->SetPixelIndex(b, a, 0);
+ pContent->SetPixelIndex(a, b, 0);
}
}
}
@@ -459,7 +459,7 @@ XFillBitmapItem* XFillBitmapItem::checkF
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XFillBitmapItem::CompareValueFunc,
RID_SVXSTR_BMP21,
- pModel->GetBitmapList() );
+ pModel->GetBitmapListFromSdrModel().get() );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
Modified: openoffice/branches/ia2/main/svx/source/xoutdev/xtabbtmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/xoutdev/xtabbtmp.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/xoutdev/xtabbtmp.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/xoutdev/xtabbtmp.cxx Sat May 18 10:12:43 2013
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
@@ -55,8 +53,8 @@ static char const aChckXML[] = { 'P'
// class XBitmapList
// ------------------
-XBitmapList::XBitmapList( const String& rPath, XOutdevItemPool* pInPool ) :
- XPropertyList( rPath, pInPool )
+XBitmapList::XBitmapList( const String& rPath ) :
+ XPropertyList( rPath )
{
}
@@ -77,19 +75,19 @@ XBitmapEntry* XBitmapList::Replace(XBitm
XBitmapEntry* XBitmapList::Remove(long nIndex)
{
- return (XBitmapEntry*) XPropertyList::Remove(nIndex, 0);
+ return (XBitmapEntry*) XPropertyList::Remove(nIndex);
}
/************************************************************************/
XBitmapEntry* XBitmapList::GetBitmap(long nIndex) const
{
- return (XBitmapEntry*) XPropertyList::Get(nIndex, 0);
+ return (XBitmapEntry*) XPropertyList::Get(nIndex);
}
/************************************************************************/
-sal_Bool XBitmapList::Load()
+bool XBitmapList::Load()
{
if( mbListDirty )
{
@@ -100,7 +98,7 @@ sal_Bool XBitmapList::Load()
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
DBG_ASSERT( !maPath.Len(), "invalid URL" );
- return sal_False;
+ return false;
}
aURL.Append( maName );
@@ -111,19 +109,20 @@ sal_Bool XBitmapList::Load()
uno::Reference< container::XNameContainer > xTable( SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
}
- return( sal_False );
+
+ return false;
}
/************************************************************************/
-sal_Bool XBitmapList::Save()
+bool XBitmapList::Save()
{
INetURLObject aURL( maPath );
if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
{
DBG_ASSERT( !maPath.Len(), "invalid URL" );
- return sal_False;
+ return false;
}
aURL.Append( maName );
@@ -138,17 +137,8 @@ sal_Bool XBitmapList::Save()
/************************************************************************/
// Umgestellt am 27.07.95 auf XBitmap
-sal_Bool XBitmapList::Create()
+bool XBitmapList::Create()
{
- //-----------------------
- // 00 01 02 03 04 05 06 07
- // 08 09 10 11 12 13 14 15
- // 16 17 18 19 20 21 22 23
- // 24 25 26 27 28 29 30 31
- // 32 33 34 35 36 37 38 39
- // 40 41 42 43 44 45 46 47
- // 48 49 50 51 52 53 54 55
- // 56 57 58 59 60 61 62 63
String aStr(SVX_RES(RID_SVXSTR_BITMAP));
sal_uInt16 aArray[64];
Bitmap aBitmap;
@@ -182,7 +172,7 @@ sal_Bool XBitmapList::Create()
aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_LIGHTBLUE), RGB_Color(COL_WHITE));
Insert(new XBitmapEntry(Graphic(aBitmap), aStr));
- return( sal_True );
+ return true;
}
/************************************************************************/