You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/03/28 16:07:12 UTC
svn commit: r1462140 - in /openoffice/branches/sidebar/main:
officecfg/registry/data/org/openoffice/Office/UI/ sfx2/
sfx2/inc/sfx2/sidebar/ sfx2/source/sidebar/ sw/ sw/inc/ sw/sdi/
sw/source/ui/shells/ sw/source/ui/sidebar/
Author: orw
Date: Thu Mar 28 15:07:11 2013
New Revision: 1462140
URL: http://svn.apache.org/r1462140
Log:
#121799# - implementation of wrap property panel migrated from Symphony branch
Added:
openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.hxx
openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx
openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hrc
openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx
openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.src
Modified:
openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
openoffice/branches/sidebar/main/sfx2/Library_sfx.mk
openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx
openoffice/branches/sidebar/main/sw/AllLangResTarget_sw.mk
openoffice/branches/sidebar/main/sw/Library_sw.mk
openoffice/branches/sidebar/main/sw/inc/cmdid.h
openoffice/branches/sidebar/main/sw/inc/helpid.h
openoffice/branches/sidebar/main/sw/sdi/_frmsh.sdi
openoffice/branches/sidebar/main/sw/sdi/_grfsh.sdi
openoffice/branches/sidebar/main/sw/sdi/swriter.sdi
openoffice/branches/sidebar/main/sw/source/ui/shells/frmsh.cxx
openoffice/branches/sidebar/main/sw/source/ui/shells/grfsh.cxx
openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx
Modified: openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu (original)
+++ openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu Thu Mar 28 15:07:11 2013
@@ -771,18 +771,20 @@
<value>PropertyDeck</value>
</prop>
<prop oor:name="DefaultMenuCommand">
- <value>.uno:GraphicWrapDialog</value>
+ <value>.uno:ObjectWrapDialog</value>
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- WriterAndWeb, Graphic, visible ;
+ Writer, Graphic, visible ;
+ Writer, OLE, visible ;
+ Writer, Frame, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
- <value>private:resource/toolpanel/SvxPanelFactory/Debug_NotYetImplementedPanel</value>
+ <value>private:resource/toolpanel/SwPanelFactory/WrapPropertyPanel</value>
</prop>
<prop oor:name="OrderIndex" oor:type="xs:int">
- <value>300</value>
+ <value>500</value>
</prop>
</node>
Modified: openoffice/branches/sidebar/main/sfx2/Library_sfx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/Library_sfx.mk?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/Library_sfx.mk (original)
+++ openoffice/branches/sidebar/main/sfx2/Library_sfx.mk Thu Mar 28 15:07:11 2013
@@ -224,6 +224,7 @@ $(eval $(call gb_Library_add_exception_o
sfx2/source/sidebar/ContextList \
sfx2/source/sidebar/ControlFactory \
sfx2/source/sidebar/ControllerItem \
+ sfx2/source/sidebar/CustomImageRadioButton \
sfx2/source/sidebar/Deck \
sfx2/source/sidebar/DeckDescriptor \
sfx2/source/sidebar/DeckLayouter \
Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx Thu Mar 28 15:07:11 2013
@@ -39,6 +39,9 @@ public:
static ImageRadioButton* CreateTabItem (Window* pParentWindow);
static ToolBox* CreateToolBox (Window* pParentWindow, const ResId& rResId);
static Window* CreateToolBoxBackground (Window* pParentWindow);
+ static ImageRadioButton* CreateCustomImageRadionButton(
+ Window* pParentWindow,
+ const ResId& rResId );
};
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx Thu Mar 28 15:07:11 2013
@@ -27,6 +27,7 @@
#include "TabItem.hxx"
#include "SidebarToolBox.hxx"
#include "ToolBoxBackground.hxx"
+#include "CustomImageRadioButton.hxx"
#include <vcl/toolbox.hxx>
@@ -72,4 +73,16 @@ Window* ControlFactory::CreateToolBoxBac
return pBorderWindow;
}
+
+
+
+ImageRadioButton* ControlFactory::CreateCustomImageRadionButton(
+ Window* pParentWindow,
+ const ResId& rResId )
+{
+ return new CustomImageRadioButton(
+ pParentWindow,
+ rResId );
+}
+
} } // end of namespace sfx2::sidebar
Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.cxx?rev=1462140&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.cxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.cxx Thu Mar 28 15:07:11 2013
@@ -0,0 +1,85 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_sfx2.hxx"
+
+#include "CustomImageRadioButton.hxx"
+
+#include "DrawHelper.hxx"
+#include "Paint.hxx"
+#include "Tools.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+
+namespace sfx2 { namespace sidebar {
+
+
+CustomImageRadioButton::CustomImageRadioButton (
+ Window* pParentWindow,
+ const ResId& rResId )
+ : ImageRadioButton( pParentWindow, rResId )
+{
+ SetStyle( GetStyle() | WB_NOPOINTERFOCUS );
+}
+
+
+CustomImageRadioButton::~CustomImageRadioButton (void)
+{
+}
+
+
+void CustomImageRadioButton::Paint (const Rectangle& rUpdateArea)
+{
+ Rectangle aPaintRect( Rectangle(Point(0,0), GetSizePixel() ) );
+ SetMouseRect( aPaintRect );
+ SetStateRect( aPaintRect );
+
+ const Theme::ThemeItem eBackground =
+ IsChecked()
+ ? Theme::Paint_PanelTitleBarBackground
+ : IsMouseOver()
+ ? Theme::Paint_TabItemBackgroundHighlight
+ : Theme::Paint_PanelBackground;
+ DrawHelper::DrawRoundedRectangle(
+ *this,
+ aPaintRect,
+ 2,
+ IsChecked() ? Theme::GetColor(Theme::Color_TabItemBorder) : Color(0xffffffff),
+ Theme::GetPaint( eBackground ) );
+
+ //const Image aIcon (Button::GetModeImage(Theme::IsHighContrastMode()
+ const Image aIcon (GetModeRadioImage(Theme::IsHighContrastMode()
+ ? BMP_COLOR_HIGHCONTRAST
+ : BMP_COLOR_NORMAL));
+ const Size aIconSize (aIcon.GetSizePixel());
+ const Point aIconLocation(
+ (GetSizePixel().Width() - aIconSize.Width())/2,
+ (GetSizePixel().Height() - aIconSize.Height())/2 );
+ DrawImage(
+ aIconLocation,
+ aIcon,
+ IsEnabled() ? 0 : IMAGE_DRAW_DISABLE );
+}
+
+
+} } // end of namespace sfx2::sidebar
Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.hxx?rev=1462140&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.hxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/CustomImageRadioButton.hxx Thu Mar 28 15:07:11 2013
@@ -0,0 +1,49 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_CUSTOM_IMAGE_RADIO_BUTTON_HXX
+#define SFX_SIDEBAR_CUSTOM_IMAGE_RADIO_BUTTON_HXX
+
+#include "vcl/button.hxx"
+
+#include "sfx2/sidebar/Theme.hxx"
+
+namespace sfx2 { namespace sidebar {
+
+/** A custom image radion button with more control over used colors for sidebar
+*/
+class CustomImageRadioButton
+ : public ImageRadioButton
+{
+public:
+ CustomImageRadioButton(
+ Window* pParentWindow,
+ const ResId& rResId );
+
+ virtual ~CustomImageRadioButton(void);
+
+ virtual void Paint( const Rectangle& rUpdateArea );
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+#endif
Modified: openoffice/branches/sidebar/main/sw/AllLangResTarget_sw.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/AllLangResTarget_sw.mk?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/AllLangResTarget_sw.mk (original)
+++ openoffice/branches/sidebar/main/sw/AllLangResTarget_sw.mk Thu Mar 28 15:07:11 2013
@@ -157,6 +157,7 @@ $(eval $(call gb_SrsTarget_add_files,sw/
sw/source/ui/ribbar/workctrl.src \
sw/source/ui/shells/shells.src \
sw/source/ui/sidebar/PagePropertyPanel.src \
+ sw/source/ui/sidebar/WrapPropertyPanel.src \
sw/source/ui/smartmenu/stmenu.src \
sw/source/ui/table/chartins.src \
sw/source/ui/table/colwd.src \
Modified: openoffice/branches/sidebar/main/sw/Library_sw.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/Library_sw.mk?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/Library_sw.mk (original)
+++ openoffice/branches/sidebar/main/sw/Library_sw.mk Thu Mar 28 15:07:11 2013
@@ -651,6 +651,7 @@ $(eval $(call gb_Library_add_exception_o
sw/source/ui/sidebar/PageSizeControl \
sw/source/ui/sidebar/PageColumnControl \
sw/source/ui/sidebar/PagePropertyPanel \
+ sw/source/ui/sidebar/WrapPropertyPanel \
sw/source/ui/sidebar/SwPanelFactory \
sw/source/ui/smartmenu/stmenu \
sw/source/ui/table/chartins \
Modified: openoffice/branches/sidebar/main/sw/inc/cmdid.h
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/inc/cmdid.h?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/inc/cmdid.h (original)
+++ openoffice/branches/sidebar/main/sw/inc/cmdid.h Thu Mar 28 15:07:11 2013
@@ -1262,7 +1262,7 @@ Achtung: Ab sofort sind in diesem File k
#define FN_UNO_TITLE (FN_FRAME + 19)
#define FN_UNO_DESCRIPTION (FN_FRAME + 20)
-#define FN_PROPERTY_SIDEBAR_GRAFIC_DLG (FN_SIDEBAR + 0)
+#define FN_PROPERTY_WRAP_DLG (FN_SIDEBAR + 0)
#define SID_ATTR_PAGE_COLUMN (FN_SIDEBAR + 1)
#define SID_ATTR_PAGE_ULSPACE (FN_SIDEBAR + 2)
#define SID_ATTR_PAGE_LRSPACE (FN_SIDEBAR + 3)
Modified: openoffice/branches/sidebar/main/sw/inc/helpid.h
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/inc/helpid.h?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/inc/helpid.h (original)
+++ openoffice/branches/sidebar/main/sw/inc/helpid.h Thu Mar 28 15:07:11 2013
@@ -305,6 +305,14 @@
#define HID_OPTCOMPATIBILITY_PAGE "SW_HID_OPTCOMPATIBILITY_PAGE"
#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX"
+#define HID_PROPERTYPANEL_WRAP_SECTION "SW_HID_PROPERTYPANEL_WRAP_SECTION"
+#define HID_PROPERTYPANEL_WRAP_RB_NO_WRAP "SW_HID_PROPERTYPANEL_WRAP_RB_NO_WRAP"
+#define HID_PROPERTYPANEL_WRAP_RB_WRAP_LEFT "SW_HID_PROPERTYPANEL_WRAP_RB_WRAP_LEFT"
+#define HID_PROPERTYPANEL_WRAP_RB_WRAP_RIGHT "SW_HID_PROPERTYPANEL_WRAP_RB_WRAP_RIGHT"
+#define HID_PROPERTYPANEL_WRAP_RB_WRAP_PARALLEL "SW_HID_PROPERTYPANEL_WRAP_RB_WRAP_PARALLEL"
+#define HID_PROPERTYPANEL_WRAP_RB_WRAP_THROUGH "SW_HID_PROPERTYPANEL_WRAP_RB_WRAP_THROUGH"
+#define HID_PROPERTYPANEL_WRAP_RB_WRAP_IDEAL "SW_HID_PROPERTYPANEL_WRAP_RB_WRAP_IDEAL"
+
// AutoPilot Help-IDs *********************************************************
#define HID_LETTER_PAGE1 "SW_HID_LETTER_PAGE1"
Modified: openoffice/branches/sidebar/main/sw/sdi/_frmsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/sdi/_frmsh.sdi?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/sdi/_frmsh.sdi (original)
+++ openoffice/branches/sidebar/main/sw/sdi/_frmsh.sdi Thu Mar 28 15:07:11 2013
@@ -184,6 +184,12 @@ interface BaseTextFrame
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ FN_PROPERTY_WRAP_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
SID_FRAME_LINESTYLE // status()
[
Modified: openoffice/branches/sidebar/main/sw/sdi/_grfsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/sdi/_grfsh.sdi?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/sdi/_grfsh.sdi (original)
+++ openoffice/branches/sidebar/main/sw/sdi/_grfsh.sdi Thu Mar 28 15:07:11 2013
@@ -58,7 +58,7 @@ interface BaseTextGraphic
StateMethod = GetAttrState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- FN_PROPERTY_SIDEBAR_GRAFIC_DLG // status(final|play)
+ FN_PROPERTY_WRAP_DLG // status(final|play)
[
ExecMethod = Execute ;
StateMethod = GetAttrState ;
Modified: openoffice/branches/sidebar/main/sw/sdi/swriter.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/sdi/swriter.sdi?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/sdi/swriter.sdi (original)
+++ openoffice/branches/sidebar/main/sw/sdi/swriter.sdi Thu Mar 28 15:07:11 2013
@@ -3459,7 +3459,7 @@ SfxVoidItem GraphicDialog FN_FORMAT_GRAF
GroupId = GID_GRAPHIC;
]
//--------------------------------------------------------------------------
-SfxVoidItem GraphicWrapDialog FN_PROPERTY_SIDEBAR_GRAFIC_DLG
+SfxVoidItem ObjectWrapDialog FN_PROPERTY_WRAP_DLG
()
[
/* flags: */
Modified: openoffice/branches/sidebar/main/sw/source/ui/shells/frmsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/shells/frmsh.cxx?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/shells/frmsh.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/shells/frmsh.cxx Thu Mar 28 15:07:11 2013
@@ -383,7 +383,8 @@ void SwFrameShell::Execute(SfxRequest &r
}
}
break;
- case FN_FORMAT_FRAME_DLG:
+ case FN_FORMAT_FRAME_DLG:
+ case FN_PROPERTY_WRAP_DLG:
{
const int nSel = rSh.GetSelectionType();
if (nSel & nsSelectionType::SEL_GRF)
@@ -393,34 +394,31 @@ void SwFrameShell::Execute(SfxRequest &r
}
else
{
- SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
- SID_ATTR_BRUSH, SID_ATTR_BRUSH,
- SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
- FN_SURROUND, FN_HORI_ORIENT,
- FN_SET_FRM_NAME, FN_SET_FRM_NAME,
- FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
- SID_DOCFRAME, SID_DOCFRAME,
- SID_HTML_MODE, SID_HTML_MODE,
- FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
+ SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
+ SID_ATTR_BRUSH, SID_ATTR_BRUSH,
+ SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
+ FN_SURROUND, FN_HORI_ORIENT,
+ FN_SET_FRM_NAME, FN_SET_FRM_NAME,
+ FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
+ SID_DOCFRAME, SID_DOCFRAME,
+ SID_HTML_MODE, SID_HTML_MODE,
+ FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
FN_OLE_IS_MATH, FN_OLE_IS_MATH,
FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
0);
- const SwViewOption* pVOpt = rSh.GetViewOptions();
- if(nSel & nsSelectionType::SEL_OLE)
+ const SwViewOption* pVOpt = rSh.GetViewOptions();
+ if(nSel & nsSelectionType::SEL_OLE)
aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
- aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
- aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
+ aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
+ aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if( nSel & nsSelectionType::SEL_OLE )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
@@ -469,6 +467,11 @@ void SwFrameShell::Execute(SfxRequest &r
nDefPage);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ if ( nSlot == FN_PROPERTY_WRAP_DLG )
+ {
+ pDlg->SetCurPageId(TP_FRM_WRAP);
+ }
+
if ( pDlg->Execute() )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
Modified: openoffice/branches/sidebar/main/sw/source/ui/shells/grfsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/shells/grfsh.cxx?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/shells/grfsh.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/shells/grfsh.cxx Thu Mar 28 15:07:11 2013
@@ -114,7 +114,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
break;
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
- case FN_PROPERTY_SIDEBAR_GRAFIC_DLG:
+ case FN_PROPERTY_WRAP_DLG:
{
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
@@ -151,10 +151,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if ( nSlot == FN_FORMAT_GRAFIC_DLG )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
@@ -233,7 +230,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
aSet, sal_False, DLG_FRM_GRF);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- if (nSlot == FN_PROPERTY_SIDEBAR_GRAFIC_DLG)
+ if (nSlot == FN_PROPERTY_WRAP_DLG)
pDlg->SetCurPageId(TP_FRM_WRAP);
if( pDlg->Execute() )
Modified: openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx?rev=1462140&r1=1462139&r2=1462140&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx Thu Mar 28 15:07:11 2013
@@ -24,6 +24,7 @@
#include "SwPanelFactory.hxx"
#include <PagePropertyPanel.hxx>
+#include <WrapPropertyPanel.hxx>
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sfxbasecontroller.hxx>
@@ -122,6 +123,15 @@ Reference<ui::XUIElement> SAL_CALL SwPan
pPanel,
ui::LayoutSize(-1,-1,-1));
}
+ else if (DoesResourceEndWith("/WrapPropertyPanel"))
+ {
+ WrapPropertyPanel* pPanel = WrapPropertyPanel::Create( pParentWindow, xFrame, pBindings );
+ xElement = sfx2::sidebar::SidebarPanelBase::Create(
+ rsResourceURL,
+ xFrame,
+ pPanel,
+ ui::LayoutSize(-1,-1,-1));
+ }
#undef DoesResourceEndWith
return xElement;
Added: openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx?rev=1462140&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx (added)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx Thu Mar 28 15:07:11 2013
@@ -0,0 +1,266 @@
+/**************************************************************
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*************************************************************/
+
+#include "precompiled_sw.hxx"
+
+#include "WrapPropertyPanel.hxx"
+#include "WrapPropertyPanel.hrc"
+#include "PropertyPanel.hrc"
+
+#include <cmdid.h>
+#include <swtypes.hxx>
+
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <svl/eitem.hxx>
+#include <vcl/svapp.hxx>
+
+#include "com/sun/star/lang/IllegalArgumentException.hdl"
+
+#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
+
+
+namespace sw { namespace sidebar {
+
+WrapPropertyPanel* WrapPropertyPanel::Create (
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
+ SfxBindings* pBindings)
+{
+ if (pParent == NULL)
+ throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to PagePropertyPanel::Create"), NULL, 0);
+ if ( ! rxFrame.is())
+ throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to PagePropertyPanel::Create"), NULL, 1);
+ if (pBindings == NULL)
+ throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to PagePropertyPanel::Create"), NULL, 2);
+
+ return new WrapPropertyPanel(
+ pParent,
+ rxFrame,
+ pBindings);
+}
+
+
+WrapPropertyPanel::WrapPropertyPanel(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
+ SfxBindings* pBindings )
+ : Control(pParent, SW_RES(RID_PROPERTYPANEL_SWOBJWRAP_PAGE))
+ , mxFrame( rxFrame )
+ , mpBindings(pBindings)
+ // visible controls
+ , mpRBNoWrap( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_NO_WRAP) ) )
+ , mpRBWrapLeft( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_LEFT) ) )
+ , mpRBWrapRight( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_RIGHT) ) )
+ , mpRBWrapParallel( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_PARALLEL) ) )
+ , mpRBWrapThrough( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_THROUGH) ) )
+ , mpRBIdealWrap( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_IDEAL) ) )
+ // resources
+ , aWrapIL(6,2)
+ , aWrapILH(6,2)
+ // controller items
+ , maSwNoWrapControl(FN_FRAME_NOWRAP, *pBindings, *this)
+ , maSwWrapLeftControl(FN_FRAME_WRAP, *pBindings, *this)
+ , maSwWrapRightControl(FN_FRAME_WRAP_RIGHT, *pBindings, *this)
+ , maSwWrapParallelControl(FN_FRAME_WRAP_LEFT, *pBindings, *this)
+ , maSwWrapThroughControl(FN_FRAME_WRAPTHRU, *pBindings, *this)
+ , maSwWrapIdealControl(FN_FRAME_WRAP_IDEAL, *pBindings, *this)
+{
+ Initialize();
+ FreeResource();
+}
+
+
+WrapPropertyPanel::~WrapPropertyPanel()
+{
+}
+
+
+void WrapPropertyPanel::Initialize()
+{
+ Link aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl);
+ mpRBNoWrap->SetClickHdl(aLink);
+ mpRBWrapLeft->SetClickHdl(aLink);
+ mpRBWrapRight->SetClickHdl(aLink);
+ mpRBWrapParallel->SetClickHdl(aLink);
+ mpRBWrapThrough->SetClickHdl(aLink);
+ mpRBIdealWrap->SetClickHdl(aLink);
+
+ aWrapIL.AddImage( IMG_NONE,
+ ::GetImage( mxFrame, A2S(".uno:WrapOff"), sal_False, sal_False ) );
+ aWrapIL.AddImage( IMG_LEFT,
+ ::GetImage( mxFrame, A2S(".uno:WrapLeft"), sal_False, sal_False ) );
+ aWrapIL.AddImage( IMG_RIGHT,
+ ::GetImage( mxFrame, A2S(".uno:WrapRight"), sal_False, sal_False ) );
+ aWrapIL.AddImage( IMG_PARALLEL,
+ ::GetImage( mxFrame, A2S(".uno:WrapOn"), sal_False, sal_False ) );
+ aWrapIL.AddImage( IMG_THROUGH,
+ ::GetImage( mxFrame, A2S(".uno:WrapThrough"), sal_False, sal_False ) );
+ aWrapIL.AddImage( IMG_IDEAL,
+ ::GetImage( mxFrame, A2S(".uno:WrapIdeal"), sal_False, sal_False ) );
+
+ aWrapILH.AddImage( IMG_NONE,
+ ::GetImage( mxFrame, A2S(".uno:WrapOff"), sal_False, sal_True ) );
+ aWrapILH.AddImage( IMG_LEFT,
+ ::GetImage( mxFrame, A2S(".uno:WrapLeft"), sal_False, sal_True ) );
+ aWrapILH.AddImage( IMG_RIGHT,
+ ::GetImage( mxFrame, A2S(".uno:WrapRight"), sal_False, sal_True ) );
+ aWrapILH.AddImage( IMG_PARALLEL,
+ ::GetImage( mxFrame, A2S(".uno:WrapOn"), sal_False, sal_True ) );
+ aWrapILH.AddImage( IMG_THROUGH,
+ ::GetImage( mxFrame, A2S(".uno:WrapThrough"), sal_False, sal_True ) );
+ aWrapILH.AddImage( IMG_IDEAL,
+ ::GetImage( mxFrame, A2S(".uno:WrapIdeal"), sal_False, sal_True ) );
+
+ mpRBNoWrap->SetModeRadioImage( aWrapIL.GetImage(IMG_NONE) );
+ mpRBNoWrap->SetModeRadioImage( aWrapILH.GetImage(IMG_NONE) , BMP_COLOR_HIGHCONTRAST );
+ if ( Application::GetSettings().GetLayoutRTL() )
+ {
+ mpRBWrapLeft->SetModeRadioImage( aWrapIL.GetImage(IMG_RIGHT) );
+ mpRBWrapLeft->SetModeRadioImage( aWrapILH.GetImage(IMG_RIGHT) , BMP_COLOR_HIGHCONTRAST );
+ mpRBWrapRight->SetModeRadioImage( aWrapIL.GetImage(IMG_LEFT) );
+ mpRBWrapRight->SetModeRadioImage( aWrapILH.GetImage(IMG_LEFT) , BMP_COLOR_HIGHCONTRAST );
+ }
+ else
+ {
+ mpRBWrapLeft->SetModeRadioImage( aWrapIL.GetImage(IMG_LEFT) );
+ mpRBWrapLeft->SetModeRadioImage( aWrapILH.GetImage(IMG_LEFT) , BMP_COLOR_HIGHCONTRAST );
+ mpRBWrapRight->SetModeRadioImage( aWrapIL.GetImage(IMG_RIGHT) );
+ mpRBWrapRight->SetModeRadioImage( aWrapILH.GetImage(IMG_RIGHT) , BMP_COLOR_HIGHCONTRAST );
+ }
+ mpRBWrapParallel->SetModeRadioImage( aWrapIL.GetImage(IMG_PARALLEL) );
+ mpRBWrapParallel->SetModeRadioImage( aWrapILH.GetImage(IMG_PARALLEL) , BMP_COLOR_HIGHCONTRAST );
+ mpRBWrapThrough->SetModeRadioImage( aWrapIL.GetImage(IMG_THROUGH) );
+ mpRBWrapThrough->SetModeRadioImage( aWrapILH.GetImage(IMG_THROUGH) , BMP_COLOR_HIGHCONTRAST );
+ mpRBIdealWrap->SetModeRadioImage( aWrapIL.GetImage(IMG_IDEAL) );
+ mpRBIdealWrap->SetModeRadioImage( aWrapILH.GetImage(IMG_IDEAL) , BMP_COLOR_HIGHCONTRAST );
+
+ mpRBNoWrap->SetAccessibleName(mpRBNoWrap->GetQuickHelpText());
+ mpRBWrapLeft->SetAccessibleName(mpRBWrapLeft->GetQuickHelpText());
+ mpRBWrapRight->SetAccessibleName(mpRBWrapRight->GetQuickHelpText());
+ mpRBWrapParallel->SetAccessibleName(mpRBWrapParallel->GetQuickHelpText());
+ mpRBWrapThrough->SetAccessibleName(mpRBWrapThrough->GetQuickHelpText());
+ mpRBIdealWrap->SetAccessibleName(mpRBIdealWrap->GetQuickHelpText());
+
+ mpBindings->Update( FN_FRAME_NOWRAP );
+ mpBindings->Update( FN_FRAME_WRAP );
+ mpBindings->Update( FN_FRAME_WRAP_RIGHT );
+ mpBindings->Update( FN_FRAME_WRAP_LEFT );
+ mpBindings->Update( FN_FRAME_WRAPTHRU );
+ mpBindings->Update( FN_FRAME_WRAP_IDEAL );
+}
+
+
+IMPL_LINK(WrapPropertyPanel, WrapTypeHdl, void *, EMPTYARG)
+{
+ sal_uInt16 nSlot = 0;
+ if ( mpRBWrapLeft->IsChecked() )
+ {
+ nSlot = FN_FRAME_WRAP_LEFT;
+ }
+ else if( mpRBWrapRight->IsChecked() )
+ {
+ nSlot = FN_FRAME_WRAP_RIGHT;
+ }
+ else if ( mpRBWrapParallel->IsChecked() )
+ {
+ nSlot = FN_FRAME_WRAP;
+ }
+ else if( mpRBWrapThrough->IsChecked() )
+ {
+ nSlot = FN_FRAME_WRAPTHRU;
+ }
+ else if( mpRBIdealWrap->IsChecked() )
+ {
+ nSlot = FN_FRAME_WRAP_IDEAL;
+ }
+ else
+ {
+ nSlot = FN_FRAME_NOWRAP;
+ }
+ SfxBoolItem bStateItem( nSlot, sal_True );
+ mpBindings->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_RECORD, &bStateItem, 0L );
+
+ return 0;
+}
+
+
+void WrapPropertyPanel::NotifyItemUpdate(
+ const sal_uInt16 nSId,
+ const SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if ( eState == SFX_ITEM_AVAILABLE &&
+ pState->ISA(SfxBoolItem) )
+ {
+ //Set Radio Button enable
+ mpRBNoWrap->Enable(true);
+ mpRBWrapLeft->Enable(true);
+ mpRBWrapRight->Enable(true);
+ mpRBWrapParallel->Enable(true);
+ mpRBWrapThrough->Enable(true);
+ mpRBIdealWrap->Enable(true);
+
+ const SfxBoolItem* pBoolItem = static_cast< const SfxBoolItem* >( pState );
+ switch( nSId )
+ {
+ case FN_FRAME_WRAP_RIGHT:
+ mpRBWrapRight->Check( pBoolItem->GetValue() );
+ break;
+ case FN_FRAME_WRAP_LEFT:
+ mpRBWrapLeft->Check( pBoolItem->GetValue() );
+ break;
+ case FN_FRAME_WRAPTHRU:
+ mpRBWrapThrough->Check( pBoolItem->GetValue() );
+ break;
+ case FN_FRAME_WRAP_IDEAL:
+ mpRBIdealWrap->Check( pBoolItem->GetValue() );
+ break;
+ case FN_FRAME_WRAP:
+ mpRBWrapParallel->Check( pBoolItem->GetValue() );
+ break;
+ case FN_FRAME_NOWRAP:
+ default:
+ mpRBNoWrap->Check( pBoolItem->GetValue() );
+ break;
+ }
+ }
+ else
+ {
+ mpRBNoWrap->Enable(false);
+ mpRBWrapLeft->Enable(false);
+ mpRBWrapRight->Enable(false);
+ mpRBWrapParallel->Enable(false);
+ mpRBWrapThrough->Enable(false);
+ mpRBIdealWrap->Enable(false);
+
+ mpRBNoWrap->Check( sal_False );
+ mpRBWrapLeft->Check( sal_False );
+ mpRBWrapRight->Check( sal_False );
+ mpRBWrapParallel->Check( sal_False );
+ mpRBWrapThrough->Check( sal_False );
+ mpRBIdealWrap->Check( sal_False );
+ }
+}
+
+} } // end of namespace ::sw::sidebar
Added: openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hrc?rev=1462140&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hrc (added)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hrc Thu Mar 28 15:07:11 2013
@@ -0,0 +1,42 @@
+/**************************************************************
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*************************************************************/
+
+#ifndef _SW_WRAPPROPERTYPANEL_HRC
+#define _SW_WRAPPROPERTYPANEL_HRC
+
+// RID_PROPERTYPANEL_SWOBJWRAP_PAGE
+#define RB_NO_WRAP 1
+#define RB_WRAP_LEFT 2
+#define RB_WRAP_RIGHT 3
+#define RB_WRAP_PARALLEL 4
+#define RB_WRAP_THROUGH 5
+#define RB_WRAP_IDEAL 6
+
+// only for the ImageLists
+#define IMG_BEGIN 1
+#define IMG_NONE (IMG_BEGIN)
+#define IMG_LEFT (IMG_BEGIN + 1)
+#define IMG_RIGHT (IMG_BEGIN + 2)
+#define IMG_PARALLEL (IMG_BEGIN + 3)
+#define IMG_THROUGH (IMG_BEGIN + 4)
+#define IMG_IDEAL (IMG_BEGIN + 5)
+
+#endif
\ No newline at end of file
Added: openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx?rev=1462140&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx (added)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.hxx Thu Mar 28 15:07:11 2013
@@ -0,0 +1,89 @@
+/**************************************************************
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*************************************************************/
+
+#ifndef SW_SIDEBAR_WRAP_PROPERTY_PANEL_HXX
+#define SW_SIDEBAR_WRAP_PROPERTY_PANEL_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/image.hxx>
+
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include <boost/scoped_ptr.hpp>
+
+
+namespace sw { namespace sidebar {
+
+ class WrapPropertyPanel
+ : public Control
+ , public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+ {
+ public:
+ static WrapPropertyPanel* Create(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings );
+
+ // interface of ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+ virtual void NotifyItemUpdate(
+ const sal_uInt16 nSId,
+ const SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ private:
+ WrapPropertyPanel(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
+ SfxBindings* pBindings );
+
+ virtual ~WrapPropertyPanel();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
+ SfxBindings* mpBindings;
+
+ ::boost::scoped_ptr<ImageRadioButton> mpRBNoWrap;
+ ::boost::scoped_ptr<ImageRadioButton> mpRBWrapLeft;
+ ::boost::scoped_ptr<ImageRadioButton> mpRBWrapRight;
+ ::boost::scoped_ptr<ImageRadioButton> mpRBWrapParallel;
+ ::boost::scoped_ptr<ImageRadioButton> mpRBWrapThrough;
+ ::boost::scoped_ptr<ImageRadioButton> mpRBIdealWrap;
+
+ //Image resource.
+ ImageList aWrapIL;
+ ImageList aWrapILH;
+
+ //Controler Items==================================
+ ::sfx2::sidebar::ControllerItem maSwNoWrapControl;
+ ::sfx2::sidebar::ControllerItem maSwWrapLeftControl;
+ ::sfx2::sidebar::ControllerItem maSwWrapRightControl;
+ ::sfx2::sidebar::ControllerItem maSwWrapParallelControl;
+ ::sfx2::sidebar::ControllerItem maSwWrapThroughControl;
+ ::sfx2::sidebar::ControllerItem maSwWrapIdealControl;
+
+ void Initialize();
+
+ DECL_LINK(WrapTypeHdl, void*);
+ };
+
+} } // end of namespace ::sw::sidebar
+
+#endif
Added: openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.src?rev=1462140&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.src (added)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/WrapPropertyPanel.src Thu Mar 28 15:07:11 2013
@@ -0,0 +1,90 @@
+/**************************************************************
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*************************************************************/
+
+#include <sfx2/sidebar/propertypanel.hrc>
+#include "PropertyPanel.hrc"
+#include "WrapPropertyPanel.hrc"
+#include "helpid.h"
+
+#define IMAGEBUTTON_WIDTH 16
+#define IMAGEBUTTON_HEIGH 18
+#define IMAGEBUTTON_GAP 1
+
+Control RID_PROPERTYPANEL_SWOBJWRAP_PAGE
+{
+ OutputSize = TRUE;
+ DialogControl = TRUE;
+ Border = FALSE;
+
+ Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, SECTIONPAGE_MARGIN_VERTICAL_BOT + SECTIONPAGE_MARGIN_VERTICAL_TOP + IMAGEBUTTON_HEIGH );
+ HelpID = HID_PROPERTYPANEL_WRAP_SECTION ;
+ Text [ en-US ] = "Wrap";
+
+
+ ImageRadioButton RB_NO_WRAP
+ {
+ Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP );
+ Size = MAP_APPFONT ( IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
+ TopImage = True;
+ HelpID = HID_PROPERTYPANEL_WRAP_RB_NO_WRAP ;
+ QuickHelpText [ en-US ] = "None";
+ };
+ ImageRadioButton RB_WRAP_LEFT
+ {
+ Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP, SECTIONPAGE_MARGIN_VERTICAL_TOP );
+ Size = MAP_APPFONT ( IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
+ TopImage = True;
+ HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_LEFT ;
+ QuickHelpText [ en-US ] = "Before";
+ };
+ ImageRadioButton RB_WRAP_RIGHT
+ {
+ Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*2 , SECTIONPAGE_MARGIN_VERTICAL_TOP );
+ Size = MAP_APPFONT ( IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
+ TopImage = True;
+ HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_RIGHT ;
+ QuickHelpText [ en-US ] = "After";
+ };
+ ImageRadioButton RB_WRAP_PARALLEL
+ {
+ Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*3 , SECTIONPAGE_MARGIN_VERTICAL_TOP );
+ Size = MAP_APPFONT (IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
+ TopImage = True;
+ HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_PARALLEL ;
+ QuickHelpText [ en-US ] = "Parallel";
+ };
+ ImageRadioButton RB_WRAP_THROUGH
+ {
+ Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*4 , SECTIONPAGE_MARGIN_VERTICAL_TOP );
+ Size = MAP_APPFONT (IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
+ TopImage = True;
+ HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_THROUGH ;
+ QuickHelpText [ en-US ] = "Through";
+ };
+ ImageRadioButton RB_WRAP_IDEAL
+ {
+ Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*5 , SECTIONPAGE_MARGIN_VERTICAL_TOP );
+ Size = MAP_APPFONT (IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
+ TopImage = True;
+ HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_IDEAL ;
+ QuickHelpText [ en-US ] = "Optimal";
+ };
+};