summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-17 09:00:57 +0200
committerobo <obo@openoffice.org>2010-06-17 09:00:57 +0200
commit8c75156a84a5088506c49101efad199dc7b8d05e (patch)
treeda1aa4b0253a6ba07ba82fb5b359798e58cb5cb7
parent847c992a251bcbbcaf71d3b1b366d70971b4ef03 (diff)
masterfix: #i10000# resolve merge problems
Notes
split repo tag: impress_ooo/DEV300_m83
-rwxr-xr-xsd/source/ui/dlg/PaneDockingWindow.cxx229
-rwxr-xr-xsd/source/ui/inc/PaneDockingWindow.hxx60
2 files changed, 0 insertions, 289 deletions
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index 8bcba545f739..c1dedd5d8293 100755
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -57,235 +57,6 @@ PaneDockingWindow::~PaneDockingWindow (void)
{
}
-<<<<<<< local
-=======
-
-
-
-void PaneDockingWindow::Resize (void)
-{
- SfxDockingWindow::Resize();
- mbIsLayoutPending = true;
-}
-
-
-
-
-void PaneDockingWindow::Layout (void)
-{
- mbIsLayoutPending = false;
-
- Size aWindowSize (GetOutputSizePixel());
- Size aToolBoxSize (0,0);
- int nTitleBarHeight (GetSettings().GetStyleSettings().GetTitleHeight());
-
- // Place the title tool box.
- if (mpTitleToolBox.get() != NULL)
- {
- if (IsFloatingMode())
- mpTitleToolBox->HideItem (1);
- else
- mpTitleToolBox->ShowItem (1);
-
- aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel();
- if (aToolBoxSize.Height() > nTitleBarHeight)
- nTitleBarHeight = aToolBoxSize.Height();
- mpTitleToolBox->SetPosSizePixel (
- Point(aWindowSize.Width()-aToolBoxSize.Width(),
- (nTitleBarHeight-aToolBoxSize.Height())/2),
- aToolBoxSize);
- }
-
- // Place the content window.
- if (nTitleBarHeight < aToolBoxSize.Height())
- nTitleBarHeight = aToolBoxSize.Height();
- aWindowSize.Height() -= nTitleBarHeight;
- mpContentWindow->SetPosSizePixel(
- Point(maBorder.Left(),nTitleBarHeight+maBorder.Top()),
- Size (aWindowSize.Width()-maBorder.Left()-maBorder.Right(),
- aWindowSize.Height()-maBorder.Top()-maBorder.Bottom()));
-}
-
-
-
-
-void PaneDockingWindow::Paint (const Rectangle& rRectangle)
-{
- if (mbIsLayoutPending)
- Layout();
-
- SfxDockingWindow::Paint (rRectangle);
- int nTitleBarHeight (GetSettings().GetStyleSettings().GetTitleHeight());
- Size aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel();
- if (aToolBoxSize.Height() > nTitleBarHeight)
- nTitleBarHeight = aToolBoxSize.Height();
- Color aOriginalLineColor (GetLineColor());
- Color aOriginalFillColor (GetFillColor());
- SetFillColor (GetSettings().GetStyleSettings().GetDialogColor());
- SetLineColor ();
-
- // Make font bold.
- const Font& rOriginalFont (GetFont());
- Font aFont (rOriginalFont);
- aFont.SetWeight (WEIGHT_BOLD);
- SetFont (aFont);
-
- // Set border values.
- Size aWindowSize (GetOutputSizePixel());
- int nOuterLeft = 0;
- int nInnerLeft = nOuterLeft + maBorder.Left() - 1;
- int nOuterRight = aWindowSize.Width() - 1;
- int nInnerRight = nOuterRight - maBorder.Right() + 1;
- int nInnerTop = nTitleBarHeight + maBorder.Top() - 1;
- int nOuterBottom = aWindowSize.Height() - 1;
- int nInnerBottom = nOuterBottom - maBorder.Bottom() + 1;
-
- // Paint title bar background.
- Rectangle aTitleBarBox (Rectangle(
- nOuterLeft,
- 0,
- nOuterRight,
- nInnerTop-1));
- DrawRect (aTitleBarBox);
-
- if (nInnerLeft > nOuterLeft)
- DrawRect (
- Rectangle (nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom));
- if (nOuterRight > nInnerRight)
- DrawRect (
- Rectangle (nInnerRight, nInnerTop, nOuterRight, nInnerBottom));
- if (nInnerBottom < nOuterBottom)
- DrawRect (
- Rectangle (nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom));
-
- // Paint bevel border.
- SetFillColor ();
- SetLineColor (GetSettings().GetStyleSettings().GetShadowColor());
- if (maBorder.Top() > 0)
- DrawLine (
- Point(nInnerLeft,nInnerTop),
- Point(nInnerLeft,nInnerBottom));
- if (maBorder.Left() > 0)
- DrawLine (
- Point(nInnerLeft,nInnerTop),
- Point(nInnerRight,nInnerTop));
- SetLineColor (GetSettings().GetStyleSettings().GetLightColor());
- if (maBorder.Bottom() > 0)
- DrawLine (
- Point(nInnerRight,nInnerBottom),
- Point(nInnerLeft,nInnerBottom));
- if (maBorder.Right() > 0)
- DrawLine (
- Point(nInnerRight,nInnerBottom),
- Point(nInnerRight,nInnerTop));
-
- // Paint title bar text.
- SetLineColor (GetSettings().GetStyleSettings().GetActiveTextColor());
- SetFillColor ();
- aTitleBarBox.Left() += 3;
- DrawText (aTitleBarBox, msTitle,
- TEXT_DRAW_LEFT
- | TEXT_DRAW_VCENTER
- | TEXT_DRAW_MULTILINE
- | TEXT_DRAW_WORDBREAK);
-
- // Restore original values of the output device.
- SetFont (rOriginalFont);
- SetFillColor (aOriginalFillColor);
-}
-
-
-
-
-void PaneDockingWindow::InitializeTitleToolBox (void)
-{
- if (mpTitleToolBox.get() == NULL)
- {
- // Initialize the title tool box.
- mpTitleToolBox.reset (new ToolBox(this));
- mpTitleToolBox->SetSelectHdl (
- LINK(this, PaneDockingWindow, ToolboxSelectHandler));
- mpTitleToolBox->SetOutStyle (TOOLBOX_STYLE_FLAT);
- mpTitleToolBox->SetBackground (Wallpaper (
- GetSettings().GetStyleSettings().GetDialogColor()));
- mpTitleToolBox->Show();
- }
- else
- mpTitleToolBox->Clear();
-
- // Get the closer bitmap and set it as right most button.
- Bitmap aBitmap (SdResId (BMP_CLOSE_DOC));
- Bitmap aBitmapHC (SdResId (BMP_CLOSE_DOC_H));
- Image aImage = Image (aBitmap, Color (COL_LIGHTMAGENTA));
- Image aImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST));
- mpTitleToolBox->InsertItem (1,
- GetSettings().GetStyleSettings().GetHighContrastMode()
- ? aImageHC
- : aImage);
- mpTitleToolBox->ShowItem (1);
-}
-
-
-
-
-USHORT PaneDockingWindow::AddMenu (
- const String& rsMenuName,
- ULONG nHelpId,
- const Link& rCallback)
-{
- // Add the menu before the closer button.
- USHORT nItemCount (mpTitleToolBox->GetItemCount());
- USHORT nItemId (nItemCount+1);
- mpTitleToolBox->InsertItem (
- nItemId,
- rsMenuName,
- TIB_DROPDOWNONLY,
- nItemCount>0 ? nItemCount-1 : (USHORT)-1);
- mpTitleToolBox->SetHelpId( nItemId, nHelpId );
- mpTitleToolBox->SetClickHdl (rCallback);
- mpTitleToolBox->SetDropdownClickHdl (rCallback);
-
- // The tool box has likely changed its size. The title bar has to be
- // resized.
- Resize();
- Invalidate();
-
- return nItemCount+1;
-}
-
-
-
-
-IMPL_LINK(PaneDockingWindow, ToolboxSelectHandler, ToolBox*, pToolBox)
-{
- USHORT nId = pToolBox->GetCurItemId();
-
- if (nId == 1)
- {
- EndTracking();
- SfxBoolItem aVisibility (mnChildWindowId, FALSE);
- GetBindings().GetDispatcher()->Execute (
- mnChildWindowId,
- SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aVisibility,
- NULL);
- }
-
- return 0;
-}
-
-
-
-
-long PaneDockingWindow::Notify( NotifyEvent& rNEvt )
-{
- return SfxDockingWindow::Notify (rNEvt);
-}
-
-
-
-
->>>>>>> other
void PaneDockingWindow::StateChanged( StateChangedType nType )
{
switch (nType)
diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx
index a335c327de79..1874df10dd53 100755
--- a/sd/source/ui/inc/PaneDockingWindow.hxx
+++ b/sd/source/ui/inc/PaneDockingWindow.hxx
@@ -65,66 +65,6 @@ public:
virtual ~PaneDockingWindow (void);
virtual void StateChanged( StateChangedType nType );
-
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- /** Initializing the title tool box either creates a new title tool box
- or clears all items from an existing one. A closer is added as only
- item.
- */
- void InitializeTitleToolBox (void);
-
- /** Add a top down menu to the title bar or rather the top-level menu
- entry. The given callback is called when the menu is clicked and it
- is the task of the callback to show the menu.
- @return
- The id of the new menu is returned. It can be compared by the
- callback to the value of GetCurItemId() when called at the given
- tool box.
- */
- USHORT AddMenu (const String& rsMenuName, ULONG nHelpId, const Link& rCallback);
-
- ::Window* GetContentWindow (void);
-
- ::boost::shared_ptr<ToolBox> GetTitleToolBox (void) const;
-
-private:
- /** The pane which is represented by the docking window.
- */
- ::rtl::OUString msPaneURL;
-
- /** Title that is shown at the top of the docking window.
- */
- ::rtl::OUString msTitle;
-
- /** The tool box that is displayed in the window title area contains
- menus and the closer button.
- */
- ::boost::shared_ptr<ToolBox> mpTitleToolBox;
-
- /** The border that is painted arround the inner window. The bevel
- shadow lines are part of the border, so where the border is 0 no
- such line is painted.
- */
- SvBorder maBorder;
-
- sal_uInt16 mnChildWindowId;
-
- ::boost::scoped_ptr< ::Window> mpContentWindow;
-
- /** Remember that a layout is pending, i.e. Resize() has been called
- since the last Paint().
- */
- bool mbIsLayoutPending;
-
- DECL_LINK(ToolboxSelectHandler, ToolBox*);
-
- /** This does the actual placing and sizing of the title bar and the
- content window after the size of the docking window has changed.
- This method is called from withing the Paint() method when since its
- last invocation the size of the docking window has changed.
- */
- void Layout (void);
};
} // end of namespace ::sd