diff options
author | Andre Fischer <Andre.W.Fischer <Andre Fischer<Andre.W.Fischer@Sun.COM> | 2010-04-28 14:48:44 +0200 |
---|---|---|
committer | Andre Fischer <Andre.W.Fischer <Andre Fischer<Andre.W.Fischer@Sun.COM> | 2010-04-28 14:48:44 +0200 |
commit | ecb6bc55ff67fb87bbf5fa75d941cfe891560c3a (patch) | |
tree | 99eaa522be3375e0407b600e4864f1d54b2aef7b | |
parent | 92fc8aeea78c22a692388701f8e93b21bab12b4e (diff) |
renaissance1: resolved minor compilation problems.
10 files changed, 27 insertions, 40 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 35c9278e491a..22c39344fced 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -653,7 +653,7 @@ sal_Int8 Clipboard::ExecuteDrop ( mrController.GetInsertionIndicatorHandler()); // Get insertion position and then turn off the insertion indicator. pInsertionIndicatorHandler->UpdatePosition(aEventModelPosition, rEvent.mnAction); - USHORT nIndex = DetermineInsertPosition(*pDragTransferable); + // USHORT nIndex = DetermineInsertPosition(*pDragTransferable); // Do not process the insertion when it is trivial, // i.e. would insert pages at their original place. @@ -729,8 +729,6 @@ void Clipboard::Abort (void) USHORT Clipboard::DetermineInsertPosition (const SdTransferable& ) { - USHORT nInsertPosition = SDRPAGE_NOTFOUND; - // Tell the model to move the dragged pages behind the one with the // index nInsertionIndex which first has to be transformed into an index // understandable by the document. diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index e527d5914871..3354d5c9862b 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -50,7 +50,7 @@ #include "view/SlideSorterView.hxx" #include "view/SlsLayouter.hxx" #include "view/SlsPageObjectLayouter.hxx" -#include "view/SlsButton.hxx" +#include "view/SlsButtonBar.hxx" #include "framework/FrameworkHelper.hxx" #include "showview.hxx" #include "ViewShellBase.hxx" @@ -1241,6 +1241,7 @@ void SelectionFunction::ModeHandler::StartDrag ( const Point& rMousePosition, const InsertionIndicatorHandler::Mode eMode) { + (void)eMode; // Do not start a drag-and-drop operation when one is already active. // (when dragging pages from one document into another, pressing a // modifier key can trigger a MouseMotion event in the originating @@ -1873,6 +1874,7 @@ void ButtonModeHandler::Abort (void) void ButtonModeHandler::ProcessEvent (SelectionFunction::EventDescriptor& rDescriptor) { + (void)rDescriptor; } @@ -1910,7 +1912,6 @@ bool ButtonModeHandler::ProcessButtonUpEvent (SelectionFunction::EventDescriptor rDescriptor.maMouseModelPosition); mrSelectionFunction.SwitchToNormalMode(); return true; - break; } return false; @@ -1929,7 +1930,6 @@ bool ButtonModeHandler::ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor.maMouseModelPosition, true); return true; - break; case MOUSE_MOTION: mrSlideSorter.GetView().GetButtonBar().ProcessMouseMotionEvent( @@ -1937,7 +1937,6 @@ bool ButtonModeHandler::ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor.maMouseModelPosition, false); return true; - break; } return false; diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx index 660990d4c4b6..b40bd667131c 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx @@ -145,7 +145,6 @@ void SelectionObserver::EndObservation (void) OSL_ASSERT(mbIsOvservationActive); mbIsOvservationActive = false; - model::SlideSorterModel& rModel (mrSlideSorter.GetModel()); PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector()); PageSelector::UpdateLock aUpdateLock (mrSlideSorter); rSelector.DeselectAllPages(); diff --git a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx index 61b81614b2ae..973aeb5f5c74 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx @@ -55,11 +55,6 @@ class ButtonBar public: ButtonBar (SlideSorter& rSlideSorter); - /** In order to place and size the buttons the ButtonBar has to - know how large the page objects are. - */ - void SetPageObjectSize (const Size aPageObjectSize); - void ProcessButtonDownEvent ( const model::SharedPageDescriptor& rpDescriptor, const Point aMouseModelLocation); diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index 714ea953a31f..e49d42368c8a 100644 --- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx +++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx @@ -654,7 +654,7 @@ void SlideSorterModel::InsertSlide (SdPage* pPage) if (nIndex>0) if (GetPage(nIndex-1) != GetPageDescriptor(nIndex-1)->GetPage()) return; - if (nIndex<maPageDescriptors.size()-1) + if (size_t(nIndex)<maPageDescriptors.size()-1) if (GetPage(nIndex+1) != GetPageDescriptor(nIndex)->GetPage()) return; diff --git a/sd/source/ui/slidesorter/shell/SlsDebugDialog.cxx b/sd/source/ui/slidesorter/shell/SlsDebugDialog.cxx index 693d61046d22..8a45a54567e9 100644 --- a/sd/source/ui/slidesorter/shell/SlsDebugDialog.cxx +++ b/sd/source/ui/slidesorter/shell/SlsDebugDialog.cxx @@ -228,7 +228,7 @@ private: USHORT nSaturation (0); USHORT nBrightness (0); aColor.RGBtoHSB(nHue, nSaturation, nBrightness); - snprintf(aBuffer, nMaxLength, "r%02Xg%02Xb%02X h%ds%d%b%d", + snprintf(aBuffer, nMaxLength, "r%02Xg%02Xb%02X h%ds%db%d", nRed,nGreen,nBlue, nHue,nSaturation,nBrightness); mpTextValue->SetText(::rtl::OUString::createFromAscii(aBuffer)); diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 0209490bf11d..dad31c8b2617 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -383,7 +383,6 @@ void SlideSorterView::Rearrange (void) if (bRearrangeSuccess) { - GetButtonBar().SetPageObjectSize(mpLayouter->GetPageObjectSize()); Layout(); UpdatePageUnderMouse(false); RequestRepaint(); diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx index 4404ac530b05..f6f1f1e016bc 100644 --- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx +++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx @@ -98,13 +98,6 @@ ButtonBar::ButtonBar (SlideSorter& rSlideSorter) -void ButtonBar::SetPageObjectSize (const Size aPageObjectSize) -{ -} - - - - void ButtonBar::ProcessButtonDownEvent ( const model::SharedPageDescriptor& rpDescriptor, const Point aMouseModelLocation) @@ -260,13 +253,13 @@ sal_Int32 ButtonBar::GetButtonCount (const bool bIsExcluded) const ? maExcludedButtons : maRegularButtons); - if (nIndex<0 || nIndex>=rButtons.size()) + if (nIndex<0 || sal_uInt32(nIndex)>=rButtons.size()) { OSL_ASSERT(nIndex<0 || nIndex>=rButtons.size()); return ::boost::shared_ptr<Button>(); } else - return rButtons[nIndex]; + return rButtons[sal_uInt32(nIndex)]; } @@ -279,9 +272,9 @@ SharedButton ButtonBar::GetButtonAt (const Point aModelLocation) const Point aLocalLocation (aModelLocation - mpDescriptor->GetBoundingBox().TopLeft()); ::std::vector<SharedButton>& rButtons ( mbIsExcluded ? maExcludedButtons : maRegularButtons); - for (sal_Int32 nIndex=0; nIndex<rButtons.size(); ++nIndex) - if (rButtons[nIndex]->GetBoundingBox().IsInside(aLocalLocation)) - return rButtons[nIndex]; + for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex) + if (rButtons[sal_uInt32(nIndex)]->GetBoundingBox().IsInside(aLocalLocation)) + return rButtons[sal_uInt32(nIndex)]; } return SharedButton(); @@ -337,7 +330,7 @@ void ButtonBar::Paint ( rpDescriptor->HasState(model::PageDescriptor::ST_Excluded) ? maExcludedButtons : maRegularButtons); - for (sal_Int32 nIndex=0; nIndex<rButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex) rButtons[nIndex]->Paint( rDevice, aOffset, @@ -486,16 +479,18 @@ bool ButtonBar::LayoutButtons ( const Size aPageObjectSize, const bool bIsSmall) { + (void)aPageObjectSize; + // Tell buttons which size they are. - for (sal_Int32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex) maExcludedButtons[nIndex]->SetIsSmall(bIsSmall); - for (sal_Int32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex) maRegularButtons[nIndex]->SetIsSmall(bIsSmall); // Determine maximal height of the buttons. // Start with the buttons used for the excluded state. sal_Int32 nMaximumHeight (0); - for (sal_Int32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex) { const Size aSize (maExcludedButtons[nIndex]->GetSize()); if (aSize.Height() > nMaximumHeight) @@ -503,7 +498,7 @@ bool ButtonBar::LayoutButtons ( } // Do the same for the regular buttons. - for (sal_Int32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex) { const Size aSize (maRegularButtons[nIndex]->GetSize()); if (aSize.Height() > nMaximumHeight) @@ -542,10 +537,10 @@ bool ButtonBar::LayoutButtons ( } // We return true only when there is no inactive button. - for (sal_Int32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex) if ( ! maExcludedButtons[nIndex]->IsActive()) return false; - for (sal_Int32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex) + for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex) if ( ! maRegularButtons[nIndex]->IsActive()) return false; return true; @@ -684,6 +679,8 @@ void TextButton::Paint ( const double nAlpha, const ::boost::shared_ptr<Theme>& rpTheme) const { + (void)nAlpha; + if (mbIsActive) { // Paint text over the button background. @@ -733,6 +730,7 @@ void ImageButton::Place ( const Rectangle aButtonBarBox, const sal_Int32 nIndex) { + (void)nIndex; const sal_Int32 nWidth (mbIsSmall ? maSmallIcon.GetSizePixel().Width() : maNormalIcon.GetSizePixel().Width()); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index b0684147df69..970ba23ed3fd 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -215,7 +215,6 @@ void PageObjectPainter::PaintPreview ( const bool bIsExcluded (rpDescriptor->GetVisualState().GetCurrentVisualState() == model::VisualState::VS_Excluded); - bool bIsOverlayPaintRequested (bIsExcluded); if (mpCache != NULL) { diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index e5d54e400cd0..3f11070098c4 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -432,7 +432,7 @@ void Theme::SetGradientBrightnessOverride (const GradientColorType eType, const BitmapEx Theme::GetIcon (const IconType eType) { - if (eType>=0 && eType<maIcons.size()) + if (eType>=0 && size_t(eType)<maIcons.size()) return maIcons[eType]; else { @@ -505,7 +505,7 @@ void Theme::SetIntegerValue (const IntegerValueType eType, const sal_Int32 nValu ::rtl::OUString Theme::GetString (const StringType eType) const { - if (eType>=0 && eType<maStrings.size()) + if (eType>=0 && size_t(eType)<maStrings.size()) return maStrings[eType]; else { @@ -519,7 +519,7 @@ void Theme::SetIntegerValue (const IntegerValueType eType, const sal_Int32 nValu Theme::GradientDescriptor& Theme::GetGradient (const GradientColorType eType) { - if (eType>=0 && eType<maGradients.size()) + if (eType>=0 && size_t(eType)<maGradients.size()) return maGradients[eType]; else { @@ -533,7 +533,7 @@ Theme::GradientDescriptor& Theme::GetGradient (const GradientColorType eType) void Theme::InitializeIcon (const IconType eType, USHORT nResourceId) { - if (eType>=0 && eType<maIcons.size()) + if (eType>=0 && size_t(eType)<maIcons.size()) maIcons[eType] = Image(SdResId(nResourceId)).GetBitmapEx(); else { |