Author: orw
Date: Tue Apr 23 14:56:58 2013
New Revision: 1470990
URL: http://svn.apache.org/r1470990
Log:
121793: correction for page property panel:
- show correct state in popups
- aggregate multiple attribute changes into one undo action
Modified:
openoffice/trunk/main/svx/source/sidebar/tools/Popup.cxx
openoffice/trunk/main/sw/source/ui/sidebar/PageMarginControl.cxx
openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.hxx
openoffice/trunk/main/sw/source/ui/sidebar/SwPanelFactory.cxx
openoffice/trunk/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx
openoffice/trunk/main/sw/source/ui/uiview/viewtab.cxx
Modified: openoffice/trunk/main/svx/source/sidebar/tools/Popup.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/tools/Popup.cxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/tools/Popup.cxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/tools/Popup.cxx Tue Apr 23
14:56:58 2013
@@ -1,148 +1,152 @@
-/**************************************************************
- *
- * 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 "svx/sidebar/Popup.hxx"
-#include "svx/sidebar/PopupContainer.hxx"
-#include "svx/sidebar/PopupControl.hxx"
-
-#include <vcl/toolbox.hxx>
-
-
-namespace svx { namespace sidebar {
-
-Popup::Popup (
- Window* pParent,
- const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator,
- const ::rtl::OUString& rsAccessibleName)
- : mpControl(),
- mpParent(pParent),
- maControlCreator(rControlCreator),
- maPopupModeEndCallback(),
- msAccessibleName(rsAccessibleName),
- mpContainer()
-{
- OSL_ASSERT(mpParent!=NULL);
- OSL_ASSERT(maControlCreator);
-}
-
-
-
-
-Popup::~Popup (void)
-{
- mpControl.reset();
- mpContainer.reset();
-}
-
-
-
-
-void Popup::Show (ToolBox& rToolBox)
-{
- rToolBox.SetItemDown(rToolBox.GetCurItemId(), true);
-
- ProvideContainerAndControl();
- if ( ! (mpContainer && mpControl))
- {
- OSL_ASSERT(mpContainer);
- OSL_ASSERT(mpControl);
- return;
- }
-
- if ( !mpContainer->IsInPopupMode() )
- {
- mpContainer->SetSizePixel(mpControl->GetOutputSizePixel());
-
- const Point aPos
(mpParent->OutputToScreenPixel(rToolBox.GetPosPixel()));
- const Size aSize (rToolBox.GetSizePixel());
- const Rectangle aRect (aPos, aSize);
-
- mpContainer->StartPopupMode(
- aRect,
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE|FLOATWIN_POPUPMODE_DOWN);
- mpContainer->SetPopupModeFlags(
- mpContainer->GetPopupModeFlags()
- | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE);
-
- mpControl->GetFocus();
- }
-}
-
-
-
-
-void Popup::Hide (void)
-{
- if (mpContainer)
- if (mpContainer->IsInPopupMode())
- mpContainer->EndPopupMode();
-}
-
-
-
-
-void Popup::SetPopupModeEndHandler (const ::boost::function<void(void)>&
rCallback)
-{
- maPopupModeEndCallback = rCallback;
- if (mpContainer)
- mpContainer->SetPopupModeEndHdl(LINK(this, Popup,
PopupModeEndHandler));
-}
-
-
-
-
-void Popup::ProvideContainerAndControl (void)
-{
- if ( ! (mpContainer && mpControl)
- && mpParent!=NULL
- && maControlCreator)
- {
- CreateContainerAndControl();
- }
-}
-
-
-
-
-void Popup::CreateContainerAndControl (void)
-{
- mpContainer.reset(new PopupContainer(mpParent));
- mpContainer->SetAccessibleName(msAccessibleName);
- if (maPopupModeEndCallback)
- mpContainer->SetPopupModeEndHdl(LINK(this, Popup,
PopupModeEndHandler));
- mpContainer->SetBorderStyle(mpContainer->GetBorderStyle() |
WINDOW_BORDER_MENU);
-
- mpControl.reset(maControlCreator(mpContainer.get()));
-}
-
-
-
-
-IMPL_LINK(Popup, PopupModeEndHandler, void*, EMPTYARG)
-{
- if (maPopupModeEndCallback)
- maPopupModeEndCallback();
- return 0;
-}
-
-
-
-} } // end of namespace svx::sidebar
+/**************************************************************
+ *
+ * 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 "svx/sidebar/Popup.hxx"
+#include "svx/sidebar/PopupContainer.hxx"
+#include "svx/sidebar/PopupControl.hxx"
+
+#include <vcl/toolbox.hxx>
+
+
+namespace svx { namespace sidebar {
+
+Popup::Popup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator,
+ const ::rtl::OUString& rsAccessibleName)
+ : mpControl(),
+ mpParent(pParent),
+ maControlCreator(rControlCreator),
+ maPopupModeEndCallback(),
+ msAccessibleName(rsAccessibleName),
+ mpContainer()
+{
+ OSL_ASSERT(mpParent!=NULL);
+ OSL_ASSERT(maControlCreator);
+}
+
+
+
+
+Popup::~Popup (void)
+{
+ mpControl.reset();
+ mpContainer.reset();
+}
+
+
+
+
+void Popup::Show (ToolBox& rToolBox)
+{
+ rToolBox.SetItemDown(rToolBox.GetCurItemId(), true);
+
+ ProvideContainerAndControl();
+ if ( ! (mpContainer && mpControl))
+ {
+ OSL_ASSERT(mpContainer);
+ OSL_ASSERT(mpControl);
+ return;
+ }
+
+ if ( !mpContainer->IsInPopupMode() )
+ {
+ mpContainer->SetSizePixel(mpControl->GetOutputSizePixel());
+
+ const Point aPos
(mpParent->OutputToScreenPixel(rToolBox.GetPosPixel()));
+ const Size aSize (rToolBox.GetSizePixel());
+ const Rectangle aRect (aPos, aSize);
+
+ mpContainer->StartPopupMode(
+ aRect,
+ FLOATWIN_POPUPMODE_NOFOCUSCLOSE|FLOATWIN_POPUPMODE_DOWN);
+ mpContainer->SetPopupModeFlags(
+ mpContainer->GetPopupModeFlags()
+ | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE);
+
+ mpControl->GetFocus();
+ }
+}
+
+
+
+
+void Popup::Hide (void)
+{
+ if (mpContainer)
+ if (mpContainer->IsInPopupMode())
+ mpContainer->EndPopupMode();
+}
+
+
+
+
+void Popup::SetPopupModeEndHandler (const ::boost::function<void(void)>&
rCallback)
+{
+ maPopupModeEndCallback = rCallback;
+ if (mpContainer)
+ mpContainer->SetPopupModeEndHdl(LINK(this, Popup,
PopupModeEndHandler));
+}
+
+
+
+
+void Popup::ProvideContainerAndControl (void)
+{
+ if ( ! (mpContainer && mpControl)
+ && mpParent!=NULL
+ && maControlCreator)
+ {
+ CreateContainerAndControl();
+ }
+}
+
+
+
+
+void Popup::CreateContainerAndControl (void)
+{
+ mpContainer.reset(new PopupContainer(mpParent));
+ mpContainer->SetAccessibleName(msAccessibleName);
+ mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler));
+ mpContainer->SetBorderStyle(mpContainer->GetBorderStyle() |
WINDOW_BORDER_MENU);
+
+ mpControl.reset(maControlCreator(mpContainer.get()));
+}
+
+
+
+
+IMPL_LINK(Popup, PopupModeEndHandler, void*, EMPTYARG)
+{
+ if (maPopupModeEndCallback)
+ maPopupModeEndCallback();
+
+ // Popup control is no longer needed and can be destroyed.
+ mpControl.reset();
+ mpContainer.reset();
+
+ return 0;
+}
+
+
+
+} } // end of namespace svx::sidebar
Modified: openoffice/trunk/main/sw/source/ui/sidebar/PageMarginControl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/sidebar/PageMarginControl.cxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/sidebar/PageMarginControl.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/sidebar/PageMarginControl.cxx Tue Apr 23
14:56:58 2013
@@ -364,6 +364,7 @@ IMPL_LINK(PageMarginControl, ImplMarginH
if ( bApplyNewPageMargins )
{
+ mrPagePropPanel.StartUndo();
mpMarginValueSet->SetNoSelection();
mrPagePropPanel.ExecuteMarginLRChange( mnPageLeftMargin,
mnPageRightMargin );
mrPagePropPanel.ExecuteMarginULChange( mnPageTopMargin,
mnPageBottomMargin );
@@ -372,6 +373,7 @@ IMPL_LINK(PageMarginControl, ImplMarginH
mbMirrored = bMirrored;
mrPagePropPanel.ExecutePageLayoutChange( mbMirrored );
}
+ mrPagePropPanel.EndUndo();
mbCustomValuesUsed = false;
mrPagePropPanel.ClosePageMarginPopup();
Modified: openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.cxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.cxx Tue Apr 23
14:56:58 2013
@@ -51,29 +51,60 @@
#include <boost/bind.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
#define SetFldVal(rField, lValue)
(rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP)
+namespace {
+ const cssu::Reference< css::document::XUndoManager > getUndoManager( const
cssu::Reference< css::frame::XFrame >& rxFrame )
+ {
+ const cssu::Reference< css::frame::XController >& xController =
rxFrame->getController();
+ if ( xController.is() )
+ {
+ const cssu::Reference< css::frame::XModel >& xModel =
xController->getModel();
+ if ( xModel.is() )
+ {
+ const cssu::Reference< css::document::XUndoManagerSupplier >
xSuppUndo( xModel, cssu::UNO_QUERY_THROW );
+ if ( xSuppUndo.is() )
+ {
+ const cssu::Reference< css::document::XUndoManager >
xUndoManager( xSuppUndo->getUndoManager(), cssu::UNO_QUERY_THROW );
+ return xUndoManager;
+ }
+ }
+ }
+
+ return cssu::Reference< css::document::XUndoManager > ();
+ }
+}
+
namespace sw { namespace sidebar {
PagePropertyPanel* PagePropertyPanel::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 PagePropertyPanel(
pParent,
+ rxFrame,
pBindings);
}
PagePropertyPanel::PagePropertyPanel(
Window* pParent,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
: Control(pParent, SW_RES(RID_PROPERTYPANEL_SWPAGE))
, mpBindings(pBindings)
@@ -153,12 +184,22 @@ PagePropertyPanel::PagePropertyPanel(
, m_aSwPageColControl(SID_ATTR_PAGE_COLUMN, *pBindings, *this)
, m_aSwPagePgMetricControl(SID_ATTR_METRIC, *pBindings, *this)
- , mpOrientationPopup()
- , mpMarginPopup()
- , mpSizePopup()
- , mpColumnPopup()
+ , maOrientationPopup( this,
+ ::boost::bind(
&PagePropertyPanel::CreatePageOrientationControl, this, _1 ),
+ A2S("Page orientation") )
+ , maMarginPopup( this,
+ ::boost::bind(
&PagePropertyPanel::CreatePageMarginControl, this, _1 ),
+ A2S("Page margins") )
+ , maSizePopup( this,
+ ::boost::bind( &PagePropertyPanel::CreatePageSizeControl,
this, _1 ),
+ A2S("Page size") )
+ , maColumnPopup( this,
+ ::boost::bind(
&PagePropertyPanel::CreatePageColumnControl, this, _1 ),
+ A2S("Page columns") )
, mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify( false )
+
+ , mxUndoManager( getUndoManager( rxFrame ) )
{
Initialize();
mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify = true;
@@ -271,22 +312,16 @@ void PagePropertyPanel::Initialize()
IMPL_LINK( PagePropertyPanel, ClickOrientationHdl, ToolBox*, pToolBox )
{
- if ( ! mpOrientationPopup)
- {
- mpOrientationPopup.reset(
- new ::svx::sidebar::Popup(
- this,
-
::boost::bind(&PagePropertyPanel::CreatePageOrientationControl, this, _1),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page
orientation")) ) );
- }
- mpOrientationPopup->Show( *pToolBox );
-
+ maOrientationPopup.Show( *pToolBox );
+
return 0L;
}
void PagePropertyPanel::ExecuteOrientationChange( const sal_Bool bLandscape )
{
+ StartUndo();
+
{
// set new page orientation
mpPageItem->SetLandscape( bLandscape );
@@ -337,12 +372,14 @@ void PagePropertyPanel::ExecuteOrientati
}
}
}
+
+ EndUndo();
}
void PagePropertyPanel::ClosePageOrientationPopup()
{
- mpOrientationPopup->Hide();
+ maOrientationPopup.Hide();
}
@@ -391,13 +428,7 @@ void PagePropertyPanel::ExecutePageLayou
IMPL_LINK( PagePropertyPanel, ClickMarginHdl, ToolBox*, pToolBox )
{
- if ( ! mpMarginPopup)
- mpMarginPopup.reset(
- new ::svx::sidebar::Popup(
- this,
- ::boost::bind(&PagePropertyPanel::CreatePageMarginControl,
this, _1),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page margins"))
) );
- mpMarginPopup->Show( *pToolBox );
+ maMarginPopup.Show( *pToolBox );
return 0L;
}
@@ -405,7 +436,7 @@ IMPL_LINK( PagePropertyPanel, ClickMargi
void PagePropertyPanel::ClosePageMarginPopup()
{
- mpMarginPopup->Hide();
+ maMarginPopup.Hide();
}
@@ -437,13 +468,7 @@ void PagePropertyPanel::ExecuteSizeChang
IMPL_LINK( PagePropertyPanel, ClickSizeHdl, ToolBox*, pToolBox )
{
- if ( ! mpSizePopup)
- mpSizePopup.reset(
- new ::svx::sidebar::Popup(
- this,
- ::boost::bind(&PagePropertyPanel::CreatePageSizeControl, this,
_1),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page size")) ) );
- mpSizePopup->Show( *pToolBox );
+ maSizePopup.Show( *pToolBox );
return 0L;
}
@@ -451,7 +476,7 @@ IMPL_LINK( PagePropertyPanel, ClickSizeH
void PagePropertyPanel::ClosePageSizePopup()
{
- mpSizePopup->Hide();
+ maSizePopup.Hide();
}
@@ -476,13 +501,7 @@ void PagePropertyPanel::ExecuteColumnCha
IMPL_LINK( PagePropertyPanel, ClickColumnHdl, ToolBox*, pToolBox )
{
- if ( ! mpColumnPopup)
- mpColumnPopup.reset(
- new ::svx::sidebar::Popup(
- this,
- ::boost::bind(&PagePropertyPanel::CreatePageColumnControl,
this, _1),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page columns"))
) );
- mpColumnPopup->Show( *pToolBox );
+ maColumnPopup.Show( *pToolBox );
return 0L;
}
@@ -490,7 +509,7 @@ IMPL_LINK( PagePropertyPanel, ClickColum
void PagePropertyPanel::ClosePageColumnPopup()
{
- mpColumnPopup->Hide();
+ maColumnPopup.Hide();
}
@@ -766,4 +785,22 @@ void PagePropertyPanel::ChangeColumnImag
}
}
+
+void PagePropertyPanel::StartUndo()
+{
+ if ( mxUndoManager.is() );
+ {
+ mxUndoManager->enterUndoContext( A2S("") );
+ }
+}
+
+
+void PagePropertyPanel::EndUndo()
+{
+ if ( mxUndoManager.is() );
+ {
+ mxUndoManager->leaveUndoContext();
+ }
+}
+
} } // end of namespace ::sw::sidebar
Modified: openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.hxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.hxx (original)
+++ openoffice/trunk/main/sw/source/ui/sidebar/PagePropertyPanel.hxx Tue Apr 23
14:56:58 2013
@@ -22,6 +22,9 @@
#ifndef SW_SIDEBAR_PAGE_PROPERTY_PANEL_HXX
#define SW_SIDEBAR_PAGE_PROPERTY_PANEL_HXX
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/document/XUndoManager.hpp>
+
#include <svx/sidebar/Popup.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
@@ -59,6 +62,7 @@ namespace sw { namespace sidebar {
public:
static PagePropertyPanel* Create(
Window* pParent,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XFrame>& rxFrame,
SfxBindings* pBindings );
// interface of
::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
@@ -96,9 +100,13 @@ namespace sw { namespace sidebar {
void ExecuteColumnChange( const sal_uInt16 nColumnType );
void ClosePageColumnPopup();
+ void StartUndo();
+ void EndUndo();
+
private:
PagePropertyPanel(
Window* pParent,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XFrame>& rxFrame,
SfxBindings* pBindings );
virtual ~PagePropertyPanel(void);
@@ -195,10 +203,12 @@ namespace sw { namespace sidebar {
::sfx2::sidebar::ControllerItem m_aSwPagePgMetricControl;
// popups
- ::boost::scoped_ptr< ::svx::sidebar::Popup > mpOrientationPopup;
- ::boost::scoped_ptr< ::svx::sidebar::Popup > mpMarginPopup;
- ::boost::scoped_ptr< ::svx::sidebar::Popup > mpSizePopup;
- ::boost::scoped_ptr< ::svx::sidebar::Popup > mpColumnPopup;
+ ::svx::sidebar::Popup maOrientationPopup;
+ ::svx::sidebar::Popup maMarginPopup;
+ ::svx::sidebar::Popup maSizePopup;
+ ::svx::sidebar::Popup maColumnPopup;
+
+ const cssu::Reference< css::document::XUndoManager > mxUndoManager;
bool mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify;
Modified: openoffice/trunk/main/sw/source/ui/sidebar/SwPanelFactory.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/sidebar/SwPanelFactory.cxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/sidebar/SwPanelFactory.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/sidebar/SwPanelFactory.cxx Tue Apr 23
14:56:58 2013
@@ -117,7 +117,7 @@ Reference<ui::XUIElement> SAL_CALL SwPan
#define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
if (DoesResourceEndWith("/PagePropertyPanel"))
{
- PagePropertyPanel* pPanel = PagePropertyPanel::Create( pParentWindow,
pBindings );
+ PagePropertyPanel* pPanel = PagePropertyPanel::Create( pParentWindow,
xFrame, pBindings );
xElement = sfx2::sidebar::SidebarPanelBase::Create(
rsResourceURL,
xFrame,
Modified: openoffice/trunk/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/sidebar/WrapPropertyPanel.cxx Tue Apr 23
14:56:58 2013
@@ -48,11 +48,11 @@ WrapPropertyPanel* WrapPropertyPanel::Cr
SfxBindings* pBindings)
{
if (pParent == NULL)
- throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent
Window given to PagePropertyPanel::Create"), NULL, 0);
+ throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent
Window given to WrapPropertyPanel::Create"), NULL, 0);
if ( ! rxFrame.is())
- throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame
given to PagePropertyPanel::Create"), NULL, 1);
+ throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame
given to WrapPropertyPanel::Create"), NULL, 1);
if (pBindings == NULL)
- throw ::com::sun::star::lang::IllegalArgumentException(A2S("no
SfxBindings given to PagePropertyPanel::Create"), NULL, 2);
+ throw ::com::sun::star::lang::IllegalArgumentException(A2S("no
SfxBindings given to WrapPropertyPanel::Create"), NULL, 2);
return new WrapPropertyPanel(
pParent,
Modified: openoffice/trunk/main/sw/source/ui/uiview/viewtab.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/viewtab.cxx?rev=1470990&r1=1470989&r2=1470990&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/viewtab.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/viewtab.cxx Tue Apr 23 14:56:58
2013
@@ -1189,9 +1189,10 @@ void SwView::StateTabWin(SfxItemSet& rSe
// provide left and right margins of current page style
case SID_ATTR_PAGE_LRSPACE:
{
- SvxLongLRSpaceItem aLongLR(
- (long)aPageLRSpace.GetLeft(),
- (long)aPageLRSpace.GetRight(),
+ const SvxLRSpaceItem aTmpPageLRSpace(
rDesc.GetMaster().GetLRSpace() );
+ const SvxLongLRSpaceItem aLongLR(
+ (long)aTmpPageLRSpace.GetLeft(),
+ (long)aTmpPageLRSpace.GetRight(),
SID_ATTR_PAGE_LRSPACE );
rSet.Put( aLongLR );
}