diff options
Diffstat (limited to 'sd/source/ui/toolpanel/LayoutMenu.cxx')
-rw-r--r-- | sd/source/ui/toolpanel/LayoutMenu.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 770b6945c0a8..0ebea3f15bc6 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -112,7 +112,7 @@ private: }; -SFX_IMPL_INTERFACE(LayoutMenu, SfxShell, +SFX_IMPL_INTERFACE(LayoutMenu, SfxShell, SdResId(STR_TASKPANELAYOUTMENU)) { SFX_POPUPMENU_REGISTRATION(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); @@ -157,15 +157,15 @@ static snewfoil_value_info standard[] = { {BMP_LAYOUT_EMPTY, BMP_LAYOUT_EMPTY_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE}, {BMP_LAYOUT_HEAD03, BMP_LAYOUT_HEAD03_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE}, - {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM}, + {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM}, {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT}, - {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE}, + {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE}, {BMP_LAYOUT_TEXTONLY, BMP_LAYOUT_TEXTONLY_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT}, {BMP_LAYOUT_HEAD03B, BMP_LAYOUT_HEAD03B_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT}, {BMP_LAYOUT_HEAD03C, BMP_LAYOUT_HEAD03C_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ}, - {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT}, + {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT}, {BMP_LAYOUT_HEAD02B, BMP_LAYOUT_HEAD02B_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT}, - {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ}, + {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ}, {BMP_LAYOUT_HEAD06, BMP_LAYOUT_HEAD06_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART}, // vertical @@ -224,7 +224,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell ) SetSmartHelpId(SmartId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS)); SetAccessibleName(SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE)); - + Link aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler)); mxListener = new ::sd::tools::SlotStateListener( aStateChangeLink, @@ -242,7 +242,7 @@ LayoutMenu::~LayoutMenu (void) // Tell the shell factory that this object is no longer available. if (GetShellManager() != NULL) GetShellManager()->RemoveSubShell(this); - + Reference<lang::XComponent> xComponent (mxListener, UNO_QUERY); if (xComponent.is()) xComponent->dispose(); @@ -267,7 +267,7 @@ LayoutMenu::~LayoutMenu (void) AutoLayout LayoutMenu::GetSelectedAutoLayout (void) { AutoLayout aResult = AUTOLAYOUT_NONE; - + if ( ! IsNoSelection() && GetSelectItemId()!=0) { AutoLayout* pLayout = static_cast<AutoLayout*>(GetItemData(GetSelectItemId())); @@ -288,7 +288,7 @@ Size LayoutMenu::GetPreferredSize (void) { Size aItemSize = CalcItemSizePixel (Size()); Size aPreferredWindowSize = CalcWindowSizePixel ( - aItemSize, + aItemSize, (USHORT)mnPreferredColumnCount, (USHORT)CalculateRowCount (aItemSize,mnPreferredColumnCount)); return aPreferredWindowSize; @@ -389,7 +389,7 @@ void LayoutMenu::UpdateEnabledState (const MasterMode eMode) // expanded. bIsEnabled = true; break; - + case ViewShell::ST_DRAW: case ViewShell::ST_IMPRESS: { @@ -482,7 +482,7 @@ void LayoutMenu::Resize (void) nColumnCount = 4; int nRowCount = CalculateRowCount (aItemSize, nColumnCount); - + SetColCount ((USHORT)nColumnCount); SetLineCount ((USHORT)nRowCount); } @@ -505,7 +505,7 @@ void LayoutMenu::MouseButtonDown (const MouseEvent& rEvent) if (nIndex > 0) SelectItem(nIndex); } - + ValueSet::MouseButtonDown (rEvent); } @@ -698,7 +698,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout) pPageSelection.reset(new ::sd::slidesorter::SlideSorterViewShell::PageSelection()); pPageSelection->push_back(pMainViewShell->GetActualPage()); } - + if (pPageSelection->empty()) break; @@ -743,7 +743,7 @@ SfxRequest LayoutMenu::CreateRequest ( break; SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers()); - + aRequest.AppendItem( SfxStringItem (ID_VAL_PAGENAME, String()));//pPage->GetName())); aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout)); @@ -768,7 +768,7 @@ void LayoutMenu::Fill (void) SvtLanguageOptions aLanguageOptions; sal_Bool bVertical = aLanguageOptions.IsVerticalTextEnabled(); SdDrawDocument* pDocument = mrBase.GetDocument(); - sal_Bool bRightToLeft = (pDocument!=NULL + sal_Bool bRightToLeft = (pDocument!=NULL && pDocument->GetDefaultWritingMode() == WritingMode_RL_TB); // Get URL of the view in the center pane. @@ -786,7 +786,7 @@ void LayoutMenu::Fill (void) } catch (RuntimeException&) {} - + snewfoil_value_info* pInfo = NULL; if (sCenterPaneViewName.equals(framework::FrameworkHelper::msNotesViewURL)) { @@ -812,10 +812,10 @@ void LayoutMenu::Fill (void) { if ((WritingMode_TB_RL != pInfo->meWritingMode) || bVertical) { - BitmapEx aBmp (SdResId (bHighContrast - ? pInfo->mnHCBmpResId + BitmapEx aBmp (SdResId (bHighContrast + ? pInfo->mnHCBmpResId : pInfo->mnBmpResId)); - + if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode)) aBmp.Mirror (BMP_MIRROR_HORZ); @@ -926,7 +926,7 @@ void LayoutMenu::UpdateSelection (void) ViewShell* pViewShell = mrBase.GetMainViewShell().get(); if (pViewShell == NULL) break; - + SdPage* pCurrentPage = pViewShell->getCurrentPage(); if (pCurrentPage == NULL) break; |