diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-31 13:23:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-11 11:20:23 +0100 |
commit | 0a29c5bedda700a86b46e3c3cd9c9e1ce1d4f278 (patch) | |
tree | 61ef44bcf873afb94ed3b9efe761e9c0de67307d /sd/source | |
parent | e2d31c5e705e6e4d6b0185bebba66a55e77981f4 (diff) |
Resolves: #i119287# exchanged hard attributes for OLE and GraphicObject
...with new default StyleSheet for these objects
(cherry picked from commit 2868ea34151cfb623a6a8bf41862d430205d9784)
Conflicts:
sd/source/core/drawdoc4.cxx
svx/source/sdr/contact/viewcontactofgraphic.cxx
Change-Id: I4849101de2ac1da83c8fb0f2d68316774982d197
Resolves: #i119287# Adapted to get the needed style as default style
for all SdrGrafObj and SDrOle2Objs. Checked various scenarios, works
well.
(cherry picked from commit bc85939149f7ae5b65343d7f27bf302a8e31d4b1)
Conflicts:
sd/source/core/drawdoc.cxx
sd/source/ui/func/fuinsert.cxx
sd/source/ui/view/sdview4.cxx
Change-Id: I40a17216f5c11ebca073026f62f1e9ab9ddfd119
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/drawdoc.cxx | 3 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 12 | ||||
-rw-r--r-- | sd/source/core/glob.src | 4 | ||||
-rw-r--r-- | sd/source/core/stlpool.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 1 |
6 files changed, 22 insertions, 0 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 844b93053e95..6a283d486861 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -594,6 +594,9 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) String aName( SdResId(STR_STANDARD_STYLESHEET_NAME)); SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS))); + // #i119287# Set default StyleSheet for SdrGrafObj and SdrOle2Obj + SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(String( SdResId(STR_POOLSHEET_OBJNOLINENOFILL)), SD_STYLE_FAMILY_GRAPHICS))); + // Initialize DrawOutliner and DocumentOutliner, but don't initialize the // global outliner, as it is not document specific like StyleSheetPool and // StyleRequestHandler are. diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 3f24709bb5c9..3cdfe86f373a 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -293,7 +293,19 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(XFillStyleItem(XFILL_NONE)); pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK))); + // Object no fill no line + + aName = String(SdResId(STR_POOLSHEET_OBJNOLINENOFILL)); + pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); + pSheet->SetParent(aStdName); + pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJNOLINENOFILL ); + pISet = &pSheet->GetItemSet(); + + pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XLineStyleItem(XLINE_NONE)); + // Text + aName = String(SdResId(STR_POOLSHEET_TEXT)); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src index 91b47afdfb70..5dfe3dc8f715 100644 --- a/sd/source/core/glob.src +++ b/sd/source/core/glob.src @@ -245,6 +245,10 @@ String STR_POOLSHEET_MEASURE { Text [ en-US ] = "Dimension Line" ; }; +String STR_POOLSHEET_OBJNOLINENOFILL +{ + Text [ en-US ] = "Object with no fill and no line" ; +}; String STR_POOLSHEET_OBJWITHARROW { Text [ en-US ] = "Object with arrow" ; diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 67db6eaeeb09..d11de4298920 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -891,6 +891,7 @@ void SdStyleSheetPool::UpdateStdNames() case HID_POOLSHEET_OBJWITHARROW: nNameId = STR_POOLSHEET_OBJWITHARROW; break; case HID_POOLSHEET_OBJWITHSHADOW: nNameId = STR_POOLSHEET_OBJWITHSHADOW; break; case HID_POOLSHEET_OBJWITHOUTFILL: nNameId = STR_POOLSHEET_OBJWITHOUTFILL; break; + case HID_POOLSHEET_OBJNOLINENOFILL: nNameId = STR_POOLSHEET_OBJNOLINENOFILL;break; case HID_POOLSHEET_TEXT: nNameId = STR_POOLSHEET_TEXT; break; case HID_POOLSHEET_TEXTBODY: nNameId = STR_POOLSHEET_TEXTBODY; break; case HID_POOLSHEET_TEXTBODY_JUSTIFY:nNameId = STR_POOLSHEET_TEXTBODY_JUSTIFY;break; diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index f21dd7e0c689..4809358324ad 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -79,6 +79,7 @@ #include "sdxfer.hxx" #include <vcl/svapp.hxx> #include "undo/undoobjects.hxx" +#include "glob.hrc" using namespace com::sun::star; diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 075cf79074be..53d414cbd701 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -59,6 +59,7 @@ #include <svtools/soerr.hxx> #include <sfx2/ipclient.hxx> +#include "glob.hrc" using namespace com::sun::star; |